copy

fun RawFrame.copy(rawBuffer: ByteBuffer = this.rawBuffer, timestampInUs: Long = this.timestampInUs, onClosed: (RawFrame) -> Unit = {}): RawFrame(source)

Copy a RawFrame to a new RawFrame.

For better memory allocation, you should close the returned frame after usage.


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(source)

Copy a Frame to a new Frame.

For better memory allocation, you should close the returned frame after usage.