firefly rk3288 外接摄像头人像颠倒,无法旋转
求程序 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.facing_info.facing;
- info->orientation = gCamInfos.facing_info.orientation;
+ info->orientation = gCamInfos.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);
页:
[1]