CameraExtensionCharacteristicsWrapper


interface CameraExtensionCharacteristicsWrapper : CameraCharacteristicsMetadata, UnsafeWrapper


Compatibility wrapper around CameraExtensionCharacteristics.

This wrapper provides type-safe, version-compatible access to the characteristics and capabilities of camera extension modes on a device. It extends CameraCharacteristicsMetadata to support querying characteristics keys and UnsafeWrapper to allow accessing the underlying native characteristics object.

Summary

Public functions

Range<Long>?
getEstimatedCaptureLatencyRangeMillis(
    captureSize: Size,
    imageFormat: Int
)

Returns the estimated capture latency range in milliseconds for the given capture size and format.

Set<Size>
getOutputSizes(imageFormat: Int)

Returns the output sizes supported for the given image format.

Set<Size>
getOutputSizes(klass: Class<*>)

Returns the output sizes supported for the given class (e.g., android.graphics.SurfaceTexture).

Set<Size>
getPostviewSizes(captureSize: Size, format: Int)

Returns the supported postview sizes for a given capture size and format.

Public properties

Int

The camera extension mode represented by this characteristics instance.

CameraId

The ID of the camera device associated with these extension characteristics.

Set<CaptureRequest.Key<*>>

The set of capture request keys supported by this camera extension.

Set<CaptureResult.Key<*>>

The set of capture result keys supported by this camera extension.

Set<CameraCharacteristics.Key<*>>

The set of camera characteristics keys that are dynamically updated for this extension.

Boolean

Whether capture progress callbacks are supported for this extension mode.

Boolean

Whether postview is supported for this extension mode.

Boolean

Whether access to some camera characteristics keys is restricted due to camera permissions.

Set<CameraCharacteristics.Key<*>>

The set of camera characteristics keys supported by this camera extension.

Set<CameraCharacteristics.Key<*>>

The set of camera characteristics keys that require specific permissions to be accessed.

Inherited functions

From androidx.camera.common.CameraCharacteristicsMetadata
operator T?

Retrieves the value of the specified CameraCharacteristics.Key.

open T
<T : Any> getOrDefault(key: CameraCharacteristics.Key<T>, default: T)

Retrieves the value of the specified CameraCharacteristics.Key, or returns default if the value is null or the key is unsupported.

From androidx.camera.common.Metadata
operator T?
<T : Any> get(key: Metadata.Key<T>)

Retrieves the value associated with the specified Metadata.Key.

open T
<T : Any> getOrDefault(key: Metadata.Key<T>, default: T)

Retrieves the value associated with the specified Metadata.Key, or returns default if the key is not present.

From androidx.camera.common.UnsafeWrapper
T?
<T : Any> unwrapAs(type: Class<T>)

Attempts to unwrap this object into the specified underlying type.

Inherited properties

From androidx.camera.common.Metadata
Set<Metadata.Key<*>>

The set of all custom Metadata.Keys currently available in this container.

Public functions

getEstimatedCaptureLatencyRangeMillis

Added in 1.7.0-alpha03
fun getEstimatedCaptureLatencyRangeMillis(
    captureSize: Size,
    imageFormat: Int
): Range<Long>?

Returns the estimated capture latency range in milliseconds for the given capture size and format.

Parameters
captureSize: Size

the size of the capture.

imageFormat: Int

the format of the captured image.

Returns
Range<Long>?

the range of estimated capture latency, or null if the latency is not available.

See also
CameraExtensionCharacteristics

#getEstimatedCaptureLatencyRangeMillis

getOutputSizes

Added in 1.7.0-alpha03
fun getOutputSizes(imageFormat: Int): Set<Size>

Returns the output sizes supported for the given image format.

Parameters
imageFormat: Int

the image format (e.g., android.graphics.ImageFormat.JPEG, android.graphics.ImageFormat.YUV_420_888).

Returns
Set<Size>

the set of supported sizes for the image format.

See also
CameraExtensionCharacteristics

#getExtensionSupportedSizes

getOutputSizes

Added in 1.7.0-alpha03
fun getOutputSizes(klass: Class<*>): Set<Size>

Returns the output sizes supported for the given class (e.g., android.graphics.SurfaceTexture).

Parameters
klass: Class<*>

the class of the output target.

Returns
Set<Size>

the set of supported sizes for the output class.

See also
CameraExtensionCharacteristics

#getExtensionSupportedSizes

getPostviewSizes

Added in 1.7.0-alpha03
fun getPostviewSizes(captureSize: Size, format: Int): Set<Size>

Returns the supported postview sizes for a given capture size and format.

Parameters
captureSize: Size

the size of the final high-quality capture.

format: Int

the image format of the postview.

Returns
Set<Size>

the set of supported postview sizes, or an empty set if postview is not supported.

See also
CameraExtensionCharacteristics

#getPostviewSupportedSizes

Public properties

cameraId

Added in 1.7.0-alpha03
val cameraIdCameraId

The ID of the camera device associated with these extension characteristics.

captureRequestKeys

Added in 1.7.0-alpha03
val captureRequestKeysSet<CaptureRequest.Key<*>>

The set of capture request keys supported by this camera extension.

See also
CameraExtensionCharacteristics

#getAvailableCaptureRequestKeys

captureResultKeys

Added in 1.7.0-alpha03
val captureResultKeysSet<CaptureResult.Key<*>>

The set of capture result keys supported by this camera extension.

See also
CameraExtensionCharacteristics

#getAvailableCaptureResultKeys

dynamicKeys

Added in 1.7.0-alpha03
val dynamicKeysSet<CameraCharacteristics.Key<*>>

The set of camera characteristics keys that are dynamically updated for this extension.

isCaptureProgressSupported

Added in 1.7.0-alpha03
val isCaptureProgressSupportedBoolean

Whether capture progress callbacks are supported for this extension mode.

If true, capture requests can report progress updates during the extension processing.

See also
CameraExtensionCharacteristics

#isCaptureProcessProgressSupported

isPostviewSupported

Added in 1.7.0-alpha03
val isPostviewSupportedBoolean

Whether postview is supported for this extension mode.

A postview is a quickly available, lower-resolution preview of the captured image that can be displayed while the final high-quality capture is processing.

See also
CameraExtensionCharacteristics

#isPostviewSupported

isRestricted

Added in 1.7.0-alpha03
val isRestrictedBoolean

Whether access to some camera characteristics keys is restricted due to camera permissions.

If true, querying restricted keys via get or getOrDefault may return null or default values, matching the behavior of restricted extension modes when CAMERA permission is not granted.

keys

Added in 1.7.0-alpha03
val keysSet<CameraCharacteristics.Key<*>>

The set of camera characteristics keys supported by this camera extension.

See also
CameraExtensionCharacteristics

#getKeys

restrictedKeys

Added in 1.7.0-alpha03
val restrictedKeysSet<CameraCharacteristics.Key<*>>

The set of camera characteristics keys that require specific permissions to be accessed.