Loading core/java/android/hardware/camera2/CaptureRequest.java +4 −2 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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> Loading core/java/android/hardware/camera2/CaptureResult.java +4 −2 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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> Loading Loading
core/java/android/hardware/camera2/CaptureRequest.java +4 −2 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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> Loading
core/java/android/hardware/camera2/CaptureResult.java +4 −2 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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> Loading