public class VideoFrame
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.nio.ByteBuffer |
alphaBuffer
Portrait Segmentation meta buffer, dimension of which is the same as
VideoFrame.
|
private int |
alphaMode
The relative position between alphabuffer and the frame.
|
private int |
avsyncType
Audio-video synchronization type.
|
private int |
height
Video pixel height.
|
private float[] |
matrix
[Texture related parameter], Incoming 4 × 4 transformational matrix.
|
private java.nio.ByteBuffer |
metadataBuffer
[Texture related parameter] The MetaData buffer.
|
private long |
renderTimeMs
Timestamp to render the video stream.
|
private int |
rotation
rotation of this frame (0, 90, 180, 270)
|
private java.lang.Object |
sharedContext
[Texture related parameter], egl context.
|
private int |
textureId
[Texture related parameter], Texture ID used by the video frame.
|
private int |
type
Video frame type.
|
private java.nio.ByteBuffer |
uBuffer
U data buffer
|
private int |
uStride
Line span of U buffer in YUV data.
|
private java.nio.ByteBuffer |
vBuffer
V data buffer
|
private int |
vStride
Line span of V buffer in YUV data.
|
private int |
width
Video pixel width.
|
private java.nio.ByteBuffer |
yBuffer
Y data buffer
|
private int |
yStride
Line span of Y buffer in YUV data.
|
| Constructor and Description |
|---|
VideoFrame()
Default constructor.
|
VideoFrame(int type,
int width,
int height,
int yStride,
int uStride,
int vStride,
java.nio.ByteBuffer yBuffer,
java.nio.ByteBuffer uBuffer,
java.nio.ByteBuffer vBuffer,
int rotation,
long renderTimeMs,
int avsyncType,
java.nio.ByteBuffer metadataBuffer,
java.lang.Object sharedContext,
int textureId,
float[] matrix,
java.nio.ByteBuffer alphaBuffer,
int alphaMode)
Constructor with all parameters.
|
| Modifier and Type | Method and Description |
|---|---|
java.nio.ByteBuffer |
getAlphaBuffer()
Gets the portrait segmentation meta buffer.
|
int |
getAlphaMode()
Gets the relative position between alphabuffer and the frame.
|
int |
getAvsyncType()
Gets the audio-video synchronization type.
|
int |
getHeight()
Gets the video pixel height.
|
float[] |
getMatrix()
Gets the incoming 4x4 transformational matrix.
|
java.nio.ByteBuffer |
getMetadataBuffer()
Gets the MetaData buffer (for texture).
|
long |
getRenderTimeMs()
Gets the timestamp to render the video stream.
|
int |
getRotation()
Gets the rotation of this frame.
|
java.lang.Object |
getSharedContext()
Gets the EGL context (for texture).
|
int |
getTextureId()
Gets the texture ID used by the video frame.
|
int |
getType()
Gets the video frame type.
|
java.nio.ByteBuffer |
getUBuffer()
Gets the U data buffer.
|
int |
getUStride()
Gets the line span of U buffer in YUV data.
|
java.nio.ByteBuffer |
getVBuffer()
Gets the V data buffer.
|
int |
getVStride()
Gets the line span of V buffer in YUV data.
|
int |
getWidth()
Gets the video pixel width.
|
java.nio.ByteBuffer |
getYBuffer()
Gets the Y data buffer.
|
int |
getYStride()
Gets the line span of Y buffer in YUV data.
|
void |
setAlphaBuffer(java.nio.ByteBuffer alphaBuffer)
Sets the portrait segmentation meta buffer.
|
void |
setAlphaMode(int alphaMode)
Sets the relative position between alphabuffer and the frame.
|
void |
setAvsyncType(int avsyncType)
Sets the audio-video synchronization type.
|
void |
setHeight(int height)
Sets the video pixel height.
|
void |
setMatrix(float[] matrix)
Sets the incoming 4x4 transformational matrix.
|
void |
setMetadataBuffer(java.nio.ByteBuffer metadataBuffer)
Sets the MetaData buffer (for texture).
|
void |
setRenderTimeMs(long renderTimeMs)
Sets the timestamp to render the video stream.
|
void |
setRotation(int rotation)
Sets the rotation of this frame.
|
void |
setSharedContext(java.lang.Object sharedContext)
Sets the EGL context (for texture).
|
void |
setTextureId(int textureId)
Sets the texture ID used by the video frame.
|
void |
setType(int type)
Sets the video frame type.
|
void |
setUBuffer(java.nio.ByteBuffer uBuffer)
Sets the U data buffer.
|
void |
setUStride(int uStride)
Sets the line span of U buffer in YUV data.
|
void |
setVBuffer(java.nio.ByteBuffer vBuffer)
Sets the V data buffer.
|
void |
setVStride(int vStride)
Sets the line span of V buffer in YUV data.
|
void |
setWidth(int width)
Sets the video pixel width.
|
void |
setYBuffer(java.nio.ByteBuffer yBuffer)
Sets the Y data buffer.
|
void |
setYStride(int yStride)
Sets the line span of Y buffer in YUV data.
|
java.lang.String |
toString() |
private int type
private int width
private int height
private int yStride
private int uStride
private int vStride
private java.nio.ByteBuffer yBuffer
private java.nio.ByteBuffer uBuffer
private java.nio.ByteBuffer vBuffer
private int rotation
private long renderTimeMs
private int avsyncType
private java.nio.ByteBuffer metadataBuffer
private java.lang.Object sharedContext
private int textureId
private float[] matrix
private java.nio.ByteBuffer alphaBuffer
private int alphaMode
public VideoFrame()
public VideoFrame(int type,
int width,
int height,
int yStride,
int uStride,
int vStride,
java.nio.ByteBuffer yBuffer,
java.nio.ByteBuffer uBuffer,
java.nio.ByteBuffer vBuffer,
int rotation,
long renderTimeMs,
int avsyncType,
java.nio.ByteBuffer metadataBuffer,
java.lang.Object sharedContext,
int textureId,
float[] matrix,
java.nio.ByteBuffer alphaBuffer,
int alphaMode)
type - Video frame typewidth - Video pixel widthheight - Video pixel heightyStride - Line span of Y buffer in YUV datauStride - Line span of U buffer in YUV datavStride - Line span of V buffer in YUV datayBuffer - Y data bufferuBuffer - U data buffervBuffer - V data bufferrotation - Rotation of this frame (0, 90, 180, 270)renderTimeMs - Timestamp to render the video streamavsyncType - Audio-video synchronization typemetadataBuffer - MetaData buffer (for texture)sharedContext - EGL context (for texture)textureId - Texture ID used by the video framematrix - Incoming 4x4 transformational matrixalphaBuffer - Portrait Segmentation meta bufferalphaMode - The relative position between alphabuffer and the framepublic int getType()
public void setType(int type)
type - Video frame typepublic int getWidth()
public void setWidth(int width)
width - Video pixel widthpublic int getHeight()
public void setHeight(int height)
height - Video pixel heightpublic int getYStride()
public void setYStride(int yStride)
yStride - Line span of Y bufferpublic int getUStride()
public void setUStride(int uStride)
uStride - Line span of U bufferpublic int getVStride()
public void setVStride(int vStride)
vStride - Line span of V bufferpublic java.nio.ByteBuffer getYBuffer()
public void setYBuffer(java.nio.ByteBuffer yBuffer)
yBuffer - Y data bufferpublic java.nio.ByteBuffer getUBuffer()
public void setUBuffer(java.nio.ByteBuffer uBuffer)
uBuffer - U data bufferpublic java.nio.ByteBuffer getVBuffer()
public void setVBuffer(java.nio.ByteBuffer vBuffer)
vBuffer - V data bufferpublic int getRotation()
public void setRotation(int rotation)
rotation - Rotation of this frame (0, 90, 180, 270)public long getRenderTimeMs()
public void setRenderTimeMs(long renderTimeMs)
renderTimeMs - Timestamp to render the video stream (in milliseconds)public int getAvsyncType()
public void setAvsyncType(int avsyncType)
avsyncType - Audio-video synchronization typepublic java.nio.ByteBuffer getMetadataBuffer()
public void setMetadataBuffer(java.nio.ByteBuffer metadataBuffer)
metadataBuffer - MetaData bufferpublic java.lang.Object getSharedContext()
public void setSharedContext(java.lang.Object sharedContext)
sharedContext - EGL contextpublic int getTextureId()
public void setTextureId(int textureId)
textureId - Texture IDpublic float[] getMatrix()
public void setMatrix(float[] matrix)
matrix - 4x4 transformational matrixpublic java.nio.ByteBuffer getAlphaBuffer()
public void setAlphaBuffer(java.nio.ByteBuffer alphaBuffer)
alphaBuffer - Portrait segmentation meta bufferpublic int getAlphaMode()
public void setAlphaMode(int alphaMode)
alphaMode - Alpha mode (0: Normal frame, 1: Above, 2: Below, 3: Left, 4: Right)public java.lang.String toString()
toString in class java.lang.Object