io.agora.rtc

## Class MediaStreamInfo

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

-     public class MediaStreamInfo
      extends java.lang.Object

  Information about a media stream.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `audioBitsPerSample` Audio bits per sample
    `private int` | `audioChannels` Number of audio channels
    `private int` | `audioSampleRate` Audio sample rate (Hz)
    `private byte` | `codecName` Codec name
    `private long` | `duration` Duration (ms)
    `private byte` | `language` Language
    `private int` | `streamIndex` Stream index
    `private int` | `streamType` Stream type
    `private int` | `videoBitRate` Video bitrate (bps)
    `private int` | `videoFrameRate` Video frame rate (fps)
    `private int` | `videoHeight` Video height (px)
    `private int` | `videoRotation` Video rotation
    `private int` | `videoWidth` Video width (px)

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MediaStreamInfo()` Default constructor for MediaStreamInfo.
    `MediaStreamInfo(int streamIndex, int streamType, byte codecName, byte language, int videoFrameRate, int videoBitRate, int videoWidth, int videoHeight, int videoRotation, int audioSampleRate, int audioChannels, int audioBitsPerSample, long duration)` Constructs MediaStreamInfo with all parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getAudioBitsPerSample()` Gets the audio bits per sample.
    `int` | `getAudioChannels()` Gets the number of audio channels.
    `int` | `getAudioSampleRate()` Gets the audio sample rate (Hz).
    `byte` | `getCodecName()` Gets the codec name.
    `long` | `getDuration()` Gets the duration (ms).
    `byte` | `getLanguage()` Gets the language.
    `int` | `getStreamIndex()` Gets the stream index.
    `int` | `getStreamType()` Gets the stream type.
    `int` | `getVideoBitRate()` Gets the video bitrate (bps).
    `int` | `getVideoFrameRate()` Gets the video frame rate (fps).
    `int` | `getVideoHeight()` Gets the video height (px).
    `int` | `getVideoRotation()` Gets the video rotation.
    `int` | `getVideoWidth()` Gets the video width (px).
    `void` | `setAudioBitsPerSample(int audioBitsPerSample)` Sets the audio bits per sample.
    `void` | `setAudioChannels(int audioChannels)` Sets the number of audio channels.
    `void` | `setAudioSampleRate(int audioSampleRate)` Sets the audio sample rate (Hz).
    `void` | `setCodecName(byte codecName)` Sets the codec name.
    `void` | `setDuration(long duration)` Sets the duration (ms).
    `void` | `setLanguage(byte language)` Sets the language.
    `void` | `setStreamIndex(int streamIndex)` Sets the stream index.
    `void` | `setStreamType(int streamType)` Sets the stream type.
    `void` | `setVideoBitRate(int videoBitRate)` Sets the video bitrate (bps).
    `void` | `setVideoFrameRate(int videoFrameRate)` Sets the video frame rate (fps).
    `void` | `setVideoHeight(int videoHeight)` Sets the video height (px).
    `void` | `setVideoRotation(int videoRotation)` Sets the video rotation.
    `void` | `setVideoWidth(int videoWidth)` Sets the video width (px).

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

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

