Loading include/camera/Camera.h +8 −6 Original line number Diff line number Diff line Loading @@ -105,8 +105,8 @@ enum { }; enum { CAMERA_FACING_BACK = 0, CAMERA_FACING_FRONT = 1 /* The camera faces to the user */ CAMERA_FACING_BACK = 0, /* The facing of the camera is opposite to that of the screen. */ CAMERA_FACING_FRONT = 1 /* The facing of the camera is the same as that of the screen. */ }; struct CameraInfo { Loading @@ -122,10 +122,12 @@ struct CameraInfo { * camera image needs to be rotated clockwise so it shows correctly on * the display in its natural orientation. It should be 0, 90, 180, or 270. * * For example, suppose a device has a naturally tall screen, but the camera * sensor is mounted in landscape. If the top side of the camera sensor is * aligned with the right edge of the display in natural orientation, the * value should be 90. * For example, suppose a device has a naturally tall screen. The * back-facing camera sensor is mounted in landscape. You are looking at * the screen. If the top side of the camera sensor is aligned with the * right edge of the screen in natural orientation, the value should be * 90. If the top side of a front-facing camera sensor is aligned with * the right of the screen, the value should be 270. */ int orientation; }; Loading include/camera/CameraHardwareInterface.h +3 −1 Original line number Diff line number Diff line Loading @@ -190,7 +190,9 @@ public: */ virtual status_t cancelPicture() = 0; /** Set the camera parameters. */ /** * Set the camera parameters. This returns BAD_VALUE if any parameter is * invalid or not supported. */ virtual status_t setParameters(const CameraParameters& params) = 0; /** Return the camera parameters. */ Loading include/camera/CameraParameters.h +17 −10 Original line number Diff line number Diff line Loading @@ -142,16 +142,23 @@ public: // the best. // Example value: "90". Read/write. static const char KEY_JPEG_QUALITY[]; // The orientation of the device in degrees. For example, suppose the // natural position of the device is landscape. If the user takes a picture // in landscape mode in 2048x1536 resolution, the rotation will be set to // "0". If the user rotates the phone 90 degrees clockwise, the rotation // should be set to "90". // The camera driver can set orientation in the EXIF header without rotating // the picture. Or the driver can rotate the picture and the EXIF thumbnail. // If the Jpeg picture is rotated, the orientation in the EXIF header should // be missing or 1 (row #0 is top and column #0 is left side). The driver // should not set default value for this parameter. // The rotation angle in degrees relative to the orientation of the camera. // This affects the pictures returned from CAMERA_MSG_COMPRESSED_IMAGE. The // camera driver may set orientation in the EXIF header without rotating the // picture. Or the driver may rotate the picture and the EXIF thumbnail. If // the Jpeg picture is rotated, the orientation in the EXIF header will be // missing or 1 (row #0 is top and column #0 is left side). // // Note that the JPEG pictures of front-facing cameras are not mirrored // as in preview display. // // For example, suppose the natural orientation of the device is portrait. // The device is rotated 270 degrees clockwise, so the device orientation is // 270. Suppose a back-facing camera sensor is mounted in landscape and the // top side of the camera sensor is aligned with the right edge of the // display in natural orientation. So the camera orientation is 90. The // rotation should be set to 0 (270 + 90). // // Example value: "0" or "90" or "180" or "270". Write only. static const char KEY_ROTATION[]; // GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in Loading Loading
include/camera/Camera.h +8 −6 Original line number Diff line number Diff line Loading @@ -105,8 +105,8 @@ enum { }; enum { CAMERA_FACING_BACK = 0, CAMERA_FACING_FRONT = 1 /* The camera faces to the user */ CAMERA_FACING_BACK = 0, /* The facing of the camera is opposite to that of the screen. */ CAMERA_FACING_FRONT = 1 /* The facing of the camera is the same as that of the screen. */ }; struct CameraInfo { Loading @@ -122,10 +122,12 @@ struct CameraInfo { * camera image needs to be rotated clockwise so it shows correctly on * the display in its natural orientation. It should be 0, 90, 180, or 270. * * For example, suppose a device has a naturally tall screen, but the camera * sensor is mounted in landscape. If the top side of the camera sensor is * aligned with the right edge of the display in natural orientation, the * value should be 90. * For example, suppose a device has a naturally tall screen. The * back-facing camera sensor is mounted in landscape. You are looking at * the screen. If the top side of the camera sensor is aligned with the * right edge of the screen in natural orientation, the value should be * 90. If the top side of a front-facing camera sensor is aligned with * the right of the screen, the value should be 270. */ int orientation; }; Loading
include/camera/CameraHardwareInterface.h +3 −1 Original line number Diff line number Diff line Loading @@ -190,7 +190,9 @@ public: */ virtual status_t cancelPicture() = 0; /** Set the camera parameters. */ /** * Set the camera parameters. This returns BAD_VALUE if any parameter is * invalid or not supported. */ virtual status_t setParameters(const CameraParameters& params) = 0; /** Return the camera parameters. */ Loading
include/camera/CameraParameters.h +17 −10 Original line number Diff line number Diff line Loading @@ -142,16 +142,23 @@ public: // the best. // Example value: "90". Read/write. static const char KEY_JPEG_QUALITY[]; // The orientation of the device in degrees. For example, suppose the // natural position of the device is landscape. If the user takes a picture // in landscape mode in 2048x1536 resolution, the rotation will be set to // "0". If the user rotates the phone 90 degrees clockwise, the rotation // should be set to "90". // The camera driver can set orientation in the EXIF header without rotating // the picture. Or the driver can rotate the picture and the EXIF thumbnail. // If the Jpeg picture is rotated, the orientation in the EXIF header should // be missing or 1 (row #0 is top and column #0 is left side). The driver // should not set default value for this parameter. // The rotation angle in degrees relative to the orientation of the camera. // This affects the pictures returned from CAMERA_MSG_COMPRESSED_IMAGE. The // camera driver may set orientation in the EXIF header without rotating the // picture. Or the driver may rotate the picture and the EXIF thumbnail. If // the Jpeg picture is rotated, the orientation in the EXIF header will be // missing or 1 (row #0 is top and column #0 is left side). // // Note that the JPEG pictures of front-facing cameras are not mirrored // as in preview display. // // For example, suppose the natural orientation of the device is portrait. // The device is rotated 270 degrees clockwise, so the device orientation is // 270. Suppose a back-facing camera sensor is mounted in landscape and the // top side of the camera sensor is aligned with the right edge of the // display in natural orientation. So the camera orientation is 90. The // rotation should be set to 0 (270 + 90). // // Example value: "0" or "90" or "180" or "270". Write only. static const char KEY_ROTATION[]; // GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in Loading