GNOME Bugzilla – Bug 758689
decodebin: insert input-selector to resolve the issue when a unique codec is allowed for each decoder type
Last modified: 2018-05-05 16:00:51 UTC
Created attachment 316282 [details] [review] patch Currently GStreamer will try to create several duplications of CODEC instances even if the types are all the same. For some applications such as an embedded hardware COEDC which could be accessed only by one decoding thread, it will be an issue. It seems that decode bin version 3 has tried to resolve this problem. But for now, I still struggled in this issue. In order to support adaptive streaming (DASH) which has multiple adaption sets (ex, native YouTube has dual video tracks as well as dual audio tracks although the types are not same), it needs a way to resolve this problem. Here I try to insert input selector between demuxer & codec (in fact, between the multiqueue right after demuxer & codec) to resolve this problem. It seems to successfully achieve the requirement of a unique codec. I still work on the task to see if do switch between tracks is O.K but would like to share my current implementation here. I will be very appreciated if anyone has better idea and could give me a feedback or suggestion. A given testing DASH URL below contains dual audio tracks with the same type (audio/mpeg, mpeg version = 4). It is a good point to start the experiment so I worked on it. http://marea.tilab.com:8085/content/dash/clear/multiaudio/2audio/c1/all.mpd command = gst-launch-1.0 -v playbin uri=http://marea.tilab.com:8085/content/dash/clear/multiaudio/2audio/c1/all.mpd flags=0x56 The attached file is the detail about the patch. Welcome to any suggestion! Thank you~
Comment on attachment 316282 [details] [review] patch Proposed patch.
Created attachment 316284 [details] [review] corrected patch version 2 corrected patch version 2
Created attachment 316285 [details] implementation details Document of detailed implementation idea & flows.
Created attachment 316286 [details] original flow - with duplication codec instances graph dump of original flow - with duplication (audio) codec instances
Created attachment 316287 [details] with the insertion of input selector - a unique codec is shared by dual audio tracks graph dump with the insertion of input selector - a unique codec is shared by dual audio tracks
*** Bug 756794 has been marked as a duplicate of this bug. ***
This is fixed by: * using decodebin3/playbin3 * having adaptive demuxers handle stream selection themselves I am therefore marking this as a duplicate of the adaptive stream selection handling bug. *** This bug has been marked as a duplicate of bug 775132 ***