Camera2Capturer

Constructors

Link copied to clipboard
constructor(context: Context, cameraName: String, eventsHandler: CameraVideoCapturer.CameraEventsHandler)

Inherited functions

Link copied to clipboard
Add MediaRecorder to camera pipeline.
Link copied to clipboard
open fun changeCaptureFormat(width: Int, height: Int, framerate: Int)
Link copied to clipboard
open fun dispose()
Perform any final cleanup here.
Link copied to clipboard
open fun initialize(surfaceTextureHelper: SurfaceTextureHelper, applicationContext: Context, capturerObserver: CapturerObserver)
abstract fun initialize(surfaceTextureHelper: SurfaceTextureHelper, applicationContext: Context, capturerObserver: CapturerObserver)
This function is used to initialize the camera thread, the android application context, and the capture observer.
Link copied to clipboard
open fun isScreencast(): Boolean
Link copied to clipboard
open fun printStackTrace()
Link copied to clipboard
Remove MediaRecorder from camera pipeline.
Link copied to clipboard
open fun startCapture(width: Int, height: Int, framerate: Int)
Start capturing frames in a format that is as close as possible to width x height and framerate.
Link copied to clipboard
open fun stopCapture()
Stop capturing.
Link copied to clipboard
abstract fun switchCamera(switchEventsHandler: CameraVideoCapturer.CameraSwitchHandler)
Switch camera to the next valid camera id.
open fun switchCamera(switchEventsHandler: CameraVideoCapturer.CameraSwitchHandler, cameraName: String)
abstract fun switchCamera(switchEventsHandler: CameraVideoCapturer.CameraSwitchHandler, cameraName: String)
Switch camera to the specified camera id.