GNOME Bugzilla – Bug 680870
playbin2 doesn't plug necessary parsers
Last modified: 2012-08-01 14:47:14 UTC
once again, i am sure we had this problem before but i can't seem to find the right ticket atm i've got a sink with the following Pad Templates: SINK template: 'sink' Availability: Always Capabilities: audio/x-raw-int endianess: 1234 signed: { true, false } rate: { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 } channels: [ 1, 2 ] width: 8 depth: 8 audio/x-raw-int endianess: 1234 signed: { true, false } rate: { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 } channels: [ 1, 2 ] width: 16 depth: 16 audio/x-raw-int endianess: 1234 signed: { true, false } rate: { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 } channels: [ 1, 2 ] width: 24 depth: 24 audio/x-raw-int endianess: 1234 signed: { true, false } rate: { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 } channels: [ 1, 2 ] width: 32 depth: 24 audio/x-raw-int endianess: 1234 signed: { true, false } rate: { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 } channels: [ 1, 2 ] width: 32 depth: 32 audio/mpeg parsed: true framed: true audio/x-ac3 framed: true audio/x-private1-ac3 framed: true audio/x-dts framed: true audio/x-private1-dts framed: true audio/x-private1-lpcm framed: true audio/x-wma framed: true still, a gst-launch playbin2 uri=bla.mp3 will result in a pipeline without an mp3parse element, even though the element is present and recent with a rank of primary + 1 (257) same thing is true for e.g. dcaparse a manually built pipeline like gst-launch filesrc location=bla.mp3 ! id3demux ! dvbaudiosink will not fail to link either, even though pad templates are incompatible i'm working with 0.10 branches of core, base, good, bad & ugly from today
> audio/mpeg > parsed: true > framed: true This doesn't look right. I think you need to make separate structures for mpegversion={4,2},framed=true and mpegversion=1,parsed=true (you *should* in any case).
same result with Pad Templates: SINK template: 'sink' Availability: Always Capabilities: ... audio/mpeg mpegversion: { 4, 2 } framed: true audio/mpeg mpegversion: 1 parsed: true ...
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?h=0.10&id=1f6056eafb6c37f4c78ed22b2796a1dcaeb51ee6 this looked like it could have been the caause, but i reverted it without success
fraxi bisected... $ git bisect good 0dfdd9186e143daa568521c4e55c9923e5cbc466 is the first bad commit commit 0dfdd9186e143daa568521c4e55c9923e5cbc466 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Wed May 23 16:34:37 2012 +0200 playbin2: Put sinks before the other element factories in the autoplug factory list This makes sure that we always prefer sinks that support a format without decoding, independant of its rank. Previously we only sorted by rank. :040000 040000 1c75aabaa69fc528ee0ec96a8ed35806a16b059b b59ee164a7927002c2fbb9ffa4c822a6d67fc633 M gst
What are the caps on the demuxer (or whatever element is right before the sink) srcpad?
And what does the acceptcaps function/query of the sinkpad of the sink do (if there is one)?
Oh I see, this is in 0.10. Negotiation is known to be broken in this specific case (there's nothing that checks if caps contain all the fields that are on the pad template caps). It's fixed in 1.0 (and you can fix it in your sink by actually checking the caps in the acceptcaps function).
hi slomo! in my first example i tried it with playbin2 then with a simple filesrc ! dvbaudiosink i get ERROR: from element /GstPipeline:pipeline0/GstDVBAudioSink:dvbaudiosink0: The stream is in the wrong format. Additional debug info: gstdvbaudiosink.c(1071): gst_dvbaudiosink_render (): /GstPipeline:pipeline0/GstDVBAudioSink:dvbaudiosink0: hardware decoder not setup (no caps in pipeline?) if i insert id3demux, it gives me these caps: /GstPipeline:pipeline0/GstDVBAudioSink:dvbaudiosink0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, layer=(int)3 it does preroll and goes into PLAYING without errors even though i've implemented an arbitrary acceptcaps function root@dm7020hd:/media/hdd/movie# gst-launch filesrc location="/media/net/MP3s/70s Disco/Chic - Le Freak.mp3" ! id3demux ! dvbaudiosink -v of course this doesn't decode because the stream is unparsed and the acceptcaps function is not being called when trying with playbin2 now, it calls the acceptcaps function twice which checks whether it's parsed or framed and subsequently returns FALSE (because it isn't) 0:00:00.451739741 9833 0x7dc050 WARN dvbaudiosink gstdvbaudiosink.c:539:gst_dvbaudiosink_acceptcaps:<dvbaudiosink0> input stream is unframed && unparsed! can't handle! but playbin2 still doesn't plug the parser element and just continues with PLAYING
Created attachment 220061 [details] GST_DEBUG_NO_COLOR=1 GST_DEBUG=*:3,*play*:5 gst-launch playbin2 uri="file:///media/net/MP3s/70s Disco/Chic - Le Freak.mp3" >/testProgs/go g_680870.log 2>&1
i wasn't returning FALSE properly in the acceptcaps works with the modified code, thanks slomo!