Package tvi.webrtc
Interface VideoFrame.TextureBuffer
- All Superinterfaces:
RefCounted
,VideoFrame.Buffer
- All Known Implementing Classes:
TextureBufferImpl
- Enclosing class:
- VideoFrame
Interface for buffers that are stored as a single texture, either in OES or RGB format.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault VideoFrame.TextureBuffer
applyTransformMatrix
(android.graphics.Matrix transformMatrix, int newWidth, int newHeight) Create a new TextureBufferImpl with an applied transform matrix and a new size.int
android.graphics.Matrix
Retrieve the transform matrix associated with the frame.getType()
default int
Returns the height of the texture in memory.default int
Returns the width of the texture in memory.Methods inherited from interface tvi.webrtc.VideoFrame.Buffer
cropAndScale, getBufferType, getHeight, getWidth, release, retain, toI420
-
Method Details
-
getType
VideoFrame.TextureBuffer.Type getType() -
getTextureId
int getTextureId() -
getTransformMatrix
android.graphics.Matrix getTransformMatrix()Retrieve the transform matrix associated with the frame. This transform matrix maps 2D homogeneous coordinates of the form (s, t, 1) with s and t in the inclusive range [0, 1] to the coordinate that should be used to sample that location from the buffer. -
applyTransformMatrix
default VideoFrame.TextureBuffer applyTransformMatrix(android.graphics.Matrix transformMatrix, int newWidth, int newHeight) Create a new TextureBufferImpl with an applied transform matrix and a new size. The existing buffer is unchanged. The given transform matrix is applied first when texture coordinates are still in the unmodified [0, 1] range. -
getUnscaledWidth
default int getUnscaledWidth()Returns the width of the texture in memory. This should only be used for downscaling, and you should still respect the width from getWidth(). -
getUnscaledHeight
default int getUnscaledHeight()Returns the height of the texture in memory. This should only be used for downscaling, and you should still respect the height from getHeight().
-