add

open fun add(buf: ByteBuffer, flags: Int, ptsUsec: Long)

Adds a new encoded data packet to the buffer.

Parameters

buf

The data. Set position() to the start offset and limit() to position+size. The position and limit may be altered by this method.

flags

MediaCodec.BufferInfo flags.

ptsUsec

Presentation time stamp, in microseconds.