public class TextureBufferImpl extends java.lang.Object implements VideoFrame.TextureBuffer
VideoFrame.TextureBuffer.Type| Constructor and Description |
|---|
TextureBufferImpl(int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
android.graphics.Matrix transformMatrix,
android.os.Handler toI420Handler,
YuvConverter yuvConverter,
java.lang.Runnable releaseCallback) |
| Modifier and Type | Method and Description |
|---|---|
TextureBufferImpl |
applyTransformMatrix(android.graphics.Matrix transformMatrix,
int newWidth,
int newHeight)
Create a new TextureBufferImpl 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|.
|
int |
getHeight() |
int |
getTextureId() |
android.graphics.Matrix |
getTransformMatrix()
Retrieve the transform matrix associated with the frame.
|
VideoFrame.TextureBuffer.Type |
getType() |
int |
getUnscaledHeight()
Returns the height of the texture in memory.
|
int |
getUnscaledWidth()
Returns the width of the texture in memory.
|
int |
getWidth()
Resolution of the buffer in pixels.
|
void |
release()
Decreases ref count by one.
|
void |
retain()
Increases ref count by one.
|
VideoFrame.I420Buffer |
toI420()
Returns a memory-backed frame in I420 format.
|
public TextureBufferImpl(int width,
int height,
VideoFrame.TextureBuffer.Type type,
int id,
android.graphics.Matrix transformMatrix,
android.os.Handler toI420Handler,
YuvConverter yuvConverter,
@Nullable
java.lang.Runnable releaseCallback)
public VideoFrame.TextureBuffer.Type getType()
getType in interface VideoFrame.TextureBufferpublic int getTextureId()
getTextureId in interface VideoFrame.TextureBufferpublic android.graphics.Matrix getTransformMatrix()
VideoFrame.TextureBuffergetTransformMatrix in interface VideoFrame.TextureBufferpublic int getWidth()
VideoFrame.BuffergetWidth in interface VideoFrame.Bufferpublic int getHeight()
getHeight in interface VideoFrame.Bufferpublic VideoFrame.I420Buffer toI420()
VideoFrame.BuffertoI420 in interface VideoFrame.Bufferpublic void retain()
RefCountedretain in interface RefCountedretain in interface VideoFrame.Bufferpublic void release()
RefCountedrelease in interface RefCountedrelease 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 int getUnscaledWidth()
public int getUnscaledHeight()
public TextureBufferImpl applyTransformMatrix(android.graphics.Matrix transformMatrix, int newWidth, int newHeight)