Agora Java API Reference for Android
io.agora.rtc.IVideoFrameObserver.VideoFrame Class Reference

Public Member Functions

 VideoFrame (int type, int width, int height, int yStride, int uStride, int vStride, ByteBuffer yBuffer, ByteBuffer uBuffer, ByteBuffer vBuffer, int rotation, long renderTimeMs, int avsync_type)
 
String toString ()
 

Public Attributes

int type
 
int width
 
int height
 
int yStride
 
int uStride
 
int vStride
 
ByteBuffer yBuffer
 
ByteBuffer uBuffer
 
ByteBuffer vBuffer
 
int rotation
 
long renderTimeMs
 
int avsync_type
 

Detailed Description

The VideoFrame class.

Member Data Documentation

◆ type

int io.agora.rtc.IVideoFrameObserver.VideoFrame.type

The color video format. The following values are supported:

  • FRAME_TYPE_YUV420 (0): (Default) YUV 420
  • FRAME_TYPE_YUV422 (1): YUV 422
  • FRAME_TYPE_RGBA (2): RGBA

◆ width

int io.agora.rtc.IVideoFrameObserver.VideoFrame.width

The width (px) of the video.

◆ height

int io.agora.rtc.IVideoFrameObserver.VideoFrame.height

The height (px) of the video.

◆ yStride

int io.agora.rtc.IVideoFrameObserver.VideoFrame.yStride

For YUV data, the line span of the Y buffer; for RGBA data, the total data length.

◆ uStride

int io.agora.rtc.IVideoFrameObserver.VideoFrame.uStride

For YUV data, the line span of the U buffer; for RGBA data, the value is 0.

◆ vStride

int io.agora.rtc.IVideoFrameObserver.VideoFrame.vStride

For YUV data, the line span of the V buffer; for RGBA data, the value is 0.

◆ yBuffer

ByteBuffer io.agora.rtc.IVideoFrameObserver.VideoFrame.yBuffer

For YUV data, the pointer to the Y buffer; for RGBA data, the data buffer.

◆ uBuffer

ByteBuffer io.agora.rtc.IVideoFrameObserver.VideoFrame.uBuffer

For YUV data, the pointer to the U buffer; for RGBA data, the value is 0.

◆ vBuffer

ByteBuffer io.agora.rtc.IVideoFrameObserver.VideoFrame.vBuffer

For YUV data, the pointer to the V buffer; for RGBA data, the value is 0.

◆ rotation

int io.agora.rtc.IVideoFrameObserver.VideoFrame.rotation

The clockwise rotation angle of the video frame. The supported values are 0, 90, 180, or 270 degrees.

◆ renderTimeMs

long io.agora.rtc.IVideoFrameObserver.VideoFrame.renderTimeMs

The Unix timestamp (ms) when the video frame is rendered. This timestamp can be used to guide the rendering of the video frame. This parameter is required.

◆ avsync_type

int io.agora.rtc.IVideoFrameObserver.VideoFrame.avsync_type

Reserved parameter.