After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743511 - singledecodebin: A convenience element to decode a single stream
singledecodebin: A convenience element to decode a single stream
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-26 07:13 UTC by Arun Raghavan
Modified: 2018-11-03 13:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
singledecodebin: Add an element to decode a single stream (8.68 KB, patch)
2015-01-26 07:13 UTC, Arun Raghavan
needs-work Details | Review
singledecodebin: Add a parse-only mode (4.33 KB, patch)
2015-01-26 07:13 UTC, Arun Raghavan
needs-work Details | Review

Description Arun Raghavan 2015-01-26 07:13:17 UTC
This is a fairly simple bin that can be use to decode a single stream using
decodebin, without having to deal with dynamic pads.
Comment 1 Arun Raghavan 2015-01-26 07:13:23 UTC
Created attachment 295421 [details] [review]
singledecodebin: Add an element to decode a single stream

This is a convenience bin for when one wants to plug in a decodebin for
a single stream without having to deal with sometimes pads (since there
is only one stream, decodebin will only have one srcpad).
Comment 2 Arun Raghavan 2015-01-26 07:13:30 UTC
Created attachment 295422 [details] [review]
singledecodebin: Add a parse-only mode
Comment 3 Sebastian Dröge (slomo) 2015-01-26 15:20:35 UTC
Review of attachment 295421 [details] [review]:

You should also add this to the documentation build if you already added some docs :)

::: gst/singledecodebin/gstsingledecodebin.c
@@ +56,3 @@
+  GstPad *srcpad;
+  GstSingleDecodeBin *sdbin =
+      GST_SINGLE_DECODE_BIN (gst_element_get_parent (dbin));

You're leaking sdbin here

@@ +58,3 @@
+      GST_SINGLE_DECODE_BIN (gst_element_get_parent (dbin));
+
+  if (sdbin->connected) {

pad-added can be emitted from different threads at the same time

@@ +63,3 @@
+  }
+
+  srcpad = gst_element_get_static_pad (GST_ELEMENT (sdbin), "src");

Maybe only do this here if a) downstream accepts the caps of the pad (or no downstream is there), and b) the caps of the pad intersect with a newly added caps property of singledecodebin.

That would allow you to make linking this a bit more flexible, e.g. "... ! singledecodebin ! pulsesink" would also work if the first pad added by decodebin is a video pad.
Comment 4 Sebastian Dröge (slomo) 2015-01-26 15:23:36 UTC
Review of attachment 295422 [details] [review]:

::: gst/singledecodebin/gstsingledecodebin.c
@@ +126,3 @@
+  /* We will only get fixed caps in autoplug-continue */
+  s = gst_caps_get_structure (caps, 0);
+  if (gst_structure_get_boolean (s, "parsed", &parsed) && parsed) {

Not sure this is really enough, also it will still plug decoders and everything and then add the pad if there is no parser added at all (e.g. for vp8).
Comment 5 Tim-Philipp Müller 2016-12-31 10:26:28 UTC
I think this should probably be rebased on top of decodebin3 and parsebin, and the parse mode should maybe then be singleparsebin instead, if we still think these kind of elements are useful.

Then there's the question what happens if you feed something with multiple streams - will people want some control over what's selected? How will that happen then? Streams API and property for auto/video/audio/subs to indicate what should be done by default?
Comment 6 GStreamer system administrator 2018-11-03 13:30:02 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/205.