GNOME Bugzilla – Bug 597195
no dvb playback with players using playbin2
Last modified: 2013-04-26 14:45:37 UTC
Since totem switched to playbin2, I'm no longer able to watch dvb-t television because selecting a channel seems to hang. While `gst-launch playbin "uri=dvb://<CHANNEL>"' is working correctly, `gst-launch playbin2 "uri=dvb://<CHANNEL>"' seems to hang forever, spawning two warnings about missing private/teletext and private-mpegts decoder (which does older playbin, too, but seems to ignore). Please tell me, if you need additional information. Thanks.
Could you run gst-launch-0.10 playbin2 "uri=dvb://<CHANNEL>" in gdb and get a backtrace of all threads when it hangs? Please install debug symbols for libc, glib, gstreamer, gst-plugins-base and gst-plugins-bad for that. Also the output of GST_DEBUG=5 gst-launch-0.10 playbin2 "uri=dvb://<CHANNEL>" might be useful, please attach it (if it's too large, compress it) :)
Created attachment 146045 [details] gdb output as requested Sorry for the delay, unfortunately I can't always try to watch TV when sitting in front of my computer ;) Here is the gdb output.
Here you can find the debug output: http://gkulyk.userpage.fu-berlin.de/gst-launch-dbg-output.txt.lzma Compressed it has around 4.7Mb, uncompressed around 128Mb.
The problem appears to be that playbin2 blocks the input-selector pads until it gets a no-more-pads signal, but that never arrives, so the queue fills up and it stops there. uridecodebin is expecting 2 no-more-pads signals, because of this: 0:00:00.041684491 27928 0x8eeb088 DEBUG uridecodebin gsturidecodebin.c:1639:setup_source:<uridecodebin0> Source has dynamic output pads and this: 0:00:01.986732146 27928 0x9054ad0 LOG uridecodebin gsturidecodebin.c:1325:make_decoder:<uridecodebin0> have 2 pending dynamic objects but it only gets one, from the decoder: 0:00:06.611036252 27928 0x9054ad0 DEBUG uridecodebin gsturidecodebin.c:710:no_more_pads_full:<decodebin20> no more pads, 2 pending So the problem seems to be that dvbbasebin doesn't emit no-more-pads. It should probably do that when it gets no-more-pads from mpegtsparse.. which doesn't do that. Just as a test, I made uridecodebin count the no-more-pads signal it gets from the decoder as 2, and that made dvb playback work.
Created attachment 150528 [details] [review] dvbbasebin: propagate no-more-pads signal from mpegtsparse
Created attachment 150529 [details] [review] mpegtsparse: emit no-more-pads after syncing program pads I'm not at all sure that this is correct - I don't know anything about mpeg parsing - but this seemed like a good place to put it. It works, if that counts for anything.
*** Bug 603371 has been marked as a duplicate of this bug. ***
The first patch definitely looks good, no idea about the second. Is the first one already enough to make it working?
The first patch just propagates the no-more-pads signal from mpegtsparse. Without the second patch, mpegtsparse doesn't emit no-more-pads at all, so the first patch alone doesn't do anything.
Then it's probably a good idea to emit no-more-pads in mpegtsparse after some seconds without new streams, similar to the PS demuxer.
OK, I'll try to implement that. Obvious first question: we don't seem to have timestamps there, so how can mpegtsparse determine that a couple of seconds have passed?
*** Bug 608013 has been marked as a duplicate of this bug. ***
FWIW I removed no-more-pads signaling from qtdemux and it still works in playbin2. There is something else happening here. Btw, could you generate debug logs with git versions of gstreamer core and base? Seems like the logs doesn't match the code anymore.
Created attachment 164000 [details] Output from gst-launch -v playbin2 uri='dvb://...' Attached is the current output. I've done the level 5 debug, but I cannot get it small enough to attach to the bugzilla. The pipeline is blocking somewhere in the thread containing the mpegtsdemux element. The queue it inserts just before this element and just after the mpegtsparse fills up and the whole thing blocks. (playbin still works ok)
You can use bzip2 to compress it before attaching it.
It that bug still happenning with 0.10.36 and master?
Gert, Austin, do you still get the issue ?
Unfortunately I do not have access to a dvb device for quite a while now, so I cannot say if the bug is resolved or not.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
Reopening, since I believe this may still apply. This can quite easily be tested by people. It should only be closed once someone at least says that it works for them with recent versions of things.
Someone needs to confirm the following works: gst-launch-1.0 uri=dvb://<channelname>
Works reasonably well using current git versions of everything. On a slowish system (1.6ghz amd e-350 cpu) it only displays about 1fps and prints "a lot of buffers are being dropped" messages, but it's only using about 30% of the cpu. On something slightly faster it's fine.
Hmm, upgraded to Fedora 18 (from 16) and DVB no longer seems to working with the gstreamer-1.0 stuff, e.g totem. DVB still works under gstreamer-0.10 using playbin (playbin2 still doesn't work). Here's some debug for non-working gst-launch-1.0 $ GST_DEBUG=*dvb*:5 gst-launch-1.0 playbin "uri=dvb://five" Setting pipeline to PAUSED ... 0:00:00.180884564 26385 0xeb7730 DEBUG dvbsrc gstdvbsrc.c:917:gst_dvbsrc_plugin_init: binding text domain gst-plugins-bad-1.0 to locale dir /usr/share/locale 0:00:00.181391314 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:470:gst_dvbsrc_init:<GstDvbSrc@0xe85400> gst_dvbsrc_init 0:00:00.181440201 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:543:gst_dvbsrc_set_property:<dvbsrc0> Set Property: ARG_DVBSRC_POLARITY 0:00:00.181469883 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:545:gst_dvbsrc_set_property:<dvbsrc0> DVB_POL_H 0:00:00.183181421 26385 0xeb7730 DEBUG dvbbasebin dvbbasebin.c:639:foreach_stream_build_filter: stream 0 usecount 1 0:00:00.183221508 26385 0xeb7730 DEBUG dvbbasebin dvbbasebin.c:639:foreach_stream_build_filter: stream 1 usecount 1 0:00:00.183260268 26385 0xeb7730 DEBUG dvbbasebin dvbbasebin.c:639:foreach_stream_build_filter: stream 17 usecount 1 0:00:00.183284293 26385 0xeb7730 DEBUG dvbbasebin dvbbasebin.c:639:foreach_stream_build_filter: stream 16 usecount 1 0:00:00.183312578 26385 0xeb7730 DEBUG dvbbasebin dvbbasebin.c:639:foreach_stream_build_filter: stream 20 usecount 1 0:00:00.183336672 26385 0xeb7730 DEBUG dvbbasebin dvbbasebin.c:639:foreach_stream_build_filter: stream 18 usecount 1 0:00:00.183362443 26385 0xeb7730 INFO dvbbasebin dvbbasebin.c:662:dvb_base_bin_rebuild_filter:<DvbBaseBin@0xf06010> rebuilt filter 18:20:16:17:1:0 0:00:00.183391705 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:554:gst_dvbsrc_set_property:<dvbsrc0> Set Property: ARG_DVBSRC_PIDS 18:20:16:17:1:0 0:00:00.183419850 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:580:gst_dvbsrc_set_property:<dvbsrc0> Parsed Pid: 18 0:00:00.183450928 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:580:gst_dvbsrc_set_property:<dvbsrc0> Parsed Pid: 20 0:00:00.183481727 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:580:gst_dvbsrc_set_property:<dvbsrc0> Parsed Pid: 16 0:00:00.183517275 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:580:gst_dvbsrc_set_property:<dvbsrc0> Parsed Pid: 17 0:00:00.183547725 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:593:gst_dvbsrc_set_property:<dvbsrc0> checking if playing for setting pes filters 0:00:00.183582504 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:543:gst_dvbsrc_set_property:<dvbsrc0> Set Property: ARG_DVBSRC_POLARITY 0:00:00.183610370 26385 0xeb7730 INFO dvbsrc gstdvbsrc.c:545:gst_dvbsrc_set_property:<dvbsrc0> DVB_POL_H 0:00:00.183826102 26385 0xeb7730 DEBUG dvbsrc gstdvbsrc.c:882:gst_dvbsrc_finalize:<dvbsrc0> gst_dvbsrc_finalize ERROR: Pipeline doesn't want to pause. Missing element: DVB protocol source ERROR: from element /GstURIDecodeBin:uridecodebin0: No URI handler implemented for "dvb". Additional debug info: gsturidecodebin.c(1332): gen_source_element (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0 Setting pipeline to NULL ... Freeing pipeline ... This is with Fedora 18, with the following gstreamer1-plugin packages gstreamer1-plugins-bad-free-1.0.5-1.fc18.x86_64 gstreamer1-plugins-bad-freeworld-1.0.2-2.fc18.x86_64 gstreamer1-plugins-good-1.0.5-3.fc18.x86_64 gstreamer1-plugins-ugly-1.0.2-2.fc18.x86_64 gstreamer1-plugins-bad-free-extras-1.0.5-1.fc18.x86_64 gstreamer1-plugins-base-1.0.5-3.fc18.x86_64 gstreamer1-plugins-good-extras-1.0.5-3.fc18.x86_64
> ERROR: Pipeline doesn't want to pause. > Missing element: DVB protocol source > ERROR: from element /GstURIDecodeBin:uridecodebin0: No URI handler implemented > for "dvb". This looks like the 'dvbbasebin' element is missing on your system. Do you have it installed? Check with: gst-inspect-1.0 dvbbasebin There should be a plugin file /usr/lib/......./gstreamer-1.0/libgstdvb.so somewhere on your system. I don't know which package that would be in, though I'd think it should be somewhere in -bad-free*, since there's nothing problematic about it really (other than requiring mpeg-2 plugins to actually decode stuff later, but that's not really relevant). There is also bug #690949 , however. YMMV.
Thanks for the hint, although it seems I do indeed have that plugin. Plugin Details: Name: dvb Description: DVB elements Filename: /usr/lib64/gstreamer-1.0/libgstdvb.so Version: 1.0.5 License: LGPL Source module: gst-plugins-bad Source release date: 2013-01-08 Binary package: Fedora GStreamer-plugins-bad package Origin URL: http://download.fedoraproject.org Hmm, seems I could be affected by that bug. (Version: 1.0.5) At least VLC is working with DVB in the meantime.
*** This bug has been marked as a duplicate of bug 690949 ***