Frame

Encoded frame representation

Properties

Link copied to clipboard
abstract val dtsInUs: Long?

Decoded timestamp in µs (not used).

Link copied to clipboard
abstract val extra: Extra?

Gets the csd buffers for key frames and audio frames.

Link copied to clipboard
abstract val format: MediaFormat

Contains frame format.. TODO: to remove

Link copied to clipboard
abstract val isKeyFrame: Boolean

true if frame is a key frame (I-frame for AVC/HEVC and audio frames)

Link copied to clipboard
abstract val ptsInUs: Long

Presentation timestamp in µs

Link copied to clipboard
abstract val rawBuffer: ByteBuffer

Contains an audio or video frame data.

Functions

Link copied to clipboard
abstract fun close()
Link copied to clipboard
fun Frame.copy(rawBuffer: ByteBuffer = this.rawBuffer, ptsInUs: Long = this.ptsInUs, dtsInUs: Long? = this.dtsInUs, isKeyFrame: Boolean = this.isKeyFrame, extra: Extra? = this.extra, format: MediaFormat = this.format, onClosed: (Frame) -> Unit = {}): Frame

Copy a Frame to a new Frame.