From 3abc7511b881e3fcc3de8c8c87093bd661bd0f91 Mon Sep 17 00:00:00 2001
From: Emilian Peev
Note that this orientation is relative to the orientation of the camera sensor, given * by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.
- *To translate from the device orientation given by the Android sensor APIs, the following - * sample code may be used:
+ *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:
*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>
* return jpegOrientation;
* }
*
+ * 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.
*Units: Degrees in multiples of 90
*Range of valid values:
* 0, 90, 180, 270
Note that this orientation is relative to the orientation of the camera sensor, given * by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.
- *To translate from the device orientation given by the Android sensor APIs, the following - * sample code may be used:
+ *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:
*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> {
* return jpegOrientation;
* }
*
+ * 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.
*Units: Degrees in multiples of 90
*Range of valid values:
* 0, 90, 180, 270