Camera2Source

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

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
open override val video: VideoScreenObject

The video screen object.

Functions

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

Closes a source.

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

Opens the camera with camera2 api.