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 667217 - resindvd: use decodebin3 or parsebin so needed parsers are plugged
resindvd: use decodebin3 or parsebin so needed parsers are plugged
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 758960
Blocks:
 
 
Reported: 2012-01-03 21:43 UTC by Rob Clark
Modified: 2018-11-03 13:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
resindvd: use decodebin2 so needed parsers are plugged (7.60 KB, patch)
2012-01-03 21:44 UTC, Rob Clark
none Details | Review

Description Rob Clark 2012-01-03 21:43:52 UTC
Rather than autoconvert, use decodebin2 for video and audio sub-bins.  This way, things still work if the decoder element requires parsers.

patch attached
Comment 1 Rob Clark 2012-01-03 21:44:36 UTC
Created attachment 204524 [details] [review]
resindvd: use decodebin2 so needed parsers are plugged
Comment 2 Sebastian Dröge (slomo) 2012-01-04 08:13:17 UTC
This won't work because decodebin2 can't switch decoders on the fly (yet) when the codec changes (e.g. AC3 to DTS). IIRC this was the only reason why autoconvert was used here.
Comment 3 Rob Clark 2012-01-04 13:51:26 UTC
oh.. damn..

I guess we only really need this for video, so I suppose in theory we could build a different pipeline for audio vs video subbin, although that is a bit more ugly than what I would have hoped for.
Comment 4 Sebastian Dröge (slomo) 2012-01-04 14:02:43 UTC
Or you implement renegotiation in decodebin2 but that will be almost impossible in 0.10 and quite some work in 0.11. But by this the autoplug-* signals of decodebin2 could be proxied by resndvd and could then be used by uridecodebin and playbin2 to allow better selection of the correct decoders.


You'll probably need parsers for the audio and video case though...
Comment 5 Tim-Philipp Müller 2012-01-04 14:10:06 UTC
You could create a GstBin subclass that internally plugs parser ! videodecoder with two ghostpads ;-)
Comment 6 Rob Clark 2012-01-04 14:11:48 UTC
(In reply to comment #4)
> Or you implement renegotiation in decodebin2 but that will be almost impossible
> in 0.10 and quite some work in 0.11. But by this the autoplug-* signals of
> decodebin2 could be proxied by resndvd and could then be used by uridecodebin
> and playbin2 to allow better selection of the correct decoders.

That sounds like the more correct solution, although not sure how feasible it is in the short term (0.10)..

I wonder about a simpler hack.. just detect caps changing and re-create the decodebin2 within resndvd?

> You'll probably need parsers for the audio and video case though...

it would be a good thing to allow for parsers on audio side too..  although cpu and neon are good enough these days that the overhead of dealing with a dsp usually outweighs the benefit of offload.  And just sticking with the sw decode elements (I guess gst-ffmpeg ends up handling most of the audio) seems to work for now without parsers.
Comment 7 Sebastian Dröge (slomo) 2012-01-04 14:39:59 UTC
(In reply to comment #6)
> (In reply to comment #4)
> > Or you implement renegotiation in decodebin2 but that will be almost impossible
> > in 0.10 and quite some work in 0.11. But by this the autoplug-* signals of
> > decodebin2 could be proxied by resndvd and could then be used by uridecodebin
> > and playbin2 to allow better selection of the correct decoders.
> 
> That sounds like the more correct solution, although not sure how feasible it
> is in the short term (0.10)..
> 
> I wonder about a simpler hack.. just detect caps changing and re-create the
> decodebin2 within resndvd?

You will still have the same problem in 0.10, i.e. you need to make sure to get the correct segments configured in all elements inside decodebin2. That's the hard part, just recreating everything inside decodebin2 could be done quite fast.

> > You'll probably need parsers for the audio and video case though...
> 
> it would be a good thing to allow for parsers on audio side too..  although cpu
> and neon are good enough these days that the overhead of dealing with a dsp
> usually outweighs the benefit of offload.  And just sticking with the sw decode
> elements (I guess gst-ffmpeg ends up handling most of the audio) seems to work
> for now without parsers.

Not all software decoders can handle unparsed input
Comment 8 Tim-Philipp Müller 2016-04-11 17:25:37 UTC
What was the goal of all this again?
Comment 9 Jan Schmidt 2016-04-11 18:33:47 UTC
Subsequent to this bug, resindvdbin started adding mpegvideoparse (hard coded) in front of the video decoder. It still doesn't use any parsers in front of the audio decoders though, so things only work when the audio decoders don't need a parser.
Comment 10 Tim-Philipp Müller 2016-05-22 17:31:51 UTC
decodebin3 should be able to handle input format changes, retitling accordingly.

Out of curiosity, audio packets coming out of psdemux should always be framed though, no? It might just not be 1 packet per buffer but N packets per buffer, right? Or is the framing not mandatory?
Comment 11 Jan Schmidt 2016-08-20 12:38:17 UTC
I don't think there's any requirement that the elementary stream be stored in MPEG-PS PACKs in any sensible packetisation - but yes, they'll have start code markers if that's what you mean.
Comment 12 GStreamer system administrator 2018-11-03 13:10:06 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/55.