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 114331 - [threads] scheduler should not schedule PAUSED elements
[threads] scheduler should not schedule PAUSED elements
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.x
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-06-03 10:59 UTC by Julien MOUTTE
Modified: 2005-10-11 14:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-editor network to simulate the error (9.80 KB, application/xml)
2005-01-24 15:44 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
Details

Description Julien MOUTTE 2003-06-03 10:59:19 UTC
It seems that scheduler is scheduling element that are in PAUSED state..

For example if you try to play an audio file while xmms is playing through
oss at the same time. You will receive thousands of "error" signal from
pipeline with error message "osscommon: Unable to open /dev/dsp (in use ?)"

osssink was not able to switch to READY but it gets scheduled and i m
flooded by error messages.

Benjamin thinks it's a scheduler issue..

We would need to fix that for 0.6.2 !
Comment 1 Benjamin Otte (Company) 2003-06-03 11:08:33 UTC
There is another issue with this that is quite fundamental:

Some plugins seek back if they receive an EOS (bug 111498 is an
example of this - maybe two-pass encoding, too?)
An EOS makes plugins go to PAUSED however so they might not be
scheduled after that.
To fix that I can imagine 2 possibilities:
- Create a new state GST_STATE_EOS (ugly but makes sense, plugins
might behave differently when going to EOS than when going to PAUSED -
alsa for example drains the audio buffer and stops on EOS while it
immediately pauses when going to PAUSED, i had to special case there)
This is my preferred idea
- Allow plugins to set themselves to PLAYING when receiving events.
This is ugly somehow because state changes are something explicit and
shouldn't be triggered by weird stuff like seek events.
Comment 2 Ronald Bultje 2003-06-03 17:11:41 UTC
Isn't that totally unrelated to this, Benjamin?

And I'm not much in favour of introducing a new state, I'd rather fix
broken plugins. :).
Comment 3 Wim Taymans 2003-06-03 17:54:34 UTC
an EOS event on a plugin only makes that plugin go to PAUSED if the
plugin want that to happen (with gst_element_set_eos or when using the
default event handler gst_pad_event_default), an example of such a
plugin is mikmod and sidplay.

The scheduler should not schedule PAUSED elements and I doubt that it
does, I'm betting spider is trying to change the state of the osssink
repeadedly (as that's what triggers osssink to open the device)
Comment 4 David Schleef 2004-02-19 02:15:22 UTC
As a side note, it is not the scheduler that is scheduling a paused
element, it's an upstream PLAYING element that pushes a buffer to a
chained PAUSED element.  The scheduler still has the ability to stop
this, but it doesn't.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2005-01-24 14:56:44 UTC
Ronald pointed me to this. I have pipelines like e.g. two sines connected to an
volume each, then to an adder and that to a audio_sink.
When setting one sine to pause it continues to play. Pausing the volume works
though. The gst_element_set_state() reports no problem.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2005-01-24 15:44:38 UTC
Created attachment 36455 [details]
gst-editor network to simulate the error

set the pipeline to playing and then one sinesrc to paused
Comment 7 Ronald Bultje 2005-04-14 16:47:06 UTC
This may also be simulated using the testcase in #165928.
Comment 8 Andy Wingo 2005-07-14 15:08:03 UTC
Changing version to 0.8.x. Retargeting to 0.8.x too.
Comment 9 Andy Wingo 2005-10-11 14:22:44 UTC
Obsolete, this does not apply to 0.9, and I doubt anyone will fix it for 0.8.