mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
playbin2: return NOT_LINKED for unselected streams
When streams are not selected in the selector, return NOT_LINKED so that upstream elements can skip decoding. Only do this for audio and video pads because for text streams the overhead is smaller and they could come from external files.
This commit is contained in:
parent
5021c930ba
commit
a8579ffea0
1 changed files with 4 additions and 0 deletions
|
@ -1784,10 +1784,14 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
|
|||
switch (select->type) {
|
||||
case GST_PLAY_SINK_TYPE_VIDEO:
|
||||
case GST_PLAY_SINK_TYPE_VIDEO_RAW:
|
||||
/* we want to return NOT_LINKED for unselected pads but only for audio
|
||||
* and video pads because text pads might come from an external file. */
|
||||
g_object_set (sinkpad, "always-ok", FALSE, NULL);
|
||||
signal = SIGNAL_VIDEO_CHANGED;
|
||||
break;
|
||||
case GST_PLAY_SINK_TYPE_AUDIO:
|
||||
case GST_PLAY_SINK_TYPE_AUDIO_RAW:
|
||||
g_object_set (sinkpad, "always-ok", FALSE, NULL);
|
||||
signal = SIGNAL_AUDIO_CHANGED;
|
||||
break;
|
||||
case GST_PLAY_SINK_TYPE_TEXT:
|
||||
|
|
Loading…
Reference in a new issue