public class TextureBufferHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
int |
convertToRGBA(TextureBuffer buffer,
int rotation)
This can only be called from the |handler| thread.
|
static TextureBufferHelper |
create(java.lang.String threadName,
io.agora.base.internal.video.EglBase.Context sharedContext)
Construct a new TextureBufferHelper sharing OpenGL resources with |sharedContext|.
|
void |
dispose()
Call dispose() to stop receiving frames.
|
io.agora.base.internal.video.EglBase |
getEglBase()
Retrieve the EglBase instance.
|
Handler |
getHandler()
Retrieve the handler.
|
<V> V |
invoke(java.util.concurrent.Callable<V> callable)
Post |callable| to be executed on the |handler| thread and wait for the result.
|
boolean |
isTextureInUse()
This can only be called from the |handler| thread.
|
java.nio.ByteBuffer |
parseAlphaData(TextureBuffer buffer,
int rotation,
boolean mirror) |
VideoFrame.TextureBuffer |
wrapTextureBuffer(int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
long fenceObject,
Matrix transformMatrix) |
VideoFrame.TextureBuffer |
wrapTextureBuffer(int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix)
This can only be called from the |handler| thread.
|
public static TextureBufferHelper create(java.lang.String threadName, io.agora.base.internal.video.EglBase.Context sharedContext)
public Handler getHandler()
public io.agora.base.internal.video.EglBase getEglBase()
public <V> V invoke(java.util.concurrent.Callable<V> callable)
public VideoFrame.TextureBuffer wrapTextureBuffer(int width, int height, VideoFrame.TextureBuffer.Type type, int id, Matrix transformMatrix)
public VideoFrame.TextureBuffer wrapTextureBuffer(int width, int height, VideoFrame.TextureBuffer.Type type, int id, long fenceObject, Matrix transformMatrix)
public int convertToRGBA(TextureBuffer buffer, int rotation)
buffer
- TextureBuffer with type of OESrotation
- The angle of texture buffer should be rotatedpublic java.nio.ByteBuffer parseAlphaData(TextureBuffer buffer, int rotation, boolean mirror)
public boolean isTextureInUse()
public void dispose()