Agora Java API Reference for Android
Public Member Functions | List of all members
io.agora.rtc.mediaio.VideoFrameConsumerImpl Class Reference
Inheritance diagram for io.agora.rtc.mediaio.VideoFrameConsumerImpl:
io.agora.rtc.mediaio.IVideoFrameConsumer

Public Member Functions

 VideoFrameConsumerImpl (long nativeHandle)
 
void consumeByteBufferFrame (ByteBuffer buffer, int format, int width, int height, int rotation, long ts)
 
void consumeByteArrayFrame (byte[] data, int format, int width, int height, int rotation, long ts)
 
void consumeTextureFrame (int texId, int format, int width, int height, int rotation, long ts, float[] matrix)
 
native void provideByteArrayFrame (long nativeHandle, byte[] data, int format, int width, int height, int rotation, long ts)
 
native void provideTextureFrame (long nativeHandle, Object sharedContext, int texId, int format, int width, int height, int rotation, long ts, float[] matrix)
 
native void provideByteBufferFrame (long nativeHandle, ByteBuffer buffer, int format, int width, int height, int rotation, long ts)
 

Member Function Documentation

◆ consumeByteBufferFrame()

void io.agora.rtc.mediaio.VideoFrameConsumerImpl.consumeByteBufferFrame ( ByteBuffer  buffer,
int  format,
int  width,
int  height,
int  rotation,
long  timestamp 
)

Receives the video frame in a byte buffer.

Parameters
bufferVideo in the format of ByteBuffer
formatPixel format of the video frame:
widthWidth of the video frame
heightHeight of the video frame
rotationClockwise rotating angle (0, 90, 180, and 270 degrees) of the video frame
timestampTimestamp of the video frame. For each video frame, you need to set a timestamp

Implements io.agora.rtc.mediaio.IVideoFrameConsumer.

◆ consumeByteArrayFrame()

void io.agora.rtc.mediaio.VideoFrameConsumerImpl.consumeByteArrayFrame ( byte []  data,
int  format,
int  width,
int  height,
int  rotation,
long  timestamp 
)

Receives the video frame in a byte array.

Parameters
dataVideo in the format of ByteArray
formatPixel format of the video frame:
widthWidth of the video frame
heightHeight of the video frame
rotationClockwise rotating angle (0, 90, 180, and 270 degrees) of the video frame
timestampTimestamp of the video frame. For each video frame, you need to set a timestamp

Implements io.agora.rtc.mediaio.IVideoFrameConsumer.

◆ consumeTextureFrame()

void io.agora.rtc.mediaio.VideoFrameConsumerImpl.consumeTextureFrame ( int  textureId,
int  format,
int  width,
int  height,
int  rotation,
long  timestamp,
float []  matrix 
)

Receives the video frame in texture.

Parameters
textureIdID of the texture
formatPixel format of the video frame:
widthWidth of the video frame
heightHeight of the video frame
rotationClockwise rotating angle (0, 90, 180, and 270 degrees) of the video frame
timestampTimestamp of the video frame. For each video frame, you need to set a timestamp
matrixMatrix of the texture. The float value is between 0 and 1, such as 0.1, 0.2, and so on

Implements io.agora.rtc.mediaio.IVideoFrameConsumer.