Class AgoraVideoFrame

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

public class AgoraVideoFrame extends Object
The AgoraVideoFrame class, which defines the format of the external video source.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    AlphaStitchMode
    The relative position between alphabuffer and the frame.
    byte[]
    The buffer of this frame.
    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
    The number of pixels to crop from the bottom.
    int
    The number of pixels to crop from the left.
    int
    The number of pixels to crop from the right.
    int
    The number of pixels to crop from the top.
    javax.microedition.khronos.egl.EGLContext
    EGLContext10.
    android.opengl.EGLContext
    EGLContext14.
    int
    Format 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
    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
    The height of this frame.
    int
    The rotation information (clockwise) of this frame.
    int
    The stride of this frame, which means the number of pixels between two consecutive rows.
    boolean
    Determines whether to enable the sync mode, which means that the SDK waits while the texture is being processed.
    int
    The ID of the texture.
    long
    The timestamp (ms) of this frame.
    float[]
    The extra transform for the texture.
  • 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
      Format of the incoming video frame, which must be specified as one of the following:
    • timeStamp

      public long timeStamp
      The timestamp (ms) of this frame.
    • stride

      public int stride
      The stride of this frame, which means the number of pixels between two consecutive rows.
    • height

      public int height
      The height of this frame.
    • textureID

      public int textureID
      The ID of the texture.
    • syncMode

      public boolean syncMode
      Determines whether to enable the sync mode, which means that the SDK waits while the texture is being processed.
    • transform

      public float[] transform
      The extra transform for the texture.
    • eglContext10

      public javax.microedition.khronos.egl.EGLContext eglContext10
      EGLContext10.
    • eglContext14

      public android.opengl.EGLContext eglContext14
      EGLContext14.
    • buf

      public byte[] buf
      The buffer of this frame.
    • cropLeft

      public int cropLeft
      The number of pixels to crop from the left. Typically, set it as 0.
    • cropTop

      public int cropTop
      The number of pixels to crop from the top. Typically, set it as 0.
    • cropRight

      public int cropRight
      The number of pixels to crop from the right. Typically, set it as the value of (stride - width).
    • cropBottom

      public int cropBottom
      The number of pixels to crop from the bottom. Typically, set it as 0.
    • rotation

      public int rotation
      The rotation information (clockwise) of this frame. Set it as 0, 90, 180, or 270.
    • alphaStitchMode

      public AlphaStitchMode alphaStitchMode
      The relative position between alphabuffer and the frame. The default value is AlphaStitchMode.ALPHA_NO_STITCH.
  • Constructor Details

    • AgoraVideoFrame

      public AgoraVideoFrame()
  • Method Details