GNOME Bugzilla – Bug 743511
singledecodebin: A convenience element to decode a single stream
Last modified: 2018-11-03 13:30:02 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.
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).
Created attachment 295422 [details] [review] singledecodebin: Add a parse-only mode
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.
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).
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?
-- 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.