Merge "Camera: Update external camera orientation guidelines" into pi-dev
am: 7451945364
Change-Id: I20b0458dee57cc804346b7104834ba1a619a1eb2
This commit is contained in:
@@ -2105,8 +2105,8 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
|
||||
* the thumbnail data will also be rotated.</p>
|
||||
* <p>Note that this orientation is relative to the orientation of the camera sensor, given
|
||||
* by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.</p>
|
||||
* <p>To translate from the device orientation given by the Android sensor APIs, the following
|
||||
* sample code may be used:</p>
|
||||
* <p>To translate from the device orientation given by the Android sensor APIs for camera
|
||||
* sensors which are not EXTERNAL, the following sample code may be used:</p>
|
||||
* <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
|
||||
* if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
|
||||
* int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
|
||||
@@ -2125,6 +2125,8 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
|
||||
* return jpegOrientation;
|
||||
* }
|
||||
* </code></pre>
|
||||
* <p>For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
|
||||
* also be set to EXTERNAL. The above code is not relevant in such case.</p>
|
||||
* <p><b>Units</b>: Degrees in multiples of 90</p>
|
||||
* <p><b>Range of valid values:</b><br>
|
||||
* 0, 90, 180, 270</p>
|
||||
|
||||
@@ -2422,8 +2422,8 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
|
||||
* the thumbnail data will also be rotated.</p>
|
||||
* <p>Note that this orientation is relative to the orientation of the camera sensor, given
|
||||
* by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.</p>
|
||||
* <p>To translate from the device orientation given by the Android sensor APIs, the following
|
||||
* sample code may be used:</p>
|
||||
* <p>To translate from the device orientation given by the Android sensor APIs for camera
|
||||
* sensors which are not EXTERNAL, the following sample code may be used:</p>
|
||||
* <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
|
||||
* if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
|
||||
* int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
|
||||
@@ -2442,6 +2442,8 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
|
||||
* return jpegOrientation;
|
||||
* }
|
||||
* </code></pre>
|
||||
* <p>For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
|
||||
* also be set to EXTERNAL. The above code is not relevant in such case.</p>
|
||||
* <p><b>Units</b>: Degrees in multiples of 90</p>
|
||||
* <p><b>Range of valid values:</b><br>
|
||||
* 0, 90, 180, 270</p>
|
||||
|
||||
Reference in New Issue
Block a user