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.os.Handler |
getToI420Handler() |
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.
|
YuvConverter |
getYuvConverter() |
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.TextureBuffer
public int getTextureId()
getTextureId
in interface VideoFrame.TextureBuffer
public android.graphics.Matrix getTransformMatrix()
VideoFrame.TextureBuffer
getTransformMatrix
in interface VideoFrame.TextureBuffer
public int getWidth()
VideoFrame.Buffer
getWidth
in interface VideoFrame.Buffer
public int getHeight()
getHeight
in interface VideoFrame.Buffer
public VideoFrame.I420Buffer toI420()
VideoFrame.Buffer
toI420
in interface VideoFrame.Buffer
public void retain()
RefCounted
retain
in interface RefCounted
retain
in interface VideoFrame.Buffer
public void release()
RefCounted
release
in interface RefCounted
release
in interface VideoFrame.Buffer
public VideoFrame.Buffer cropAndScale(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight)
VideoFrame.Buffer
cropAndScale
in interface VideoFrame.Buffer
public int getUnscaledWidth()
public int getUnscaledHeight()
public android.os.Handler getToI420Handler()
public YuvConverter getYuvConverter()
public TextureBufferImpl applyTransformMatrix(android.graphics.Matrix transformMatrix, int newWidth, int newHeight)
6.0.0