GNOME Bugzilla – Bug 745073
playbin, discoverer: criticals when switching from pull mode to push mode
Last modified: 2015-06-14 20:38:29 UTC
Created attachment 297744 [details] Sample code Using GstDiscoverer for ogg files works fine if you specify the uri as file:///path/to/file.ogg. However if you open a fd to the same file and try to discover uri fd://<fdnum>, then you get the following: (gsttest:27197): GStreamer-CRITICAL **: pullrange on pad typefind:sink but it was not activated in pull mode This does work if you use the fd file name as an uri like this: file:///proc/self/fd/<fdnum>. Non-ogg files seem to work. Attached is a piece of sample code to demonstrate the issue.
If I comment out all the print_duration calls but the last, fdsrc seems to work correctly. The problem seems to be related to reconfiguring the pipeline from the normal file source to the fd source. I can reproduce this with the standard gst-discoverer-1.0 tool too. The following succeeds: gst-discoverer-1.0 fd://3 3< file1.ogg And the following gives an error when discovering the second file: gst-discoverer-1.0 file1.ogg fd://3 3< file2.ogg The output on dicovering the second URI is: Analyzing fd://3 (gst-discoverer-1.0:22235): GStreamer-CRITICAL **: pullrange on pad typefind:sink but it was not activated in pull mode Done discovering fd://3 An error was encountered while discovering the file GStreamer encountered a general stream error. Further evidence that this is related to pipeline reconfiguration, discovering two file descriptor sources seems to work fine: gst-discoverer-1.0 fd://3 fd://4 3< file1.ogg 4< file2.ogg For reference, this was using GStreamer 1.4.5 from Ubuntu Vivid.
Also affects playbin(!). Also happens in git master. Easier way to reproduce: gst-discoverer-1.0 file1.ogg pushfile:///path/to/file2.ogg
This fixes part of the problem commit 53e8e7da75e4eeaa1054eb24e50568b32d8bd6b1 Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu Mar 12 12:59:57 2015 +0000 typefind: Reset segment when deactivating pull mode or not running in pull mode We use the segment format to detect if we run the streaming thread or not. Without resetting we might believe we do so, although we only did in the past and are now running in e.g. push mode. https://bugzilla.gnome.org/show_bug.cgi?id=745073
Actually all problems :)
Follow up: commit 7be8acbfb0e08ea8bcd6833a7e0a71d1132f6b14 Author: Tim-Philipp Müller <tim@centricular.com> Date: Sun Jun 14 20:48:29 2015 +0100 typefindelement: reset segment only once streaming has stopped Fixes the occasional criticals in the discoverer unit test. https://bugzilla.gnome.org/show_bug.cgi?id=745073 https://bugzilla.gnome.org/show_bug.cgi?id=750823