diff --git a/camera/ndk/include/camera/NdkCameraMetadataTags.h b/camera/ndk/include/camera/NdkCameraMetadataTags.h index 2829b905d7..c7d2545316 100644 --- a/camera/ndk/include/camera/NdkCameraMetadataTags.h +++ b/camera/ndk/include/camera/NdkCameraMetadataTags.h @@ -1913,8 +1913,8 @@ typedef enum acamera_metadata_tag { * the thumbnail data will also be rotated.

*

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);
@@ -1933,6 +1933,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 */