GNOME Bugzilla – Bug 634927
id3v2 typefind pull_range versus live source deadlock
Last modified: 2012-09-11 00:52:17 UTC
From today's GStreamer (all of it):
+ Trace 224692
Thread 1 (Thread 0x7f02ddf07720 (LWP 16659))
The end of a GST_DEBUG=3 log is this: 0:00:05.053817216 16659 0x929500 DEBUG GST_REGISTRY gstregistry.c:545:gst_registry_add_feature:<registry0> adding feature 0xb5d690 (image/vnd.adobe.photoshop) 0:00:05.053825260 16659 0x929500 INFO GST_TYPEFIND gsttypefind.c:82:gst_type_find_register: registering typefind function for xdgmime-base 0:00:05.053838491 16659 0x929500 DEBUG GST_TYPEFIND gsttypefind.c:85:gst_type_find_register:<typefindfactory296> using new typefind factory for xdgmime-base 0:00:05.053848251 16659 0x929500 DEBUG GST_REGISTRY gstregistry.c:538:gst_registry_add_feature:<registry0> replacing existing feature 0x963090 (xdgmime-base) 0:00:05.053862507 16659 0x929500 DEBUG GST_REGISTRY gstregistry.c:545:gst_registry_add_feature:<registry0> adding feature 0xb5e080 (xdgmime-base) 0:00:05.053871352 16659 0x929500 INFO GST_PLUGIN_LOADING gstplugin.c:857:gst_plugin_load_file: plugin "/opt/yobuild/lib64/gstreamer-0.10/libgsttypefindfunctions.so" loaded 0:00:05.053880335 16659 0x929500 DEBUG GST_PLUGIN_LOADING gstpluginfeature.c:114:gst_plugin_feature_load: loaded plugin typefindfunctions 0:00:05.053905922 16659 0x929500 DEBUG basesrc gstbasesrc.c:492:gst_base_src_wait_playing:<audiosrc> live source waiting for running state
This bug can be reproduced via: gst-launch pulsesrc ! decodebin2 ! fakesink The typefindelement in decodebin succeeds in activating pulsesrc in pull mode, tries to pull from within the pad activate function, and deadlocks.
Why does a live source activate in pull mode at all? GstBaseSrc bug?
pulsesrc is activated in PULL mode because of the below method. static gboolean gst_base_audio_src_check_get_range (GstBaseSrc * bsrc) { /* we allow limited pull base operation of which the details * will eventually exposed in an as of yet non-existing query. * Basically pulling can be done on any number of bytes as long * as the offset is -1 or sequentially increasing. */ return TRUE; }
(In reply to comment #2) > Why does a live source activate in pull mode at all? GstBaseSrc bug? I think this problem because of BaseAudioSrc (Comment 3)
Any news on this? I'm running in to the same issue.
The scheduling query was added in 0.11 now. I guess we should disable pullmode scheduling in 0.10 (or at least make a can-activate-pull property in basesrc)
I got it working by patching pulsesrc to use a custom check_get_range that returns false. But as you say it might be nice with a property in basesrc instead as it would make it easier for stuff that derives from that.
commit a85991eeb8eaf15b9d01f3e2013ba1f3dfef38ee Author: Tim-Philipp Müller <tim@centricular.net> Date: Mon Sep 10 21:39:32 2012 +0100 baseparse, typefind: only activate in pull mode if upstream is seekable Upstream might support pull mode, but only sequential pulls, which isn't gonna do much for us. https://bugzilla.gnome.org/show_bug.cgi?id=634927