amazon-chime-sdk / com.amazonaws.services.chime.sdk.meetings.audiovideo.video.capture / DefaultSurfaceTextureCaptureSource

DefaultSurfaceTextureCaptureSource

class DefaultSurfaceTextureCaptureSource : SurfaceTextureCaptureSource

DefaultSurfaceTextureCaptureSource will provide a Surface which it will listen to and convert to VideoFrameTextureBuffer objects

Constructors

<init>

DefaultSurfaceTextureCaptureSource will provide a Surface which it will listen to and convert to VideoFrameTextureBuffer objects

DefaultSurfaceTextureCaptureSource(logger: Logger, width: Int, height: Int, contentHint: VideoContentHint = VideoContentHint.None, eglCoreFactory: EglCoreFactory)

Properties

contentHint

Content hint for downstream processing

val contentHint: VideoContentHint

minFps

Setting this to a positive value will lead the source to resend previously captured frames as necessary to approximately maintain the set value.

var minFps: Int

surface

Surface from which any buffers submitted to will be emitted as a VideoFrame. User must call start to start listening, and stop will likewise stop listening.

lateinit var surface: Surface

Functions

addCaptureSourceObserver

Add a capture source observer to receive callbacks from the source on lifecycle events which can be used to trigger UI. This observer is entirely optional.

fun addCaptureSourceObserver(observer: CaptureSourceObserver): Unit

addVideoSink

Add a video sink which will immediately begin to receive new frames.

fun addVideoSink(sink: VideoSink): Unit

release

Deallocate any state or resources held by this object. Not possible to reuse after call. Surface will have been released.

fun release(): Unit

removeCaptureSourceObserver

Remove a capture source observer

fun removeCaptureSourceObserver(observer: CaptureSourceObserver): Unit

removeVideoSink

Remove a video sink which will no longer receive new frames on return

fun removeVideoSink(sink: VideoSink): Unit

setMaxResolution

Set max resolution for video capture source DefaultCameraCaptureSource and DefaultScreenCaptureSource call this function to set max resolution for camera and screen capture

fun setMaxResolution(maxResolution: VideoResolution): Unit

start

Start capturing on this source and emitting video frames

fun start(): Unit

stop

Stop capturing on this source and cease emitting video frames

fun stop(): Unit