Firefly开源社区
标题:
firefly rk3288 外接摄像头人像颠倒,无法旋转
[打印本页]
作者:
SBSBSBSB
时间:
2021-2-23 15:29
标题:
firefly rk3288 外接摄像头人像颠倒,无法旋转
求程序
作者:
jpchen
时间:
2021-2-24 10:03
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);
复制代码
欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/)
Powered by Discuz! X3.1