NativeCameraDevice

A CameraDevice backed by a CameraX CameraInfo.

Properties

Link copied to clipboard
abstract val cameraInfo: CameraInfo

The CameraX CameraInfo of this device.

Link copied to clipboard

The matching Desk View camera for this Continuity Camera, if available. iOS only.

Link copied to clipboard
abstract val focalLength: Double?

The Camera Device's nominal focal length in 35mm film format, if known.

Link copied to clipboard
abstract val hasFlash: Boolean

Whether this CameraDevice has a physical flash unit. Front-facing devices may still be able to use a screen-flash for photo capture.

Link copied to clipboard
abstract val hasTorch: Boolean

Whether this CameraDevice supports using its flash as a continuous light ("torch").

Link copied to clipboard
abstract val id: String

A unique identifier for this camera device.

Link copied to clipboard

Whether this camera is a Continuity Camera. Always false on Android.

Link copied to clipboard
abstract val isVirtualDevice: Boolean

Whether this CameraDevice is a virtual device, which consists of two or more physical CameraDevices (e.g. the "Triple-Camera" or the "FaceID Camera").

Link copied to clipboard
abstract val lensAperture: Double

The size (ƒ number) of the lens diaphragm.

Link copied to clipboard
abstract val localizedName: String

A user friendly camera name shown by the system.

Link copied to clipboard
abstract val manufacturer: String

The hardware manufacturer name for this device.

Link copied to clipboard
abstract val maxExposureBias: Double

The maximum supported exposure bias (in EV units), or 0 if supportsExposureBias is false.

Link copied to clipboard
abstract val maxTorchStrength: Double

The maximum supported torch strength, or 0 if supportsTorchStrength is false.

Link copied to clipboard

The maximum value a single color-channel gain can be set to, or 0 if white balance can not be locked.

Link copied to clipboard
abstract val maxZoom: Double

The maximum individually supported zoom value of this device. The actual maximum depends on the session configuration, see CameraController.maxZoom.

Link copied to clipboard
abstract val mediaTypes: List<MediaType>

All MediaTypes this CameraDevice can capture. Most Cameras return [VIDEO], virtual Cameras that also support Depth capture return [VIDEO, DEPTH].

Link copied to clipboard
abstract val minExposureBias: Double

The minimum supported exposure bias (in EV units), or 0 if supportsExposureBias is false.

Link copied to clipboard
abstract val minTorchStrength: Double

The minimum supported torch strength, or 0 if supportsTorchStrength is false.

Link copied to clipboard
abstract val minZoom: Double

The minimum individually supported zoom value of this device. The actual minimum depends on the session configuration, see CameraController.minZoom.

Link copied to clipboard
abstract val modelID: String

The model identifier for this camera device.

Link copied to clipboard

If this CameraDevice is a virtual device (see isVirtualDevice), the list of all constituent physical devices it is made of. For physical devices, this is an empty list.

Link copied to clipboard
abstract val position: CameraPosition

The position of this camera on the device.

Link copied to clipboard

All frame rate ranges this CameraDevice supports individually, in FPS.

Link copied to clipboard

All PixelFormats this CameraDevice can stream in.

Link copied to clipboard

All DynamicRanges this CameraDevice supports streaming at (affects Video recordings and Preview).

Link copied to clipboard

Whether this CameraDevice supports distortion correction during Photo capture.

Link copied to clipboard

Whether this CameraDevice supports biasing auto-exposure.

Link copied to clipboard

Whether this CameraDevice supports manual exposure (locking duration and ISO).

Link copied to clipboard

Whether this CameraDevice supports metering auto-exposure (MeteringMode.AE).

Link copied to clipboard

Whether this CameraDevice supports manual focus (locking the lens position).

Link copied to clipboard

Whether this CameraDevice supports metering auto-focus (MeteringMode.AF).

Link copied to clipboard

Whether this CameraDevice supports low-light boost to improve exposure in dark scenes.

Link copied to clipboard

Whether this CameraDevice supports capturing Photos in High Dynamic Range (HDR).

Link copied to clipboard

Whether this CameraDevice supports delivering a preview image before the actual Photo is available.

Link copied to clipboard

Whether this CameraDevice supports smoothly adjusting focus.

Link copied to clipboard

Whether this CameraDevice supports capturing photos with QualityPrioritization.SPEED.

Link copied to clipboard

Whether this CameraDevice supports configuring a custom torch brightness level.

Link copied to clipboard

Whether this CameraDevice supports manual white-balance.

Link copied to clipboard

Whether this CameraDevice supports metering auto-white-balance (MeteringMode.AWB).

Link copied to clipboard
abstract val type: DeviceType

The camera hardware type, for example DeviceType.WIDE_ANGLE.

Link copied to clipboard

If this CameraDevice is a virtual device, the zoom factors at which it may switch to another physical camera (e.g. [1, 3] for a 0.5x/1x/3x Triple-Camera). For physical devices, this is an empty list.

Functions

Link copied to clipboard
abstract fun getSupportedResolutions(outputStreamType: OutputStreamType): List<Size>

All resolutions this CameraDevice can produce for outputs of the given outputStreamType, or an empty list if that stream type can not be streamed to at all.

Link copied to clipboard

Whether the given CameraSessionConfig is supported by this CameraDevice. Configuring a CameraSession with an unsupported config fails.

Link copied to clipboard
abstract fun supportsFPS(fps: Double): Boolean

Whether the given fps is individually supported by any of the supportedFPSRanges.

Link copied to clipboard
abstract fun supportsOutput(output: CameraOutput): Boolean

Whether this CameraDevice supports streaming to the given output.

Link copied to clipboard
abstract fun supportsPreviewStabilizationMode(previewStabilizationMode: TargetStabilizationMode): Boolean

Whether this CameraDevice supports the given stabilization mode for preview streams.

Link copied to clipboard
abstract fun supportsVideoStabilizationMode(videoStabilizationMode: TargetStabilizationMode): Boolean

Whether this CameraDevice supports the given stabilization mode for video streams.