io.agora.rtc

## Class EncodedVideoFrameInfo

- java.lang.Object
- - io.agora.rtc.EncodedVideoFrameInfo

-     public class EncodedVideoFrameInfo
      extends java.lang.Object

  Information about an encoded video frame.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private long` | `captureTimeMs` This is a input parameter which means the timestamp for capturing the video.
    `private int` | `codecType` The video codec: #VIDEO_CODEC_TYPE.
    `private long` | `decodeTimeMs` The timestamp for rendering the video.
    `private int` | `framesPerSecond` The number of video frames per second.
    `private int` | `frameType` The frame type of the encoded video frame: #VIDEO_FRAME_TYPE.
    `private int` | `height` The height (px) of the video.
    `private long` | `presentationMs` The presentation timestamp (PTS) of the video frame (ms).
    `private int` | `rotation` The rotation information of the encoded video frame: #VIDEO_ORIENTATION.
    `private int` | `streamType` The stream type of video frame.
    `private int` | `trackId` This can be reserved for multiple video tracks, we need to create different ssrc and additional payload for later implementation.
    `private int` | `uid` ID of the user.
    `private int` | `width` The width (px) of the video.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncodedVideoFrameInfo()` Default constructor for EncodedVideoFrameInfo.
    `EncodedVideoFrameInfo(int codecType, int width, int height, int framesPerSecond, int frameType, int rotation, int trackId, long captureTimeMs, long renderTimeMs, int uid, int streamType, long presentationMs)` Constructs EncodedVideoFrameInfo with all parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getCaptureTimeMs()` Gets the timestamp for capturing the video.
    `int` | `getCodecType()` Gets the video codec type.
    `long` | `getDecodeTimeMs()` Gets the timestamp for rendering the video.
    `int` | `getFramesPerSecond()` Gets the number of video frames per second.
    `int` | `getFrameType()` Gets the frame type of the encoded video frame.
    `int` | `getHeight()` Gets the height (px) of the video.
    `long` | `getPresentationMs()` Gets the presentation timestamp (PTS) of the video frame (ms).
    `int` | `getRotation()` Gets the rotation information of the encoded video frame.
    `int` | `getStreamType()` Gets the stream type of video frame.
    `int` | `getTrackId()` Gets the track ID.
    `int` | `getUid()` Gets the ID of the user.
    `int` | `getWidth()` Gets the width (px) of the video.
    `void` | `setCaptureTimeMs(long captureTimeMs)` Sets the timestamp for capturing the video.
    `void` | `setCodecType(int codecType)` Sets the video codec type.
    `void` | `setDecodeTimeMs(long decodeTimeMs)` Sets the timestamp for rendering the video.
    `void` | `setFramesPerSecond(int framesPerSecond)` Sets the number of video frames per second.
    `void` | `setFrameType(int frameType)` Sets the frame type of the encoded video frame.
    `void` | `setHeight(int height)` Sets the height (px) of the video.
    `void` | `setPresentationMs(long presentationMs)` Sets the presentation timestamp (PTS) of the video frame (ms).
    `void` | `setRotation(int rotation)` Sets the rotation information of the encoded video frame.
    `void` | `setStreamType(int streamType)` Sets the stream type of video frame.
    `void` | `setTrackId(int trackId)` Sets the track ID.
    `void` | `setUid(int uid)` Sets the ID of the user.
    `void` | `setWidth(int width)` Sets the width (px) of the video.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### codecType

          private int codecType

      The video codec: #VIDEO_CODEC_TYPE.

    - #### width

          private int width

      The width (px) of the video.

    - #### height

          private int height

      The height (px) of the video.

    - #### framesPerSecond

          private int framesPerSecond

      The number of video frames per second. This value will be used for calculating timestamps of the encoded image. If framesPerSecond equals zero, then real timestamp will be used. Otherwise, timestamp will be adjusted to the value of framesPerSecond set.

    - #### frameType

          private int frameType

      The frame type of the encoded video frame: #VIDEO_FRAME_TYPE.

    - #### rotation

          private int rotation

      The rotation information of the encoded video frame: #VIDEO_ORIENTATION.

    - #### trackId

          private int trackId

      This can be reserved for multiple video tracks, we need to create different ssrc and additional payload for later implementation.

    - #### captureTimeMs

          private long captureTimeMs

      This is a input parameter which means the timestamp for capturing the video.

    - #### decodeTimeMs

          private long decodeTimeMs

      The timestamp for rendering the video.

    - #### uid

          private int uid

      ID of the user.

    - #### streamType

          private int streamType

      The stream type of video frame.

    - #### presentationMs

          private long presentationMs

      The presentation timestamp (PTS) of the video frame (ms).

  - ### Constructor Detail

    - #### EncodedVideoFrameInfo

          public EncodedVideoFrameInfo()

      Default constructor for EncodedVideoFrameInfo.

    - #### EncodedVideoFrameInfo

          public EncodedVideoFrameInfo(int codecType,
                                       int width,
                                       int height,
                                       int framesPerSecond,
                                       int frameType,
                                       int rotation,
                                       int trackId,
                                       long captureTimeMs,
                                       long renderTimeMs,
                                       int uid,
                                       int streamType,
                                       long presentationMs)

      Constructs EncodedVideoFrameInfo with all parameters.
      Parameters:
        `codecType` - The video codec type
        `width` - The width (px) of the video
        `height` - The height (px) of the video
        `framesPerSecond` - The number of video frames per second
        `frameType` - The frame type of the encoded video frame
        `rotation` - The rotation information of the encoded video frame
        `trackId` - The track ID
        `captureTimeMs` - The timestamp for capturing the video
        `renderTimeMs` - The timestamp for rendering the video
        `uid` - ID of the user
        `streamType` - The stream type of video frame
        `presentationMs` - The presentation timestamp (PTS) of the video frame (ms)

  - ### Method Detail

    - #### getCodecType

          public int getCodecType()

      Gets the video codec type.
      Returns:
        The video codec type

    - #### setCodecType

          public void setCodecType(int codecType)

      Sets the video codec type.
      Parameters:
        `codecType` - The video codec type

    - #### getWidth

          public int getWidth()

      Gets the width (px) of the video.
      Returns:
        The width (px) of the video

    - #### setWidth

          public void setWidth(int width)

      Sets the width (px) of the video.
      Parameters:
        `width` - The width (px) of the video

    - #### getHeight

          public int getHeight()

      Gets the height (px) of the video.
      Returns:
        The height (px) of the video

    - #### setHeight

          public void setHeight(int height)

      Sets the height (px) of the video.
      Parameters:
        `height` - The height (px) of the video

    - #### getFramesPerSecond

          public int getFramesPerSecond()

      Gets the number of video frames per second.
      Returns:
        The number of video frames per second

    - #### setFramesPerSecond

          public void setFramesPerSecond(int framesPerSecond)

      Sets the number of video frames per second.
      Parameters:
        `framesPerSecond` - The number of video frames per second

    - #### getFrameType

          public int getFrameType()

      Gets the frame type of the encoded video frame.
      Returns:
        The frame type of the encoded video frame

    - #### setFrameType

          public void setFrameType(int frameType)

      Sets the frame type of the encoded video frame.
      Parameters:
        `frameType` - The frame type of the encoded video frame

    - #### getRotation

          public int getRotation()

      Gets the rotation information of the encoded video frame.
      Returns:
        The rotation information of the encoded video frame

    - #### setRotation

          public void setRotation(int rotation)

      Sets the rotation information of the encoded video frame.
      Parameters:
        `rotation` - The rotation information of the encoded video frame

    - #### getTrackId

          public int getTrackId()

      Gets the track ID.
      Returns:
        The track ID

    - #### setTrackId

          public void setTrackId(int trackId)

      Sets the track ID.
      Parameters:
        `trackId` - The track ID

    - #### getCaptureTimeMs

          public long getCaptureTimeMs()

      Gets the timestamp for capturing the video.
      Returns:
        The timestamp for capturing the video

    - #### setCaptureTimeMs

          public void setCaptureTimeMs(long captureTimeMs)

      Sets the timestamp for capturing the video.
      Parameters:
        `captureTimeMs` - The timestamp for capturing the video

    - #### getDecodeTimeMs

          public long getDecodeTimeMs()

      Gets the timestamp for rendering the video.
      Returns:
        The timestamp for rendering the video

    - #### setDecodeTimeMs

          public void setDecodeTimeMs(long decodeTimeMs)

      Sets the timestamp for rendering the video.
      Parameters:
        `decodeTimeMs` - The timestamp for rendering the video

    - #### getUid

          public int getUid()

      Gets the ID of the user.
      Returns:
        ID of the user

    - #### setUid

          public void setUid(int uid)

      Sets the ID of the user.
      Parameters:
        `uid` - ID of the user

    - #### getStreamType

          public int getStreamType()

      Gets the stream type of video frame.
      Returns:
        The stream type of video frame

    - #### setStreamType

          public void setStreamType(int streamType)

      Sets the stream type of video frame.
      Parameters:
        `streamType` - The stream type of video frame

    - #### getPresentationMs

          public long getPresentationMs()

      Gets the presentation timestamp (PTS) of the video frame (ms).
      Returns:
        The presentation timestamp (PTS) of the video frame (ms)

    - #### setPresentationMs

          public void setPresentationMs(long presentationMs)

      Sets the presentation timestamp (PTS) of the video frame (ms).
      Parameters:
        `presentationMs` - The presentation timestamp (PTS) of the video frame (ms)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`