amazon-chime-sdk / com.amazonaws.services.chime.sdk.meetings.audiovideo.video.buffer / VideoFrameI420Buffer

VideoFrameI420Buffer

class VideoFrameI420Buffer : VideoFrameBuffer

VideoFrameI420Buffer provides an reference counted wrapper of a YUV where planes are natively (i.e. in JNI) allocated direct byte buffers.

Constructors

<init>

VideoFrameI420Buffer provides an reference counted wrapper of a YUV where planes are natively (i.e. in JNI) allocated direct byte buffers.

VideoFrameI420Buffer(width: Int, height: Int, dataY: ByteBuffer, dataU: ByteBuffer, dataV: ByteBuffer, strideY: Int, strideU: Int, strideV: Int, releaseCallback: Runnable)

Properties

dataU

U plane data of video frame in memory. This must be a natively allocated direct byte buffer so that it can be passed to native code

val dataU: ByteBuffer

dataV

V plane data of video frame in memory. This must be a natively allocated direct byte buffer so that it can be passed to native code

val dataV: ByteBuffer

dataY

Y plane data of video frame in memory. This must be a natively allocated direct byte buffer that it can be passed to native code

val dataY: ByteBuffer

height

Height of the video frame buffer

val height: Int

strideU

Stride of U plane of video frame

val strideU: Int

strideV

Stride of V plane of video frame

val strideV: Int

strideY

Stride of Y plane of video frame

val strideY: Int

width

Width of the video frame buffer

val width: Int

Functions

release

Release the video frame buffer. Use after frame construction or release after the frame is no longer needed. Will trigger appropriate release of any internally allocated resources. Not using may result in leaks.

fun release(): Unit

retain

Retain the video frame buffer. Use when shared ownership of the buffer is desired (e.g. when passing to separate thread), otherwise the frame may be spuriously released

fun retain(): Unit