Agora Java API Reference for Android
|
Public Member Functions | |
VideoFrame.TextureBuffer | textureCopy (VideoFrame.TextureBuffer textureBuffer, Runnable bufferReleaseCallback) |
VideoFrame.TextureBuffer | textureCopy (final int textureId, final VideoFrame.TextureBuffer.Type type, final int width, final int height, final Matrix transformMatrix, final Runnable bufferReleaseCallback) |
void | dispose () |
Static Public Member Functions | |
static PlayerTextureBufferPool | create (final String threadName, final EglBase.Context sharedContext, final int maxBufferCnt) |
static PlayerTextureBufferPool | createWithinGlThread (String name, int maxBufferCnt, int glPixelFormat, Handler handler, EglBase eglBase, YuvConverter yuvConverter) |
Static Public Attributes | |
static final float[] | IDENTITY_MATRIX |
Texture buffer pool supports copying of a texture to a pre-allocated texture buffer slot in the pool. It should be constructed on a thread with an active EGL context, and all methods must be called with the EGL context active in the calling thread. The function dispose() must be called manually to free the gl resources.
|
static |
Construct a new TextureBufferPool sharing OpenGL resources with |sharedContext|. A dedicated thread and handler is created for handling the texture buffer. May return null if EGL fails to initialize a pixel buffer surface and make it current.
|
static |
Constructed on a thread that has an active EGL context provided by |eglBase|.
VideoFrame.TextureBuffer io.agora.mediaplayer.gl.PlayerTextureBufferPool.textureCopy | ( | VideoFrame.TextureBuffer | textureBuffer, |
Runnable | bufferReleaseCallback | ||
) |
Copy the specified texture buffer to one slot in the pool. Must only be called with EGL context active on current thread, and with |textureBuffer| accessible in the same EGL context.
void io.agora.mediaplayer.gl.PlayerTextureBufferPool.dispose | ( | ) |
OpenGL resources are released and the handler is stopped when all the texture buffer has been returned.
|
static |
Identity matrix for general use. Don't modify or life will get weird.