From 53a068a42aefee50df5630c84425378b1cacd642 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 ACAMERA_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);
@@ -1929,6 +1929,8 @@ typedef enum acamera_metadata_tag {
* 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.
* * @see ACAMERA_SENSOR_ORIENTATION */