MediaBuffer

data class MediaBuffer(val type: MediaType, var index: Int, var payload: ByteBuffer? = null, var timestamp: Long = 0, var sync: Boolean = false)

A media payload and its capture or codec metadata.

Constructors

Link copied to clipboard
constructor(type: MediaType, index: Int, payload: ByteBuffer? = null, timestamp: Long = 0, sync: Boolean = false)

Properties

Link copied to clipboard
var index: Int

The source track identifier for captured audio, or the codec output buffer index for playback.

Link copied to clipboard

The media bytes, or null for surface-backed video. Producers may reuse this storage.

Link copied to clipboard

Whether this is a synchronization frame, such as a video keyframe.

Link copied to clipboard

The presentation timestamp in microseconds for decoded playback; capture sources may use zero.

Link copied to clipboard

Whether the buffer contains audio or video.