【Android系统源码修改】修改摄像头镜像

找到 frameworks/av/services/camera/libcameraservice/api1/CameraClient.cpp
如果orientation = 0; 不能镜像,那 orientation = 1; 尝试修改

@@ -691,6 +691,7 @@ status_t CameraClient::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) {
 //!--
         // Mirror the preview if the camera is front-facing.
         orientation = getOrientation(arg1, mCameraFacing == CAMERA_FACING_FRONT);
+        orientation = 1;  // 新增
         if (orientation == -1) return BAD_VALUE;
         if (mOrientation != orientation) {

如图:
【Android系统源码修改】修改摄像头镜像_第1张图片

你可能感兴趣的:(Android系统源码修改)