Agora Java API Reference for Android
|
Public Member Functions | |
TextureBufferImpl (EglBase.Context eglContext, int width, int height, Type type, int id, Matrix transformMatrix, Handler toI420Handler, YuvConverter yuvConverter, Runnable releaseCallback, int sequence) | |
TextureBufferImpl (EglBase.Context eglContext, int width, int height, Type type, int id, Matrix transformMatrix, Handler toI420Handler, YuvConverter yuvConverter, Runnable releaseCallback) | |
Type | getType () |
int | getTextureId () |
Matrix | getTransformMatrix () |
EglBase.Context | getEglBaseContext () |
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.TextureBuffer | rotate (int degrees) |
long | getNativeEglContext () |
int | getEglContextType () |
YuvConverter | getYuvConverter () |
Handler | getToI420Handler () |
float[] | getTransformMatrixArray () |
VideoFrame.Buffer | transform (int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight, int rotation) |
![]() | |
TextureBuffer (@NonNull javax.microedition.khronos.egl.EGLContext sharedContext, int width, int height, Type type, int id, Matrix transformMatrix, @Nullable Handler toI420Handler, @Nullable YuvConverter yuvConverter, @Nullable Runnable releaseCallback) | |
TextureBuffer (@NonNull android.opengl.EGLContext sharedContext, int width, int height, Type type, int id, Matrix transformMatrix, @Nullable Handler toI420Handler, @Nullable YuvConverter yuvConverter, @Nullable Runnable releaseCallback) | |
TextureBuffer (@NonNull EglBase.Context eglContext, int width, int height, Type type, int id, Matrix transformMatrix, @Nullable Handler toI420Handler, @Nullable YuvConverter yuvConverter, @Nullable Runnable releaseCallback) | |
TextureBuffer | applyNewI420Handler ( @NonNull Handler toI420Handler, @NonNull YuvConverter yuvConverter) |
TextureBuffer | applyTransformMatrix (Matrix transformMatrix, int newWidth, int newHeight) |
Android texture buffer that glues together the necessary information together with a generic release callback. ToI420() is implemented by providing a Handler and a YuvConverter.
int io.agora.mediaplayer.gl.TextureBufferImpl.getTextureId | ( | ) |
Reimplemented from io.agora.base.TextureBuffer.
Matrix io.agora.mediaplayer.gl.TextureBufferImpl.getTransformMatrix | ( | ) |
Retrieve the transform matrix associated with the frame. This transform matrix maps 2D homogeneous coordinates of the form (s, t, 1) with s and t in the inclusive range [0, 1] to the coordinate that should be used to sample that location from the buffer.
Reimplemented from io.agora.base.TextureBuffer.
EglBase.Context io.agora.mediaplayer.gl.TextureBufferImpl.getEglBaseContext | ( | ) |
Retrieve the wrapped eglcontext EglBase.Context
Reimplemented from io.agora.base.TextureBuffer.
int io.agora.mediaplayer.gl.TextureBufferImpl.getWidth | ( | ) |
int io.agora.mediaplayer.gl.TextureBufferImpl.getHeight | ( | ) |
VideoFrame.I420Buffer io.agora.mediaplayer.gl.TextureBufferImpl.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.
Reimplemented from io.agora.base.TextureBuffer.
void io.agora.mediaplayer.gl.TextureBufferImpl.retain | ( | ) |
Increases ref count by one.
Reimplemented from io.agora.base.TextureBuffer.
void io.agora.mediaplayer.gl.TextureBufferImpl.release | ( | ) |
Decreases ref count by one. When the ref count reaches zero, resources related to the object will be freed.
Reimplemented from io.agora.base.TextureBuffer.
VideoFrame.Buffer io.agora.mediaplayer.gl.TextureBufferImpl.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|.
Reimplemented from io.agora.base.TextureBuffer.
VideoFrame.Buffer io.agora.mediaplayer.gl.TextureBufferImpl.mirror | ( | int | frameRotation | ) |
Apply mirror
Reimplemented from io.agora.base.TextureBuffer.
VideoFrame.TextureBuffer io.agora.mediaplayer.gl.TextureBufferImpl.rotate | ( | int | frameRotation | ) |
Apply rotate
Reimplemented from io.agora.base.TextureBuffer.
VideoFrame.Buffer io.agora.mediaplayer.gl.TextureBufferImpl.transform | ( | int | cropX, |
int | cropY, | ||
int | cropWidth, | ||
int | cropHeight, | ||
int | scaleWidth, | ||
int | scaleHeight, | ||
int | frameRotation | ||
) |
Apply crop/scale/mirror/rotate
Reimplemented from io.agora.base.TextureBuffer.