RK3288 usb 摄像头旋转

 

系统:Android 5.1 同时也适用Android 7.1

3288板子竖屏时,相机拉伸很严重

下面实现了摄像头90 度旋转,旋转角度只需修改 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 = 90;
                 }
 
                 memset(version,0x00,sizeof(version));
上一篇:c – 想要构建只有内核和一个二进制文件的裸Linux系统


下一篇:Android 指纹启动流程