VideoCompositor
@UnstableApi
interface VideoCompositor : GlTextureProducer
DefaultVideoCompositor |
A basic |
Interface for a video compositor that combines frames from multiple input sources to produce output frames.
Input and output are provided via OpenGL textures.
Methods may be called from any thread.
Summary
Nested types |
|---|
interface VideoCompositor.ListenerListener for errors. |
Public functions |
|
|---|---|
Unit |
queueInputTexture(Queues an input texture to be composited. |
Unit |
registerInputSource(inputIndex: Int)Registers a new input source. |
Unit |
release()Releases all resources. |
Unit |
setVideoCompositorSettings(Sets the |
Unit |
signalEndOfInputSource(inputIndex: Int)Signals that no more frames will come from the upstream |
Inherited functions |
||
|---|---|---|
|
Public functions
queueInputTexture
fun queueInputTexture(
inputIndex: Int,
textureProducer: GlTextureProducer!,
inputTexture: GlTextureInfo!,
colorInfo: ColorInfo!,
presentationTimeUs: Long
): Unit
Queues an input texture to be composited.
| Parameters | |
|---|---|
inputIndex: Int |
The index of the input source, the same index used when |
textureProducer: GlTextureProducer! |
The source from where the |
inputTexture: GlTextureInfo! |
The |
colorInfo: ColorInfo! |
The |
presentationTimeUs: Long |
The presentation time of |
registerInputSource
fun registerInputSource(inputIndex: Int): Unit
Registers a new input source.
| Parameters | |
|---|---|
inputIndex: Int |
The index of the input source which could be used to determine the order of the input sources. The same index should to be used in |
release
fun release(): Unit
Releases all resources.
This VideoCompositor instance must not be used after this method is called.
setVideoCompositorSettings
fun setVideoCompositorSettings(
videoCompositorSettings: VideoCompositorSettings!
): Unit
Sets the VideoCompositorSettings to apply to inputs.
signalEndOfInputSource
fun signalEndOfInputSource(inputIndex: Int): Unit
Signals that no more frames will come from the upstream GlTextureProducer.Listener.
| Parameters | |
|---|---|
inputIndex: Int |
The index of the input source. |