Package io.agora.rtc2.video
Class AgoraVideoFrame
java.lang.Object
io.agora.rtc2.video.AgoraVideoFrame
The AgoraVideoFrame class, which defines the format of the external
video source.
-
Field Summary
FieldsModifier and TypeFieldDescriptionAlphaStitchModeThe relative position between alphabuffer and the frame.byte[]The buffer of this frame.static final int2: The buffer type is array.static final int1: The buffer type is buffer.static final int-1: No buffer type.static final int3: The buffer type is texture.intThe number of pixels to crop from the bottom.intThe number of pixels to crop from the left.intThe number of pixels to crop from the right.intThe number of pixels to crop from the top.javax.microedition.khronos.egl.EGLContextEGLContext10.android.opengl.EGLContextEGLContext14.intFormat of the incoming video frame, which must be specified as one of the following: 10: (Default)GL_TEXTURE_2D11:OES, typically from the camera 1:I4203:NV214:RGBAstatic final int2: The video format is BGRA.static final int1: The video format is I420.static final int16: Video frame in the format of I422.static final int-1: No video format.static final int3: The video format is NV21.static final int4: The video format is RGBA.static final int10: The video format is TEXTURE_2D.static final int11: The video format is TEXTURE_OES.intThe height of this frame.intThe rotation information (clockwise) of this frame.intThe stride of this frame, which means the number of pixels between two consecutive rows.booleanDetermines whether to enable the sync mode, which means that the SDK waits while the texture is being processed.intThe ID of the texture.longThe timestamp (ms) of this frame.float[]The extra transform for the texture. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
FORMAT_NONE
public static final int FORMAT_NONE-1: No video format.- See Also:
-
FORMAT_TEXTURE_2D
public static final int FORMAT_TEXTURE_2D10: The video format is TEXTURE_2D.- See Also:
-
FORMAT_TEXTURE_OES
public static final int FORMAT_TEXTURE_OES11: The video format is TEXTURE_OES.- See Also:
-
FORMAT_I420
public static final int FORMAT_I4201: The video format is I420.- See Also:
-
FORMAT_BGRA
public static final int FORMAT_BGRA2: The video format is BGRA.- See Also:
-
FORMAT_NV21
public static final int FORMAT_NV213: The video format is NV21.- See Also:
-
FORMAT_RGBA
public static final int FORMAT_RGBA4: The video format is RGBA.- See Also:
-
FORMAT_I422
public static final int FORMAT_I42216: Video frame in the format of I422.- See Also:
-
BUFFER_TYPE_NONE
public static final int BUFFER_TYPE_NONE-1: No buffer type.- See Also:
-
BUFFER_TYPE_BUFFER
public static final int BUFFER_TYPE_BUFFER1: The buffer type is buffer.- See Also:
-
BUFFER_TYPE_ARRAY
public static final int BUFFER_TYPE_ARRAY2: The buffer type is array.- See Also:
-
BUFFER_TYPE_TEXTURE
public static final int BUFFER_TYPE_TEXTURE3: The buffer type is texture.- See Also:
-
format
public int formatFormat of the incoming video frame, which must be specified as one of the following:- 10: (Default)
GL_TEXTURE_2D - 11:
OES, typically from the camera - 1:
I420 - 3:
NV21 - 4:
RGBA
- 10: (Default)
-
timeStamp
public long timeStampThe timestamp (ms) of this frame. -
stride
public int strideThe stride of this frame, which means the number of pixels between two consecutive rows. -
height
public int heightThe height of this frame. -
textureID
public int textureIDThe ID of the texture. -
syncMode
public boolean syncModeDetermines whether to enable the sync mode, which means that the SDK waits while the texture is being processed. -
transform
public float[] transformThe extra transform for the texture. -
eglContext10
public javax.microedition.khronos.egl.EGLContext eglContext10EGLContext10. -
eglContext14
public android.opengl.EGLContext eglContext14EGLContext14. -
buf
public byte[] bufThe buffer of this frame. -
cropLeft
public int cropLeftThe number of pixels to crop from the left. Typically, set it as 0. -
cropTop
public int cropTopThe number of pixels to crop from the top. Typically, set it as 0. -
cropRight
public int cropRightThe number of pixels to crop from the right. Typically, set it as the value of (stride - width). -
cropBottom
public int cropBottomThe number of pixels to crop from the bottom. Typically, set it as 0. -
rotation
public int rotationThe rotation information (clockwise) of this frame. Set it as 0, 90, 180, or 270. -
alphaStitchMode
public AlphaStitchMode alphaStitchModeThe relative position between alphabuffer and the frame. The default value is AlphaStitchMode.ALPHA_NO_STITCH.
-
-
Constructor Details
-
AgoraVideoFrame
public AgoraVideoFrame()
-
-
Method Details