Package io.agora.rtc2.video
Class AgoraVideoFrame
java.lang.Object
io.agora.rtc2.video.AgoraVideoFrame
-
Field Summary
FieldsModifier and TypeFieldDescriptionAlphaStitchModeWhen the video frame contains alpha channel data, it represents the relative position of `alphaBuffer` and the video frame.byte[]Video frame buffer.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.intRaw data related parameter.intRaw data related parameter.intRaw data related parameter.intRaw data related parameter.javax.microedition.khronos.egl.EGLContextEGLContext10.android.opengl.EGLContextEGLContext14.intThe format of the video data: - 10: TEXTURE_2D - 11: TEXTURE_OES, usually the data captured by the camera is in this format.static 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.intHeight of the incoming video frame.intRaw data related parameter.intLine spacing of the incoming video frame, which must be in pixels instead of bytes.booleanSet whether to enable the synchronization mode.intTexture ID of the frame.longTimestamp (ms) of the incoming video frame.float[]Additional transform of Texture frames. -
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 formatThe format of the video data: - 10: TEXTURE_2D - 11: TEXTURE_OES, usually the data captured by the camera is in this format. - 1: I420 - 3: NV21 - 4: RGBA - 16: I422 -
timeStamp
public long timeStampTimestamp (ms) of the incoming video frame. An incorrect timestamp results in frame loss or unsynchronized audio and video. -
stride
public int strideLine spacing of the incoming video frame, which must be in pixels instead of bytes. For textures, it is the width of the texture. -
height
public int heightHeight of the incoming video frame. -
textureID
public int textureIDTexture ID of the frame. This parameter only applies to video data in Texture format. -
syncMode
public boolean syncModeSet whether to enable the synchronization mode. After enabling, the SDK waits while Texture processing. This parameter only applies to video data in Texture format. - `true`: Enable sync mode. - `false`: Disable sync mode. -
transform
public float[] transformAdditional transform of Texture frames. This parameter only applies to video data in Texture format. -
eglContext10
public javax.microedition.khronos.egl.EGLContext eglContext10EGLContext10. This parameter only applies to video data in Texture format. -
eglContext14
public android.opengl.EGLContext eglContext14EGLContext14. This parameter only applies to video data in Texture format. -
buf
public byte[] bufVideo frame buffer. -
cropLeft
public int cropLeftRaw data related parameter. The number of pixels trimmed from the left. The default value is 0. -
cropTop
public int cropTopRaw data related parameter. The number of pixels trimmed from the top. The default value is 0. -
cropRight
public int cropRightRaw data related parameter. The number of pixels trimmed from the right. The default value is 0. -
cropBottom
public int cropBottomRaw data related parameter. The number of pixels trimmed from the bottom. The default value is 0. -
rotation
public int rotationRaw data related parameter. The clockwise rotation of the video frame. You can set the rotation angle as 0, 90, 180, or 270. The default value is 0. -
alphaStitchMode
public AlphaStitchMode alphaStitchModeWhen the video frame contains alpha channel data, it represents the relative position of `alphaBuffer` and the video frame. - ALPHA_NO_STITCH 0: (Default) Only video frame, that is, `alphaBuffer` is not stitched with the video frame. - ALPHA_STITCH_UP (1): `alphaBuffer` is above the video frame. - ALPHA_STITCH_BELOW (2): `alphaBuffer` is below the video frame. - ALPHA_STITCH_LEFT (3): `alphaBuffer` is to the left of the video frame. - ALPHA_STITCH_RIGHT (4): `alphaBuffer` is to the right of the video frame.
-
-
Constructor Details
-
AgoraVideoFrame
public AgoraVideoFrame()
-
-
Method Details