Camera2Source

class Camera2Source(context: Context, val cameraId: String = DEFAULT_CAMERA_ID) : VideoSource

A video source that captures a camera by the Camera2 API.

Constructors

Link copied to clipboard
constructor(context: Context, cameraId: String = DEFAULT_CAMERA_ID)

Properties

Link copied to clipboard
Link copied to clipboard

The orientation of the video image.

Link copied to clipboard
Link copied to clipboard
open override var surface: Surface?

The surface used as the output destination for video frames.

Link copied to clipboard
open override var videoSize: Size

The resolution of the video frames produced by this source.

Functions

Link copied to clipboard
open suspend override fun close(): Result<Unit>

Closes a source.

Link copied to clipboard
open suspend override fun open(mixer: MediaMixer): Result<Unit>

Opens the camera with camera2 api.