- - ### Field Detail

    - #### streamIndex

          private int streamIndex

      Stream index

    - #### streamType

          private int streamType

      Stream type

    - #### codecName

          private byte codecName

      Codec name

    - #### language

          private byte language

      Language

    - #### videoFrameRate

          private int videoFrameRate

      Video frame rate (fps)

    - #### videoBitRate

          private int videoBitRate

      Video bitrate (bps)

    - #### videoWidth

          private int videoWidth

      Video width (px)

    - #### videoHeight

          private int videoHeight

      Video height (px)

    - #### videoRotation

          private int videoRotation

      Video rotation

    - #### audioSampleRate

          private int audioSampleRate

      Audio sample rate (Hz)

    - #### audioChannels

          private int audioChannels

      Number of audio channels

    - #### audioBitsPerSample

          private int audioBitsPerSample

      Audio bits per sample

    - #### duration

          private long duration

      Duration (ms)

  - ### Constructor Detail

    - #### MediaStreamInfo

          public MediaStreamInfo()

      Default constructor for MediaStreamInfo.

    - #### MediaStreamInfo

          public MediaStreamInfo(int streamIndex,
                                 int streamType,
                                 byte codecName,
                                 byte language,
                                 int videoFrameRate,
                                 int videoBitRate,
                                 int videoWidth,
                                 int videoHeight,
                                 int videoRotation,
                                 int audioSampleRate,
                                 int audioChannels,
                                 int audioBitsPerSample,
                                 long duration)

      Constructs MediaStreamInfo with all parameters.
      Parameters:
        `streamIndex` - Stream index
        `streamType` - Stream type
        `codecName` - Codec name
        `language` - Language
        `videoFrameRate` - Video frame rate (fps)
        `videoBitRate` - Video bitrate (bps)
        `videoWidth` - Video width (px)
        `videoHeight` - Video height (px)
        `videoRotation` - Video rotation
        `audioSampleRate` - Audio sample rate (Hz)
        `audioChannels` - Number of audio channels
        `audioBitsPerSample` - Audio bits per sample
        `duration` - Duration (ms)

  - ### Method Detail

    - #### getStreamIndex

          public int getStreamIndex()

      Gets the stream index.
      Returns:
        Stream index

    - #### setStreamIndex

          public void setStreamIndex(int streamIndex)

      Sets the stream index.
      Parameters:
        `streamIndex` - Stream index

    - #### getStreamType

          public int getStreamType()

      Gets the stream type.
      Returns:
        Stream type

    - #### setStreamType

          public void setStreamType(int streamType)

      Sets the stream type.
      Parameters:
        `streamType` - Stream type

    - #### getCodecName

          public byte getCodecName()

      Gets the codec name.
      Returns:
        Codec name

    - #### setCodecName

          public void setCodecName(byte codecName)

      Sets the codec name.
      Parameters:
        `codecName` - Codec name

    - #### getLanguage

          public byte getLanguage()

      Gets the language.
      Returns:
        Language

    - #### setLanguage

          public void setLanguage(byte language)

      Sets the language.
      Parameters:
        `language` - Language

    - #### getVideoFrameRate

          public int getVideoFrameRate()

      Gets the video frame rate (fps).
      Returns:
        Video frame rate (fps)

    - #### setVideoFrameRate

          public void setVideoFrameRate(int videoFrameRate)

      Sets the video frame rate (fps).
      Parameters:
        `videoFrameRate` - Video frame rate (fps)

    - #### getVideoBitRate

          public int getVideoBitRate()

      Gets the video bitrate (bps).
      Returns:
        Video bitrate (bps)

    - #### setVideoBitRate

          public void setVideoBitRate(int videoBitRate)

      Sets the video bitrate (bps).
      Parameters:
        `videoBitRate` - Video bitrate (bps)

    - #### getVideoWidth

          public int getVideoWidth()

      Gets the video width (px).
      Returns:
        Video width (px)

    - #### setVideoWidth

          public void setVideoWidth(int videoWidth)

      Sets the video width (px).
      Parameters:
        `videoWidth` - Video width (px)

    - #### getVideoHeight

          public int getVideoHeight()

      Gets the video height (px).
      Returns:
        Video height (px)

    - #### setVideoHeight

          public void setVideoHeight(int videoHeight)

      Sets the video height (px).
      Parameters:
        `videoHeight` - Video height (px)

    - #### getVideoRotation

          public int getVideoRotation()

      Gets the video rotation.
      Returns:
        Video rotation

    - #### setVideoRotation

          public void setVideoRotation(int videoRotation)

      Sets the video rotation.
      Parameters:
        `videoRotation` - Video rotation

    - #### getAudioSampleRate

          public int getAudioSampleRate()

      Gets the audio sample rate (Hz).
      Returns:
        Audio sample rate (Hz)

    - #### setAudioSampleRate

          public void setAudioSampleRate(int audioSampleRate)

      Sets the audio sample rate (Hz).
      Parameters:
        `audioSampleRate` - Audio sample rate (Hz)

    - #### getAudioChannels

          public int getAudioChannels()

      Gets the number of audio channels.
      Returns:
        Number of audio channels

    - #### setAudioChannels

          public void setAudioChannels(int audioChannels)

      Sets the number of audio channels.
      Parameters:
        `audioChannels` - Number of audio channels

    - #### getAudioBitsPerSample

          public int getAudioBitsPerSample()

      Gets the audio bits per sample.
      Returns:
        Audio bits per sample

    - #### setAudioBitsPerSample

          public void setAudioBitsPerSample(int audioBitsPerSample)

      Sets the audio bits per sample.
      Parameters:
        `audioBitsPerSample` - Audio bits per sample

    - #### getDuration

          public long getDuration()

      Gets the duration (ms).
      Returns:
        Duration (ms)

    - #### setDuration

          public void setDuration(long duration)

      Sets the duration (ms).
      Parameters:
        `duration` - Duration (ms)