Agora Java API Reference for Android
|
Inherited by io.agora.rtc.mediaio.IVideoSink.
Public Member Functions | |
void | consumeByteBufferFrame (ByteBuffer buffer, int format, int width, int height, int rotation, long timestamp) |
void | consumeByteArrayFrame (byte[] data, int format, int width, int height, int rotation, long timestamp) |
void | consumeTextureFrame (int textureId, int format, int width, int height, int rotation, long timestamp, float[] matrix) |
The IVideoFrameConsumer class.
The SDK uses it to receive the video frame that you capture.
Supports video data in three buffer types: Byte buffer type, byte array frame type, and texture frame type. Call the getBufferType
method to specify a buffer type. The video data can only be transmitted in the corresponding type.
void io.agora.rtc.mediaio.IVideoFrameConsumer.consumeByteBufferFrame | ( | ByteBuffer | buffer, |
int | format, | ||
int | width, | ||
int | height, | ||
int | rotation, | ||
long | timestamp | ||
) |
Receives the video frame in a byte buffer.
buffer | Video in the format of ByteBuffer. |
format | Pixel format of the video frame: |
width | Width of the video frame. |
height | Height of the video frame. |
rotation | Clockwise rotating angle (0, 90, 180, and 270 degrees) of the video frame. |
timestamp | Timestamp of the video frame. For each video frame, you need to set a timestamp. |
void io.agora.rtc.mediaio.IVideoFrameConsumer.consumeByteArrayFrame | ( | byte[] | data, |
int | format, | ||
int | width, | ||
int | height, | ||
int | rotation, | ||
long | timestamp | ||
) |
Receives the video frame in a byte array.
data | Video in the format of ByteArray. |
format | Pixel format of the video frame: |
width | Width of the video frame. |
height | Height of the video frame. |
rotation | Clockwise rotating angle (0, 90, 180, and 270 degrees) of the video frame. |
timestamp | Timestamp of the video frame. For each video frame, you need to set a timestamp. |
The SDK does not support the alpha channel, and discards any alpha value passed to the SDK.
void io.agora.rtc.mediaio.IVideoFrameConsumer.consumeTextureFrame | ( | int | textureId, |
int | format, | ||
int | width, | ||
int | height, | ||
int | rotation, | ||
long | timestamp, | ||
float[] | matrix | ||
) |
Receives the video frame in texture.
textureId | ID of the texture. |
format | Pixel format of the video frame: |
width | Width of the video frame. |
height | Height of the video frame. |
rotation | Clockwise rotating angle (0, 90, 180, and 270 degrees) of the video frame. |
timestamp | Timestamp of the video frame. For each video frame, you need to set a timestamp. |
matrix | Matrix of the texture. The float value is between 0 and 1, such as 0.1, 0.2, and so on. |