stop sensor_name f37, setting_size = 1
[ERROR][vps/hb_vps_api.c:2303] [4763.495218]HB_VPS_GetChnFrame[2303]: VPS error get chn2 frame timeout
代码如下:
#include <ostream>#include <iostream>#include <memory>#include <sstream>#include <string>#include <thread>#include "video_source/video_source.h"#include "video_source/video_source_type.h"using std::chrono::milliseconds;using videosource::VideoSource;using videosource::VideoSourceLogLevel;using videosource::VideoSourceErrorCode;using videosource::ImageFrame;using videosource::PyramidFrame;using videosource::HorizonVisionPixelFormat;int main(int argc, char **argv) { std::cout << "main" << std::endl; int ret = -1; std::string config_file; config_file= "./configs/video_source/x3dev/mipi_cam/x3_mipi_cam_f37_1080p_chn0.json"; int channel_id = 0; auto video_sorce = std::make_shared<VideoSource>(channel_id, config_file); video_sorce->Init(); std::cout << "init" << std::endl; video_sorce->Start(); std::cout << "start" << std::endl; bool is_sync_mode = video_sorce->GetSyncMode(); //0 std::cout << "sync: " << is_sync_mode << std::endl; bool vin_out_en = video_sorce->GetVinOutEnable(); //0 std::cout << "vin_out_en: " << vin_out_en << std::endl; bool vps_en = video_sorce->GetVpsEnable();//1 std::cout << "vps_en: " << vps_en << std::endl; int time = 25; if(time>0){ std::vector<std::shared_ptr<videosource::ImageFrame>> ipu_image_list; ret = video_sorce->GetVpsImageFrame(ipu_image_list); std::cout << ret << std::endl; // std::cout << ipu_image_list.size() << std::endl; ret = video_sorce->FreeVpsImageFrame(ipu_image_list); std::cout << ret << std::endl; std::this_thread::sleep_for(std::chrono::milliseconds(40)); std::cout << time << std::endl; time = time - 1; } video_sorce->Stop(); std::cout << "stop" << std::endl; video_sorce->DeInit(); std::cout << "deinit" << std::endl; std::cout << "end!!!" << std::endl; if(ret!=0) { std::cout << "end" << std::endl; } return 0;}
谢谢!