mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-11 10:34:11 +00:00
mpdparser: do not switch pads when bitstreamSwitching = true
This commit is contained in:
parent
e0c55050e1
commit
470c860ffa
3 changed files with 21 additions and 6 deletions
|
@ -1502,15 +1502,18 @@ static GstCaps *
|
|||
gst_dash_demux_get_video_input_caps (GstDashDemux * demux,
|
||||
GstActiveStream * stream)
|
||||
{
|
||||
guint width, height;
|
||||
guint width = 0, height = 0;
|
||||
const gchar *mimeType = NULL;
|
||||
GstCaps *caps = NULL;
|
||||
|
||||
if (stream == NULL)
|
||||
return NULL;
|
||||
|
||||
width = gst_mpd_client_get_video_stream_width (stream);
|
||||
height = gst_mpd_client_get_video_stream_height (stream);
|
||||
/* if bitstreamSwitching is true we dont need to swich pads on resolution change */
|
||||
if (!gst_mpd_client_get_bitstream_switching_flag (stream)) {
|
||||
width = gst_mpd_client_get_video_stream_width (stream);
|
||||
height = gst_mpd_client_get_video_stream_height (stream);
|
||||
}
|
||||
mimeType = gst_mpd_client_get_stream_mimeType (stream);
|
||||
if (mimeType == NULL)
|
||||
return NULL;
|
||||
|
@ -1528,15 +1531,18 @@ static GstCaps *
|
|||
gst_dash_demux_get_audio_input_caps (GstDashDemux * demux,
|
||||
GstActiveStream * stream)
|
||||
{
|
||||
guint rate, channels;
|
||||
guint rate = 0, channels = 0;
|
||||
const gchar *mimeType;
|
||||
GstCaps *caps = NULL;
|
||||
|
||||
if (stream == NULL)
|
||||
return NULL;
|
||||
|
||||
channels = gst_mpd_client_get_audio_stream_num_channels (stream);
|
||||
rate = gst_mpd_client_get_audio_stream_rate (stream);
|
||||
/* if bitstreamSwitching is true we dont need to swich pads on rate/channels change */
|
||||
if (!gst_mpd_client_get_bitstream_switching_flag (stream)) {
|
||||
channels = gst_mpd_client_get_audio_stream_num_channels (stream);
|
||||
rate = gst_mpd_client_get_audio_stream_rate (stream);
|
||||
}
|
||||
mimeType = gst_mpd_client_get_stream_mimeType (stream);
|
||||
if (mimeType == NULL)
|
||||
return NULL;
|
||||
|
|
|
@ -3196,6 +3196,14 @@ const gchar *gst_mpd_client_get_stream_mimeType (GstActiveStream * stream)
|
|||
return gst_mpdparser_mimetype_to_caps (mimeType);
|
||||
}
|
||||
|
||||
const gboolean gst_mpd_client_get_bitstream_switching_flag (GstActiveStream * stream)
|
||||
{
|
||||
if (stream == NULL || stream->cur_adapt_set == NULL)
|
||||
return FALSE;
|
||||
|
||||
return stream->cur_adapt_set->bitstreamSwitching;
|
||||
}
|
||||
|
||||
guint gst_mpd_client_get_video_stream_width (GstActiveStream * stream)
|
||||
{
|
||||
guint width;
|
||||
|
|
|
@ -498,6 +498,7 @@ guint gst_mpd_client_get_segment_index (GstActiveStream * stream);
|
|||
|
||||
/* Get audio/video stream parameters (mimeType, width, height, rate, number of channels) */
|
||||
const gchar *gst_mpd_client_get_stream_mimeType (GstActiveStream * stream);
|
||||
const gboolean gst_mpd_client_get_bitstream_switching_flag (GstActiveStream * stream);
|
||||
guint gst_mpd_client_get_video_stream_width (GstActiveStream * stream);
|
||||
guint gst_mpd_client_get_video_stream_height (GstActiveStream * stream);
|
||||
guint gst_mpd_client_get_audio_stream_rate (GstActiveStream * stream);
|
||||
|
|
Loading…
Reference in a new issue