|
发表于 2021-2-24 10:03:38
只看该作者
沙发
USB 摄像头默认是后置的,可以通过如下info->facing的值修改
- diff --git a/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp b/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp
- index 6737e19..85331f7 100755
- --- a/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp
- +++ b/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp
- @@ -1331,7 +1331,11 @@ int camera_get_camera_info(int camera_id, struct camera_info *info)
- }
- #else
- info->facing = gCamInfos[camera_id].facing_info.facing;
- - info->orientation = gCamInfos[camera_id].facing_info.orientation;
- + info->orientation = gCamInfos[camera_id].facing_info.orientation;
- + if(camera_id == 1)
- + {
- + info->facing = 1;
- + }
- #endif
- end:
- LOGD("%s(%d): camera_%d facing(%d), orientation(%d)",__FUNCTION__,__LINE__,camera_id,info->facing,info->orientation);
复制代码 |
|