Metadata
interface Metadata
CameraCharacteristicsMetadata |
An interface that provides compatibility-focused, read-only query access to |
CaptureRequestMetadata |
An interface that provides compatibility-focused, read-only query access to the settings applied to a camera capture request. |
CaptureResultMetadata |
An interface that provides compatibility-focused, read-only query access to the results of a single image capture. |
CameraCharacteristicsWrapper |
Wrapper interface providing compatibility-focused access to |
CameraExtensionCharacteristicsWrapper |
Compatibility wrapper around |
CaptureRequestWrapper |
A wrapper interface representing the settings applied to a specific camera capture request. |
CaptureResultWrapper |
A wrapper interface providing compatibility-focused access to |
FakeCameraCharacteristics |
A fake implementation of |
FakeCameraExtensionCharacteristics |
A fake implementation of |
FakeCaptureRequest |
A fake implementation of |
FakeCaptureResult |
A fake implementation of |
A read-only, map-like interface for accessing unified camera metadata.
This interface serves as the common base for metadata containers in the Camera common library, such as CameraCharacteristicsWrapper, CaptureRequestWrapper, and CaptureResultWrapper.
It provides type-safe access to library-defined custom keys (Metadata.Key) in addition to the platform-specific keys supported by its sub-interfaces.
Key Concepts
-
Unified Access: Allows combining native camera metadata (from the Android Camera2 API) with custom, internally-computed, or version-compatibility properties.
-
Read-Only: The container's contents cannot be modified through this interface.
-
Type-Safety: Values are retrieved using strongly-typed
Keyinstances.
Summary
Nested types |
|---|
class Metadata.Key<T : Any>A type-safe key used to identify and retrieve values from a |
Public functions |
|
|---|---|
operator T? |
<T : Any> get(key: Metadata.Key<T>)Retrieves the value associated with the specified |
open T |
<T : Any> getOrDefault(key: Metadata.Key<T>, default: T)Retrieves the value associated with the specified |
Public properties |
|
|---|---|
Set<Metadata.Key<*>> |
The set of all custom |
Public functions
get
operator fun <T : Any> get(key: Metadata.Key<T>): T?
Retrieves the value associated with the specified Metadata.Key.
| Parameters | |
|---|---|
<T : Any> |
The type of the value (must be non-nullable). |
key: Metadata.Key<T> |
The custom key to query. |
| Returns | |
|---|---|
T? |
The value associated with the key, or |
getOrDefault
open fun <T : Any> getOrDefault(key: Metadata.Key<T>, default: T): T
Retrieves the value associated with the specified Metadata.Key, or returns default if the key is not present.
| Parameters | |
|---|---|
<T : Any> |
The type of the value (must be non-nullable). |
key: Metadata.Key<T> |
The custom key to query. |
default: T |
The value to return if the key is not present or if its value is |
| Returns | |
|---|---|
T |
The value associated with the key, or |
Public properties
metadataKeys
val metadataKeys: Set<Metadata.Key<*>>
The set of all custom Metadata.Keys currently available in this container.
Note that this set contains only custom library-defined keys. It does not include platform-specific keys (such as android.hardware.camera2.CameraCharacteristics.Key or android.hardware.camera2.CaptureResult.Key), which are managed separately by the implementing wrappers.