public class TextureBuffer extends java.lang.Object implements VideoFrame.TextureBuffer, io.agora.base.internal.video.IHandlerReplaceable
VideoFrame.TextureBuffer.ContextType, VideoFrame.TextureBuffer.Type| Constructor and Description |
|---|
TextureBuffer(android.opengl.EGLContext sharedContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
long fenceObject,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback) |
TextureBuffer(android.opengl.EGLContext sharedContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback)
Constructs a new TextureBuffer backed by the given texture id.
|
TextureBuffer(io.agora.base.internal.video.EglBase.Context eglContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
long fenceObject,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback) |
TextureBuffer(io.agora.base.internal.video.EglBase.Context eglContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback) |
TextureBuffer(io.agora.base.internal.video.EglBase.Context eglContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback,
boolean is10bitTexture) |
TextureBuffer(io.agora.base.internal.video.EglBase.Context eglContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback,
io.agora.base.internal.video.TextureBufferPool sourceTexturePool,
long fenceObject,
int sequence,
boolean is10bitTexture)
Constructs a new TextureBuffer backed by the given texture id
|
TextureBuffer(javax.microedition.khronos.egl.EGLContext sharedContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback)
Constructs a new TextureBuffer backed by the given texture id.
|
| Modifier and Type | Method and Description |
|---|---|
VideoFrame.Buffer |
applyNewI420Handler(Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter)
Create a new TextureBuffer with an applied transform toI420Handler and a new yuvConverter.
|
TextureBuffer |
applyNewTextureInfo(VideoFrame.TextureBuffer.Type newType,
int newTextureId,
long newFenceObject,
Matrix newMatrix,
int newWidth,
int newHeight)
Create a new TextureBuffer with a new texture info.
|
TextureBuffer |
applyTransformMatrix(Matrix transformMatrix,
int newWidth,
int newHeight)
Create a new TextureBuffer with an applied transform matrix and a new size.
|
VideoFrame.Buffer |
cropAndScale(int cropX,
int cropY,
int cropWidth,
int cropHeight,
int scaleWidth,
int scaleHeight)
Crops a region defined by |cropx|, |cropY|, |cropWidth| and |cropHeight|.
|
io.agora.base.internal.video.EglBase.Context |
getEglBaseContext()
Retrieve the wrapped eglcontext
EglBase.Context |
int |
getEglContextType() |
long |
getFenceObject() |
int |
getHeight()
Resolution of the buffer in pixels.
|
long |
getNativeEglContext() |
int |
getSequence()
Sequence number managed by texture buffer creator.
|
java.lang.Object |
getSourceTexturePool() |
int |
getTextureId() |
Handler |
getToI420Handler() |
Matrix |
getTransformMatrix()
Retrieve the transform matrix associated with the frame.
|
float[] |
getTransformMatrixArray() |
VideoFrame.TextureBuffer.Type |
getType() |
int |
getWidth()
Resolution of the buffer in pixels.
|
io.agora.base.internal.video.YuvConverter |
getYuvConverter() |
boolean |
is10BitTexture() |
VideoFrame.Buffer |
mirror(int frameRotation)
Apply mirror
|
void |
release()
Decreases ref count by one.
|
void |
retain()
Increases ref count by one.
|
VideoFrame.Buffer |
rotate(int frameRotation)
Apply rotate
|
VideoFrame.I010Buffer |
toI010() |
VideoFrame.I420Buffer |
toI420()
Returns a memory-backed frame in I420 format.
|
VideoFrame.Buffer |
transform(int cropX,
int cropY,
int cropWidth,
int cropHeight,
int scaleWidth,
int scaleHeight,
int rotation)
Apply crop/scale/mirror/rotate
|
TextureBuffer |
withSequence(int sequence) |
public TextureBuffer(javax.microedition.khronos.egl.EGLContext sharedContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback)
sharedContext - egl 1.0 EGLContext javax.microedition.khronos.egl.EGLContextwidth - widthheight - heighttype - texture type TextureBuffer.Typeid - texture idtransformMatrix - the transform matrix associated with the texture idtoI420Handler - nullable, the Handler related to the GL thread which create the
textureyuvConverter - nullable, yuv converter YuvConverterreleaseCallback - nullable, invoked the this buffer released.public TextureBuffer(android.opengl.EGLContext sharedContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback)
sharedContext - egl 1.4 EGLContextt android.opengl.EGLContextwidth - widthheight - heighttype - texture type TextureBuffer.Typeid - texture idtransformMatrix - the transform matrix associated with the texture idtoI420Handler - nullable, the Handler related to the GL thread which create the
textureyuvConverter - nullable, yuv converter YuvConverterreleaseCallback - nullable, invoked the this buffer released.public TextureBuffer(android.opengl.EGLContext sharedContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
long fenceObject,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback)
public TextureBuffer(io.agora.base.internal.video.EglBase.Context eglContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
long fenceObject,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback)
public TextureBuffer(io.agora.base.internal.video.EglBase.Context eglContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback,
boolean is10bitTexture)
public TextureBuffer(io.agora.base.internal.video.EglBase.Context eglContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback)
public TextureBuffer(io.agora.base.internal.video.EglBase.Context eglContext,
int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
Matrix transformMatrix,
Handler toI420Handler,
io.agora.base.internal.video.YuvConverter yuvConverter,
java.lang.Runnable releaseCallback,
io.agora.base.internal.video.TextureBufferPool sourceTexturePool,
long fenceObject,
int sequence,
boolean is10bitTexture)
eglContext - wrapped eglContextwidth - widthheight - heighttype - texture type TextureBuffer.Typeid - texture idtransformMatrix - the transform matrix associated with the texture idtoI420Handler - nullable, the Handler related to the GL thread which create the
textureyuvConverter - nullable, yuv converter YuvConverterreleaseCallback - nullable, invoked the this buffer released.public TextureBuffer withSequence(int sequence)
public VideoFrame.TextureBuffer.Type getType()
getType in interface VideoFrame.TextureBufferpublic int getTextureId()
getTextureId in interface VideoFrame.TextureBufferpublic Matrix getTransformMatrix()
VideoFrame.TextureBuffergetTransformMatrix in interface VideoFrame.TextureBufferpublic io.agora.base.internal.video.EglBase.Context getEglBaseContext()
VideoFrame.TextureBufferEglBase.ContextgetEglBaseContext in interface VideoFrame.TextureBufferpublic java.lang.Object getSourceTexturePool()
getSourceTexturePool in interface VideoFrame.TextureBufferpublic long getNativeEglContext()
getNativeEglContext in interface VideoFrame.TextureBufferpublic int getEglContextType()
getEglContextType in interface VideoFrame.TextureBufferpublic float[] getTransformMatrixArray()
getTransformMatrixArray in interface VideoFrame.TextureBufferpublic int getSequence()
VideoFrame.TextureBuffergetSequence in interface VideoFrame.TextureBufferpublic boolean is10BitTexture()
is10BitTexture in interface VideoFrame.TextureBufferpublic int getWidth()
VideoFrame.BuffergetWidth in interface VideoFrame.Bufferpublic int getHeight()
VideoFrame.BuffergetHeight in interface VideoFrame.Bufferpublic io.agora.base.internal.video.YuvConverter getYuvConverter()
getYuvConverter in interface io.agora.base.internal.video.IHandlerReplaceablepublic Handler getToI420Handler()
getToI420Handler in interface io.agora.base.internal.video.IHandlerReplaceablepublic long getFenceObject()
getFenceObject in interface VideoFrame.TextureBufferpublic VideoFrame.Buffer applyNewI420Handler(Handler toI420Handler, io.agora.base.internal.video.YuvConverter yuvConverter)
applyNewI420Handler in interface io.agora.base.internal.video.IHandlerReplaceablepublic VideoFrame.I420Buffer toI420()
VideoFrame.BuffertoI420 in interface VideoFrame.Bufferpublic VideoFrame.I010Buffer toI010()
toI010 in interface VideoFrame.TextureBufferpublic void retain()
VideoFrame.Bufferretain in interface VideoFrame.Bufferpublic void release()
VideoFrame.Bufferrelease in interface VideoFrame.Bufferpublic VideoFrame.Buffer cropAndScale(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight)
VideoFrame.BuffercropAndScale in interface VideoFrame.Bufferpublic VideoFrame.Buffer mirror(int frameRotation)
VideoFrame.Buffermirror in interface VideoFrame.Bufferpublic VideoFrame.Buffer rotate(int frameRotation)
VideoFrame.Bufferrotate in interface VideoFrame.Bufferpublic VideoFrame.Buffer transform(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight, int rotation)
VideoFrame.Buffertransform in interface VideoFrame.Bufferpublic TextureBuffer applyTransformMatrix(Matrix transformMatrix, int newWidth, int newHeight)
public TextureBuffer applyNewTextureInfo(VideoFrame.TextureBuffer.Type newType, int newTextureId, long newFenceObject, Matrix newMatrix, int newWidth, int newHeight)