Description

Queries the types of data when the information of audios and videos is returned.

struct rts_worker_demux_info
{
    int audio_flag;
    int audio_channels;
    int audio_sample_rate;

    int video_flag;
    int video_codec;
    int video_width;
    int video_height;
    int video_profile;
    int video_level;

    unsigned char spspps[10 * 1024];
    int spspps_len;
};                

Parameters

Parameter Description
audio_flag Specifies whether the audio information that follows audio_flag is valid. Valid values:
  • 1: valid
  • 0: invalid
audio_channels The number of audio channels. This parameter takes effect only when the value of audio_flag is set to 1.
audio_sample_rate The audio sampling rate. This parameter takes effect only when the value of audio_flag is set to 1.
video_flag Specifies whether the video information that follows video_flag is valid. Valid values:
  • 1: valid
  • 0: invalid
video_codec The type of the video frame. This parameter takes effect only when the value of audio_flag is set to 1, that is, H.264.
video_width The resolution width of the video. This parameter takes effect only when the value of audio_flag is set to 1.
video_height The resolution height of the video. This parameter takes effect only when the value of audio_flag is set to 1.
video_profile The profile used for video encoding. This parameter takes effect only when the value of video_flag is set to 1 and the value of video_codec is set to 1.
video_level The level used for video encoding. This parameter takes effect only when the value of video_flag is set to 1 and the value of video_codec is set to 1.
spspps Stores Sequence Parameter Set (SPS) and Picture Parameter Set (PPS) information. This parameter can be used to initialize the decoder in advance. It can be left empty. This parameter takes effect only when the value of video_flag is set to 1 and the value of video_codec is set to 1.
spspps_len The length of spspps. Unit: bytes. This parameter takes effect only when the value of video_flag is set to 1 and the value of video_codec is set to 1.