Class AgoraVideoFrame

java.lang.Object
io.agora.rtc2.video.AgoraVideoFrame

public class AgoraVideoFrame extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    AlphaStitchMode
    When the video frame contains alpha channel data, it represents the relative position of `alphaBuffer` and the video frame.
    byte[]
    Video frame buffer.
    static final int
    2: The buffer type is array.
    static final int
    1: The buffer type is buffer.
    static final int
    -1: No buffer type.
    static final int
    3: The buffer type is texture.
    int
    Raw data related parameter.
    int
    Raw data related parameter.
    int
    Raw data related parameter.
    int
    Raw data related parameter.
    javax.microedition.khronos.egl.EGLContext
    EGLContext10.
    android.opengl.EGLContext
    EGLContext14.
    int
    The format of the video data: - 10: TEXTURE_2D - 11: TEXTURE_OES, usually the data captured by the camera is in this format.
    static final int
    2: The video format is BGRA.
    static final int
    1: The video format is I420.
    static final int
    16: Video frame in the format of I422.
    static final int
    -1: No video format.
    static final int
    3: The video format is NV21.
    static final int
    4: The video format is RGBA.
    static final int
    10: The video format is TEXTURE_2D.
    static final int
    11: The video format is TEXTURE_OES.
    int
    Height of the incoming video frame.
    int
    Raw data related parameter.
    int
    Line spacing of the incoming video frame, which must be in pixels instead of bytes.
    boolean
    Set whether to enable the synchronization mode.
    int
    Texture ID of the frame.
    long
    Timestamp (ms) of the incoming video frame.
    float[]
    Additional transform of Texture frames.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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_2D
      10: The video format is TEXTURE_2D.
      See Also:
    • FORMAT_TEXTURE_OES

      public static final int FORMAT_TEXTURE_OES
      11: The video format is TEXTURE_OES.
      See Also:
    • FORMAT_I420

      public static final int FORMAT_I420
      1: The video format is I420.
      See Also:
    • FORMAT_BGRA

      public static final int FORMAT_BGRA
      2: The video format is BGRA.
      See Also:
    • FORMAT_NV21

      public static final int FORMAT_NV21
      3: The video format is NV21.
      See Also:
    • FORMAT_RGBA

      public static final int FORMAT_RGBA
      4: The video format is RGBA.
      See Also:
    • FORMAT_I422

      public static final int FORMAT_I422
      16: 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_BUFFER
      1: The buffer type is buffer.
      See Also:
    • BUFFER_TYPE_ARRAY

      public static final int BUFFER_TYPE_ARRAY
      2: The buffer type is array.
      See Also:
    • BUFFER_TYPE_TEXTURE

      public static final int BUFFER_TYPE_TEXTURE
      3: The buffer type is texture.
      See Also:
    • format

      public int 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
    • timeStamp

      public long timeStamp
      Timestamp (ms) of the incoming video frame. An incorrect timestamp results in frame loss or unsynchronized audio and video.
    • stride

      public int 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

      public int height
      Height of the incoming video frame.
    • textureID

      public int textureID
      Texture ID of the frame. This parameter only applies to video data in Texture format.
    • syncMode

      public boolean 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

      public float[] transform
      Additional transform of Texture frames. This parameter only applies to video data in Texture format.
    • eglContext10

      public javax.microedition.khronos.egl.EGLContext eglContext10
      EGLContext10. This parameter only applies to video data in Texture format.
    • eglContext14

      public android.opengl.EGLContext eglContext14
      EGLContext14. This parameter only applies to video data in Texture format.
    • buf

      public byte[] buf
      Video frame buffer.
    • cropLeft

      public int cropLeft
      Raw data related parameter. The number of pixels trimmed from the left. The default value is 0.
    • cropTop

      public int cropTop
      Raw data related parameter. The number of pixels trimmed from the top. The default value is 0.
    • cropRight

      public int cropRight
      Raw data related parameter. The number of pixels trimmed from the right. The default value is 0.
    • cropBottom

      public int cropBottom
      Raw data related parameter. The number of pixels trimmed from the bottom. The default value is 0.
    • rotation

      public int 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.
    • alphaStitchMode

      public AlphaStitchMode alphaStitchMode
      When 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