summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivia Nikolaidou <vivia@toolsonair.com>2016-04-12 16:32:20 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-04-19 10:19:07 +0300
commit2b536467154ed672be8b49a9681693607723cc60 (patch)
tree31de598a42e5bfd11b6354cdf046b3db2784273b
parentef1a99d4d86c2d5734d55d371116fbd34aac107c (diff)
decodebin: Always add a multiqueue in single-stream use-buffering pipelines
If we are configured to use buffering and there is no demuxer in the chain, we still want a multiqueue, otherwise we will ignore the use-buffering property. In that case, we will insert a multiqueue after the parser or decoder - not elsewhere, otherwise we won't have timestamps. https://bugzilla.gnome.org/show_bug.cgi?id=764948
-rw-r--r--gst/playback/gstdecodebin2.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
index fc35ac65d..ed67426c6 100644
--- a/gst/playback/gstdecodebin2.c
+++ b/gst/playback/gstdecodebin2.c
@@ -2133,6 +2133,7 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad,
GList *to_connect = NULL;
GList *to_expose = NULL;
gboolean is_parser = FALSE;
+ gboolean is_decoder = FALSE;
/* Set dpad target to pad again, it might've been unset
* below but we came back here because something failed
@@ -2394,6 +2395,23 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad,
chain->demuxer = TRUE;
}
+ /* If we are configured to use buffering and there is no demuxer in the
+ * chain, we still want a multiqueue, otherwise we will ignore the
+ * use-buffering property. In that case, we will insert a multiqueue after
+ * the parser or decoder - not elsewhere, otherwise we won't have
+ * timestamps.
+ */
+ is_decoder = strstr (gst_element_factory_get_metadata (factory,
+ GST_ELEMENT_METADATA_KLASS), "Decoder") != NULL;
+
+ if (!chain->parent && (is_parser || is_decoder) && dbin->use_buffering) {
+ chain->demuxer = TRUE;
+ if (is_decoder) {
+ GST_WARNING_OBJECT (dbin,
+ "Buffering messages used for decoded and non-parsed data");
+ }
+ }
+
CHAIN_MUTEX_UNLOCK (chain);
/* Set connection-speed property if needed */