RK3288 usb 摄像头旋转

系统:Android 5.1

 

下面实现了摄像头 180 度旋转,旋转角度只需修改 orientation。

diff --git a/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp b/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp
index 277f83f..aabd270 100755
--- a/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp
+++ b/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp
@@ -788,7 +788,7 @@ int camera_get_number_of_cameras(void)
                     ptr++;
                     camInfoTmp[cam_cnt&0x01].facing_info.orientation = atoi(ptr);
                 } else {
-                    camInfoTmp[cam_cnt&0x01].facing_info.orientation = 0;
+                    camInfoTmp[cam_cnt&0x01].facing_info.orientation = 180;
                 }
 
                 memset(version,0x00,sizeof(version));

 

posted @ 2018-06-12 14:30  LeeAaron  阅读(2552)  评论(0编辑  收藏  举报