Loading camera/camera_platform.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -211,3 +211,10 @@ flag { bug: "359409044" } flag { namespace: "camera_platform" name: "night_mode_indicator" is_exported: true description: "Indicates when to activate Night Mode Camera Extension" bug: "335902696" } camera/ndk/include/camera/NdkCameraMetadataTags.h +54 −0 Original line number Diff line number Diff line Loading @@ -8181,6 +8181,33 @@ typedef enum acamera_metadata_tag { ACAMERA_AUTOMOTIVE_LENS_START, ACAMERA_AUTOMOTIVE_LENS_END, /** * <p>Indicates when to activate Night Mode Camera Extension for high-quality * still captures in low-light conditions.</p> * * <p>Type: int32 (acamera_metadata_enum_android_extension_night_mode_indicator_t)</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li> * </ul></p> * * <p>Provides awareness to the application when the current scene can benefit from using a * Night Mode Camera Extension to take a high-quality photo.</p> * <p>Support for this capture result can be queried via * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailableCaptureResultKeys">CameraCharacteristics#getAvailableCaptureResultKeys</a>.</p> * <p>If the device supports this capability then it will also support * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraExtensionCharacteristics.html#EXTENSION_NIGHT">NIGHT</a> * and will be available in both * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.html">sessions</a> and * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraExtensionSession.html">sessions</a>.</p> * <p>The value will be {@code UNKNOWN} in the following auto exposure modes: ON_AUTO_FLASH, * ON_ALWAYS_FLASH, ON_AUTO_FLASH_REDEYE, or ON_EXTERNAL_FLASH.</p> */ ACAMERA_EXTENSION_NIGHT_MODE_INDICATOR = // int32 (acamera_metadata_enum_android_extension_night_mode_indicator_t) ACAMERA_EXTENSION_START + 2, ACAMERA_EXTENSION_END, /** * <p>The available Jpeg/R stream * configurations that this camera device supports Loading Loading @@ -11848,6 +11875,33 @@ typedef enum acamera_metadata_enum_acamera_automotive_lens_facing { } acamera_metadata_enum_android_automotive_lens_facing_t; // ACAMERA_EXTENSION_NIGHT_MODE_INDICATOR typedef enum acamera_metadata_enum_acamera_extension_night_mode_indicator { /** * <p>The camera can't accurately assess the scene's lighting to determine if a Night Mode * Camera Extension capture would improve the photo. This can happen when the current * camera configuration doesn't support night mode indicator detection, such as when * the auto exposure mode is ON_AUTO_FLASH, ON_ALWAYS_FLASH, ON_AUTO_FLASH_REDEYE, or * ON_EXTERNAL_FLASH.</p> */ ACAMERA_EXTENSION_NIGHT_MODE_INDICATOR_UNKNOWN = 0, /** * <p>The camera has detected lighting conditions that are sufficiently bright. Night * Mode Camera Extensions is available but may not be able to optimize the camera * settings to take a higher quality photo.</p> */ ACAMERA_EXTENSION_NIGHT_MODE_INDICATOR_OFF = 1, /** * <p>The camera has detected low-light conditions. It is recommended to use Night Mode * Camera Extension to optimize the camera settings to take a high-quality photo in * the dark.</p> */ ACAMERA_EXTENSION_NIGHT_MODE_INDICATOR_ON = 2, } acamera_metadata_enum_android_extension_night_mode_indicator_t; // ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS typedef enum acamera_metadata_enum_acamera_jpegr_available_jpeg_r_stream_configurations { include/media/MmapStreamCallback.h +4 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #ifndef ANDROID_AUDIO_MMAP_STREAM_CALLBACK_H #define ANDROID_AUDIO_MMAP_STREAM_CALLBACK_H #include <media/AudioContainers.h> #include <system/audio.h> #include <utils/Errors.h> #include <utils/RefBase.h> Loading @@ -42,10 +43,10 @@ class MmapStreamCallback : public virtual RefBase { virtual void onVolumeChanged(float volume) = 0; /** * The device the stream is routed to/from has changed * \param[in] onRoutingChanged the unique device ID of the new device. * The devices the stream is routed to/from has changed * \param[in] deviceIds a set of the device IDs of the new devices. */ virtual void onRoutingChanged(audio_port_handle_t deviceId) = 0; virtual void onRoutingChanged(const DeviceIdVector& deviceIds) = 0; protected: MmapStreamCallback() {} Loading include/media/MmapStreamInterface.h +6 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <system/audio.h> #include <media/AudioClient.h> #include <media/AudioContainers.h> #include <utils/Errors.h> #include <utils/RefBase.h> Loading Loading @@ -51,7 +52,8 @@ class MmapStreamInterface : public virtual RefBase * Requested parameters as input, * Actual parameters as output * \param[in] client a AudioClient struct describing the first client using this stream. * \param[in,out] deviceId audio device the stream should preferably be routed to/from * \param[in,out] deviceIds audio devices the stream should preferably be routed to/from. * Leave empty if there are no preferred devices. * Requested as input, * Actual as output * \param[in,out] sessionId audio sessionId for the stream Loading @@ -70,7 +72,7 @@ class MmapStreamInterface : public virtual RefBase const audio_attributes_t *attr, audio_config_base_t *config, const AudioClient& client, audio_port_handle_t *deviceId, DeviceIdVector *deviceIds, audio_session_t *sessionId, const sp<MmapStreamCallback>& callback, sp<MmapStreamInterface>& interface, Loading media/aconfig/Android.bp +19 −0 Original line number Diff line number Diff line Loading @@ -50,3 +50,22 @@ cc_aconfig_library { ], aconfig_declarations: "aconfig_codec_fwk_flags", } aconfig_declarations { name: "aconfig_media_swcodec_flags", package: "android.media.swcodec.flags", container: "com.android.media.swcodec", srcs: ["swcodec_flags.aconfig"], } cc_aconfig_library { name: "android.media.swcodec.flags-aconfig-cc", aconfig_declarations: "aconfig_media_swcodec_flags", min_sdk_version: "apex_inherit", vendor_available: true, double_loadable: true, apex_available: [ "//apex_available:platform", "com.android.media.swcodec", ], } Loading
camera/camera_platform.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -211,3 +211,10 @@ flag { bug: "359409044" } flag { namespace: "camera_platform" name: "night_mode_indicator" is_exported: true description: "Indicates when to activate Night Mode Camera Extension" bug: "335902696" }
camera/ndk/include/camera/NdkCameraMetadataTags.h +54 −0 Original line number Diff line number Diff line Loading @@ -8181,6 +8181,33 @@ typedef enum acamera_metadata_tag { ACAMERA_AUTOMOTIVE_LENS_START, ACAMERA_AUTOMOTIVE_LENS_END, /** * <p>Indicates when to activate Night Mode Camera Extension for high-quality * still captures in low-light conditions.</p> * * <p>Type: int32 (acamera_metadata_enum_android_extension_night_mode_indicator_t)</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li> * </ul></p> * * <p>Provides awareness to the application when the current scene can benefit from using a * Night Mode Camera Extension to take a high-quality photo.</p> * <p>Support for this capture result can be queried via * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailableCaptureResultKeys">CameraCharacteristics#getAvailableCaptureResultKeys</a>.</p> * <p>If the device supports this capability then it will also support * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraExtensionCharacteristics.html#EXTENSION_NIGHT">NIGHT</a> * and will be available in both * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.html">sessions</a> and * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraExtensionSession.html">sessions</a>.</p> * <p>The value will be {@code UNKNOWN} in the following auto exposure modes: ON_AUTO_FLASH, * ON_ALWAYS_FLASH, ON_AUTO_FLASH_REDEYE, or ON_EXTERNAL_FLASH.</p> */ ACAMERA_EXTENSION_NIGHT_MODE_INDICATOR = // int32 (acamera_metadata_enum_android_extension_night_mode_indicator_t) ACAMERA_EXTENSION_START + 2, ACAMERA_EXTENSION_END, /** * <p>The available Jpeg/R stream * configurations that this camera device supports Loading Loading @@ -11848,6 +11875,33 @@ typedef enum acamera_metadata_enum_acamera_automotive_lens_facing { } acamera_metadata_enum_android_automotive_lens_facing_t; // ACAMERA_EXTENSION_NIGHT_MODE_INDICATOR typedef enum acamera_metadata_enum_acamera_extension_night_mode_indicator { /** * <p>The camera can't accurately assess the scene's lighting to determine if a Night Mode * Camera Extension capture would improve the photo. This can happen when the current * camera configuration doesn't support night mode indicator detection, such as when * the auto exposure mode is ON_AUTO_FLASH, ON_ALWAYS_FLASH, ON_AUTO_FLASH_REDEYE, or * ON_EXTERNAL_FLASH.</p> */ ACAMERA_EXTENSION_NIGHT_MODE_INDICATOR_UNKNOWN = 0, /** * <p>The camera has detected lighting conditions that are sufficiently bright. Night * Mode Camera Extensions is available but may not be able to optimize the camera * settings to take a higher quality photo.</p> */ ACAMERA_EXTENSION_NIGHT_MODE_INDICATOR_OFF = 1, /** * <p>The camera has detected low-light conditions. It is recommended to use Night Mode * Camera Extension to optimize the camera settings to take a high-quality photo in * the dark.</p> */ ACAMERA_EXTENSION_NIGHT_MODE_INDICATOR_ON = 2, } acamera_metadata_enum_android_extension_night_mode_indicator_t; // ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS typedef enum acamera_metadata_enum_acamera_jpegr_available_jpeg_r_stream_configurations {
include/media/MmapStreamCallback.h +4 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #ifndef ANDROID_AUDIO_MMAP_STREAM_CALLBACK_H #define ANDROID_AUDIO_MMAP_STREAM_CALLBACK_H #include <media/AudioContainers.h> #include <system/audio.h> #include <utils/Errors.h> #include <utils/RefBase.h> Loading @@ -42,10 +43,10 @@ class MmapStreamCallback : public virtual RefBase { virtual void onVolumeChanged(float volume) = 0; /** * The device the stream is routed to/from has changed * \param[in] onRoutingChanged the unique device ID of the new device. * The devices the stream is routed to/from has changed * \param[in] deviceIds a set of the device IDs of the new devices. */ virtual void onRoutingChanged(audio_port_handle_t deviceId) = 0; virtual void onRoutingChanged(const DeviceIdVector& deviceIds) = 0; protected: MmapStreamCallback() {} Loading
include/media/MmapStreamInterface.h +6 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <system/audio.h> #include <media/AudioClient.h> #include <media/AudioContainers.h> #include <utils/Errors.h> #include <utils/RefBase.h> Loading Loading @@ -51,7 +52,8 @@ class MmapStreamInterface : public virtual RefBase * Requested parameters as input, * Actual parameters as output * \param[in] client a AudioClient struct describing the first client using this stream. * \param[in,out] deviceId audio device the stream should preferably be routed to/from * \param[in,out] deviceIds audio devices the stream should preferably be routed to/from. * Leave empty if there are no preferred devices. * Requested as input, * Actual as output * \param[in,out] sessionId audio sessionId for the stream Loading @@ -70,7 +72,7 @@ class MmapStreamInterface : public virtual RefBase const audio_attributes_t *attr, audio_config_base_t *config, const AudioClient& client, audio_port_handle_t *deviceId, DeviceIdVector *deviceIds, audio_session_t *sessionId, const sp<MmapStreamCallback>& callback, sp<MmapStreamInterface>& interface, Loading
media/aconfig/Android.bp +19 −0 Original line number Diff line number Diff line Loading @@ -50,3 +50,22 @@ cc_aconfig_library { ], aconfig_declarations: "aconfig_codec_fwk_flags", } aconfig_declarations { name: "aconfig_media_swcodec_flags", package: "android.media.swcodec.flags", container: "com.android.media.swcodec", srcs: ["swcodec_flags.aconfig"], } cc_aconfig_library { name: "android.media.swcodec.flags-aconfig-cc", aconfig_declarations: "aconfig_media_swcodec_flags", min_sdk_version: "apex_inherit", vendor_available: true, double_loadable: true, apex_available: [ "//apex_available:platform", "com.android.media.swcodec", ], }