AgoraVideoFrame

The external video frame.

public class AgoraVideoFrame {
                    public static final int FORMAT_NONE = -1;
                    public static final int FORMAT_TEXTURE_2D = 10;
                    public static final int FORMAT_TEXTURE_OES = 11;
                    public static final int FORMAT_I420 = 1;
                    public static final int FORMAT_BGRA = 2;
                    public static final int FORMAT_NV21 = 3;
                    public static final int FORMAT_RGBA = 4;
                    public static final int FORMAT_I422 = 16;
                    public static final int BUFFER_TYPE_NONE = -1;
                    public static final int BUFFER_TYPE_BUFFER = 1;
                    public static final int BUFFER_TYPE_ARRAY = 2;
                    public static final int BUFFER_TYPE_TEXTURE = 3;
                    public int format;
                    public long timeStamp;
                    public int stride;
                    public int height;
                    public int textureID;
                    public boolean syncMode;
                    public float[] transform;
                    public javax.microedition.khronos.egl.EGLContext eglContext11;
                    public android.opengl.EGLContext eglContext14;
                    public byte[] buf;
                    public int cropLeft;
                    public int cropTop;
                    public int cropRight;
                    public int cropBottom;
                    public int rotation;
                    }
Deprecated:
This class is deprecated.

Attributes

format
The 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
buf
Video frame buffer.
This parameter only applies to video data in non-Texture format.
stride
Line spacing of the incoming video frame, which must be in pixels instead of bytes. For textures, it is the width of the texture.
height
Height of the incoming video frame.
textureID
Texture ID of the frame. This parameter only applies to video data in Texture format.
syncMode
Set 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
Additional transform of Texture frames. This parameter only applies to video data in Texture format.
eglContext11
EGLContext11. This parameter only applies to video data in Texture format.
eglContext14
EGLContext14. This parameter only applies to video data in Texture format.
cropLeft
Raw data related parameter. The number of pixels trimmed from the left. The default value is 0.
This parameter only applies to video data in non-Texture format.
cropTop
Raw data related parameter. The number of pixels trimmed from the top. The default value is 0.
This parameter only applies to video data in non-Texture format.
cropRight
Raw data related parameter. The number of pixels trimmed from the right. The default value is 0.
This parameter only applies to video data in non-Texture format.
cropBottom
Raw data related parameter. The number of pixels trimmed from the bottom. The default value is 0.
This parameter only applies to video data in non-Texture format.
rotation
Raw 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.
timestamp
Timestamp (ms) of the incoming video frame. An incorrect timestamp results in frame loss or unsynchronized audio and video.