PlayerStreamInfo

The detailed information of the media stream.

struct PlayerStreamInfo {
  int streamIndex;
  MEDIA_STREAM_TYPE streamType;
  char codecName[kMaxCharBufferLength];
  char language[kMaxCharBufferLength];
  int videoFrameRate;
  int videoBitRate;
  int videoWidth;
  int videoHeight;
  int videoRotation;
  int audioSampleRate;
  int audioChannels;
  int audioBitsPerSample;
  int64_t duration;
  PlayerStreamInfo() : streamIndex(0),
                       streamType(STREAM_TYPE_UNKNOWN),
                       videoFrameRate(0),
                       videoBitRate(0),
                       videoWidth(0),
                       videoHeight(0),
                       videoRotation(0),
                       audioSampleRate(0),
                       audioChannels(0),
                       audioBitsPerSample(0),
                       duration(0) {
    memset(codecName, 0, sizeof(codecName));
    memset(language, 0, sizeof(language));

Attributes

streamIndex
The index of the media stream.
streamType
The type of the media stream. See MEDIA_STREAM_TYPE.
codecName
The codec of the media stream.
language
The language of the media stream.
videoFrameRate
This parameter only takes effect for video streams, and indicates the video frame rate (fps).
videoBitrate
This parameter only takes effect for video streams, and indicates the video bitrate (bps).
videoWidth
This parameter only takes effect for video streams, and indicates the video width (pixel).
videoHeight
This parameter only takes effect for video streams, and indicates the video height (pixel).
videoRotation
This parameter only takes effect for video streams, and indicates the video rotation angle.
audioSampleRate
This parameter only takes effect for audio streams, and indicates the audio sample rate (Hz).
audioChannels
This parameter only takes effect for audio streams, and indicates the audio channel number.
audioBitsPerSample
This parameter only takes effect for audio streams, and indicates the bit number of each audio sample.
duration
The total duration (ms) of the media stream.