Firefly开源社区

标题: firefly rk3288 外接摄像头人像颠倒,无法旋转 [打印本页]

作者: SBSBSBSB    时间: 2021-2-23 15:29
标题: firefly rk3288 外接摄像头人像颠倒,无法旋转
求程序
作者: jpchen    时间: 2021-2-24 10:03
USB 摄像头默认是后置的,可以通过如下info->facing的值修改
  1. diff --git a/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp b/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp
  2. index 6737e19..85331f7 100755
  3. --- a/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp
  4. +++ b/hardware/rockchip/camera/CameraHal/CameraHal_Module.cpp
  5. @@ -1331,7 +1331,11 @@ int camera_get_camera_info(int camera_id, struct camera_info *info)
  6.      }
  7. #else
  8.      info->facing = gCamInfos[camera_id].facing_info.facing;
  9. -    info->orientation = gCamInfos[camera_id].facing_info.orientation;      
  10. +    info->orientation = gCamInfos[camera_id].facing_info.orientation;  
  11. +    if(camera_id == 1)
  12. +    {
  13. +        info->facing = 1;
  14. +    }     
  15. #endif
  16. end:
  17.      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