Agora Java API Reference for Android
|
Public Member Functions | |
NV12Buffer (int width, int height, int stride, int sliceHeight, ByteBuffer buffer, @Nullable Runnable releaseCallback) | |
int | getWidth () |
int | getHeight () |
VideoFrame.I420Buffer | toI420 () |
void | retain () |
void | release () |
VideoFrame.Buffer | cropAndScale (int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight) |
VideoFrame.Buffer | mirror (int frameRotation) |
VideoFrame.Buffer | rotate (int frameRotation) |
VideoFrame.Buffer | transform (int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight, int rotation) |
int io.agora.base.NV12Buffer.getWidth | ( | ) |
int io.agora.base.NV12Buffer.getHeight | ( | ) |
VideoFrame.I420Buffer io.agora.base.NV12Buffer.toI420 | ( | ) |
Returns a memory-backed frame in I420 format. If the pixel data is in another format, a conversion will take place. All implementations must provide a fallback to I420 for compatibility with e.g. the internal WebRTC software encoders.
Implements io.agora.base.VideoFrame.Buffer.
void io.agora.base.NV12Buffer.retain | ( | ) |
Increases ref count by one.
Implements io.agora.base.VideoFrame.Buffer.
void io.agora.base.NV12Buffer.release | ( | ) |
Decreases ref count by one. When the ref count reaches zero, resources related to the object will be freed.
Implements io.agora.base.VideoFrame.Buffer.
VideoFrame.Buffer io.agora.base.NV12Buffer.cropAndScale | ( | int | cropX, |
int | cropY, | ||
int | cropWidth, | ||
int | cropHeight, | ||
int | scaleWidth, | ||
int | scaleHeight | ||
) |
Crops a region defined by |cropx|, |cropY|, |cropWidth| and |cropHeight|. Scales it to size |scaleWidth| x |scaleHeight|.
Implements io.agora.base.VideoFrame.Buffer.
VideoFrame.Buffer io.agora.base.NV12Buffer.mirror | ( | int | frameRotation | ) |
Apply mirror
Implements io.agora.base.VideoFrame.Buffer.
VideoFrame.Buffer io.agora.base.NV12Buffer.rotate | ( | int | frameRotation | ) |
Apply rotate
Implements io.agora.base.VideoFrame.Buffer.
VideoFrame.Buffer io.agora.base.NV12Buffer.transform | ( | int | cropX, |
int | cropY, | ||
int | cropWidth, | ||
int | cropHeight, | ||
int | scaleWidth, | ||
int | scaleHeight, | ||
int | frameRotation | ||
) |
Apply crop/scale/mirror/rotate
Implements io.agora.base.VideoFrame.Buffer.