Agora Java API Reference for Android
|
Public Member Functions | |
Handler | getHandler () |
EglBase | getEglBase () |
VideoFrame.TextureBuffer | wrapTextureBuffer (int width, int height, VideoFrame.TextureBuffer.Type type, int id, Matrix transformMatrix) |
int | convertToRGBA (TextureBuffer buffer, int rotation) |
boolean | isTextureInUse () |
void | dispose () |
Static Public Member Functions | |
static TextureBufferHelper | create (final String threadName, final EglBase.Context sharedContext) |
|
static |
Construct a new TextureBufferHelper sharing OpenGL resources with |sharedContext|. A dedicated thread and handler is created for handling TextureBuffer. May return null if EGL fails to initialize a pixel buffer surface and make it current.
Handler io.agora.base.TextureBufferHelper.getHandler | ( | ) |
Retrieve the handler. This handler is valid until dispose() is called.
EglBase io.agora.base.TextureBufferHelper.getEglBase | ( | ) |
Retrieve the EglBase instance. This EglBase instance is valid until dispose() is called.
VideoFrame.TextureBuffer io.agora.base.TextureBufferHelper.wrapTextureBuffer | ( | int | width, |
int | height, | ||
VideoFrame.TextureBuffer.Type | type, | ||
int | id, | ||
Matrix | transformMatrix | ||
) |
This can only be called from the |handler| thread.
int io.agora.base.TextureBufferHelper.convertToRGBA | ( | TextureBuffer | buffer, |
int | rotation | ||
) |
This can only be called from the |handler| thread.
buffer | TextureBuffer with type of OES |
rotation | The angle of texture buffer should be rotated |
boolean io.agora.base.TextureBufferHelper.isTextureInUse | ( | ) |
This can only be called from the |handler| thread.
void io.agora.base.TextureBufferHelper.dispose | ( | ) |
Call dispose() to stop receiving frames. OpenGL resources are released and the handler is stopped when the texture frame has been released.