请各位大佬帮忙看看 ,板子上有两路mipi摄像头,前摄是正常的,但是加上后摄之后isp服务起不来,而且有一个应用去切换预览流查看,出来的始终是前摄的画面。用小工具直接去video0和video5抓照片,是两处都能抓到相对应的照片的。
1、在camera_host_config.hcs中已经进行如下配置
ability_01 :: ability {
logicCameraId = "lcam001";
physicsCameraIds = [
"CAMERA_FIRST"
];
......
cameraPosition = "OHOS_CAMERA_POSITION_FRONT";
......
ability_02 :: ability {
logicCameraId = "lcam002";
physicsCameraIds = [
"CAMERA_SECOND"
];
......
cameraPosition = "OHOS_CAMERA_POSITION_BACK";
2、切换预览流的应用里面也已经显示出来了lcam001(前摄)和lcam002(后摄)
附件里面lcam001是能出预览流的hilog lcam002是不能出预览流的log
修改project_hardware.h,建议匹配的camera driver名称修改不一致如:
再调整下v4l2_fileformat.cpp中cap.driver的判断即可,自测切换摄像头可用
01-18 16:51:24.529 610 1982 E C02513/camera_hdi_service: HandleRequest() HandleRequest streamId = [1] and needCancel = [0]
01-18 16:51:24.531 610 1983 E C02513/camera_hdi_service: V4L2StreamOn() error: ioctl VIDIOC_STREAMON failed: No such device
01-18 16:51:24.531 610 1983 E C02513/camera_hdi_service: StartStream() error: StartStream: V4L2StreamOn error
01-18 16:51:24.531 610 1983 E C02513/camera_hdi_service: CollectBuffers() provide buffer failed.
没有找到这个设备,导致获取不到流