Agora Java API Reference for Android
|
Public Member Functions | |
RgbaBuffer (ByteBuffer buffer, int width, int height, Runnable releaseCallback) | |
ByteBuffer | getBuffer () |
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) |
Created by eaglewangy on 24/11/2017.
int io.agora.rtc.gl.RgbaBuffer.getWidth | ( | ) |
Resolution of the buffer in pixels.
Implements io.agora.rtc.gl.VideoFrame.Buffer.
VideoFrame.I420Buffer io.agora.rtc.gl.RgbaBuffer.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.rtc.gl.VideoFrame.Buffer.
void io.agora.rtc.gl.RgbaBuffer.retain | ( | ) |
Reference counting is needed since a video buffer can be shared between multiple VideoSinks, and the buffer needs to be returned to the VideoSource as soon as all references are gone.
Implements io.agora.rtc.gl.VideoFrame.Buffer.
VideoFrame.Buffer io.agora.rtc.gl.RgbaBuffer.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.rtc.gl.VideoFrame.Buffer.