Agora Java API Reference for Android

Public Member Functions | List of all members
io.agora.base.VideoFrame.I420Buffer Interface Reference
Inheritance diagram for io.agora.base.VideoFrame.I420Buffer:

## Public Member Functions
ByteBuffer | getDataY ()
ByteBuffer | getDataU ()
ByteBuffer | getDataV ()
int | getStrideY ()
int | getStrideU ()
int | getStrideV ()
Public Member Functions inherited from io.agora.base.VideoFrame.Buffer
int | getWidth ()
int | getHeight ()
I420Buffer | toI420 ()
void | release ()
void | retain ()
Buffer | cropAndScale (int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight)
Buffer | mirror (int frameRotation)
Buffer | rotate (int frameRotation)
Buffer | transform (int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight, int frameRotation)

## Detailed Description

Interface for I420 buffers.

## Member Function Documentation

## ◆ getDataY()

ByteBuffer io.agora.base.VideoFrame.I420Buffer.getDataY | ( |  | ) |

Returns a direct ByteBuffer containing Y-plane data. The buffer capacity is at least getStrideY() * getHeight() bytes. The position of the returned buffer is ignored and must be 0. Callers may mutate the ByteBuffer (eg. through relative-read operations), so implementations must return a new ByteBuffer or slice for each call.

Implemented in io.agora.base.JavaI420Buffer.

## ◆ getDataU()

ByteBuffer io.agora.base.VideoFrame.I420Buffer.getDataU | ( |  | ) |

Returns a direct ByteBuffer containing U-plane data. The buffer capacity is at least getStrideU() * ((getHeight() + 1) / 2) bytes. The position of the returned buffer is ignored and must be 0. Callers may mutate the ByteBuffer (eg. through relative-read operations), so implementations must return a new ByteBuffer or slice for each call.

Implemented in io.agora.base.JavaI420Buffer.

## ◆ getDataV()

ByteBuffer io.agora.base.VideoFrame.I420Buffer.getDataV | ( |  | ) |

Returns a direct ByteBuffer containing V-plane data. The buffer capacity is at least getStrideV() * ((getHeight() + 1) / 2) bytes. The position of the returned buffer is ignored and must be 0. Callers may mutate the ByteBuffer (eg. through relative-read operations), so implementations must return a new ByteBuffer or slice for each call.

Implemented in io.agora.base.JavaI420Buffer.