GlShaderProgram.OutputListener


interface GlShaderProgram.OutputListener


Listener for output-related video frame processing events.

This listener can be called from any thread.

Summary

Public functions

Unit

Called when the GlShaderProgram will not produce further output frames belonging to the current output stream.

Unit
onOutputFrameAvailable(
    outputTexture: GlTextureInfo!,
    presentationTimeUs: Long
)

Called when the GlShaderProgram has produced an output frame.

Public functions

onCurrentOutputStreamEnded

fun onCurrentOutputStreamEnded(): Unit

Called when the GlShaderProgram will not produce further output frames belonging to the current output stream. May be called multiple times for one output stream.

onOutputFrameAvailable

fun onOutputFrameAvailable(
    outputTexture: GlTextureInfo!,
    presentationTimeUs: Long
): Unit

Called when the GlShaderProgram has produced an output frame.

After the listener's owner has processed the output frame, it must call releaseOutputFrame. The output frame should be released as soon as possible, as there is no guarantee that the GlShaderProgram will produce further output frames before this output frame is released.

Parameters
outputTexture: GlTextureInfo!

A GlTextureInfo describing the texture containing the output frame.

presentationTimeUs: Long

The presentation timestamp of the output frame, in microseconds.