BackgroundReplacementVideoFrameProcessor

class BackgroundReplacementVideoFrameProcessor @JvmOverloads constructor(logger: Logger, eglCoreFactory: EglCoreFactory, context: Context, var configurations: BackgroundReplacementConfiguration?) : VideoSource, VideoSink

BackgroundReplacementVideoFrameProcessor Draws frames to RGBA, converts to CPU, identifies the foreground person and replaces the background of a video frame.

Parameters

logger

: Logger - Logger to log the data.

eglCoreFactory

: EglCoreFactory - Factory to create EglCore objects to hold EGL state.

context

: Context - Context to create segmentation processor.

configurations

: BackgroundReplacementConfiguration - Image to replace the background with.

Constructors

Link copied to clipboard
constructor(logger: Logger, eglCoreFactory: EglCoreFactory, context: Context, configurations: BackgroundReplacementConfiguration?)

Properties

Link copied to clipboard
open override val contentHint: VideoContentHint

Content hint for downstream processing

Functions

Link copied to clipboard
open override fun addVideoSink(sink: VideoSink)

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

Link copied to clipboard
Link copied to clipboard
open override fun onVideoFrameReceived(frame: VideoFrame)

Receive a video frame from some upstream source. The VideoSink may render, store, process, and forward the frame, among other applications.

Link copied to clipboard
fun release()
Link copied to clipboard
open override fun removeVideoSink(sink: VideoSink)

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