DefaultGlFrameProcessor


@ExperimentalApi
@RequiresApi(value = 26)
class DefaultGlFrameProcessor : FrameProcessor


A FrameProcessor implementation that executes a chain of GlTextureFrameConsumers.

Summary

Constants

const String!
KEY_EFFECTS = "KEY_EFFECTS"

Metadata key for storing the List of video effects, in frame metadata

const String!
KEY_FRAME_DISCONTINUITY_NUMBER = "KEY_FRAME_DISCONTINUITY_NUMBER"

Metadata key for storing the frame discontinuity number, in getMetadata and getMetadata.

Public functions

Unit

Blocks until all resources are released.

Boolean

Attempts to queue a List of frames for processing.

Unit

Notifies this processor that the current stream has ended.

Inherited functions

From java.lang.AutoCloseable
abstract Unit

Constants

KEY_EFFECTS

const val KEY_EFFECTS = "KEY_EFFECTS": String!

Metadata key for storing the List of video effects, in frame metadata

KEY_FRAME_DISCONTINUITY_NUMBER

const val KEY_FRAME_DISCONTINUITY_NUMBER = "KEY_FRAME_DISCONTINUITY_NUMBER": String!

Metadata key for storing the frame discontinuity number, in getMetadata and getMetadata.

The number is an integer, incremented every time the player reports a discontinuity (for example, when seeking).

The number is only mandatory for previewing use cases. It is used to trigger flushes in GlShaderProgram implementations during discontinuities.

Public functions

close

fun close(): Unit

Blocks until all resources are released.

queue

fun queue(frames: (Mutable)List<AsyncFrame!>!): Boolean

Attempts to queue a List of frames for processing.

All frames provided in a single invocation of this method represent the exact same point in time.

If this consumer is at capacity, this method returns false and the onWakeup will be invoked when capacity becomes available.

If this method returns true, onFrameProcessed must be called once with every input frame instance queued, once the FrameProcessor has finished processing the frames.

Parameters
frames: (Mutable)List<AsyncFrame!>!

The frames to queue.

Returns
Boolean

true if the frames were queued, false if the consumer is at capacity.

signalEndOfStream

fun signalEndOfStream(): Unit

Notifies this processor that the current stream has ended.

More frames may be queued after calling this method, if the current stream changes.