Frame

data class Frame(val rawBuffer: ByteBuffer, var ptsInUs: Long, var dtsInUs: Long? = null, val isKeyFrame: Boolean = false, val format: MediaFormat, val onClosed: (ICloseableFrame) -> Unit = {}) : ICloseableFrame

Frame internal representation.

Constructors

Link copied to clipboard
constructor(rawBuffer: ByteBuffer, ptsInUs: Long, dtsInUs: Long? = null, isKeyFrame: Boolean = false, format: MediaFormat, onClosed: (ICloseableFrame) -> Unit = {})

Properties

Link copied to clipboard

Returns a buffer without prefix csd buffers.

Link copied to clipboard

Decoded timestamp in µs (not used).

Link copied to clipboard

Contains csd buffers for key frames and audio frames only. Could be (SPS, PPS, VPS, etc.) for key video frames, null for non-key video frames. ESDS for AAC frames,...

Link copied to clipboard

Contains frame format..

Link copied to clipboard

Boolean.true if frame is an audio frame.

Link copied to clipboard
val isKeyFrame: Boolean = false

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

Link copied to clipboard

Boolean.true if frame is a video frame.

Link copied to clipboard

Frame mime type

Link copied to clipboard
open override val onClosed: (ICloseableFrame) -> Unit

A callback to call when frame is closed.

Link copied to clipboard

Presentation timestamp in µs

Link copied to clipboard
open override val rawBuffer: ByteBuffer

Contains an audio or video frame data.

Functions

Link copied to clipboard
open override fun close()