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 111820 - Unable to play two files sequentially
Unable to play two files sequentially
Status: RESOLVED FIXED
Product: gnome-media
Classification: Deprecated
Component: Gnome-Sound-Recorder
2.2.x
Other Linux
: High major
: 2.4
Assigned To: gnome media maintainers
gnome media maintainers
: 111819 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-04-29 08:45 UTC by Frederic Crozat
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for this bug (550 bytes, patch)
2003-08-28 11:51 UTC, Balamurali Viswanathan
none Details | Review

Description Frederic Crozat 2003-04-29 08:45:16 UTC
1/ Open two files in g-s-r
2/ Start playing first file and stop playback
3/ Start playing second file => error popup (only with HEAD, since I've
added a popup error dialog :) because "/dev/dsp" is already used.

Analysis : when pressing "STOP", gst playback pipeline goes into "PAUSED"
state, which mean audio resource is still used. It should go into "READY"
state which should released audio resource (please, confirm this one, I'm
not 100% sure..)
Comment 1 Luis Villa 2003-07-11 02:33:31 UTC
Seems pretty significant, no? Restarting the app to do this is not ideal.
Comment 2 Benjamin Otte (Company) 2003-08-13 16:10:28 UTC
You must set the pipeline to NULL to get the audio device released.
READY only rewinds the stream.

A little GStreamer state change intro for all of you (note that some 
plugins still show buggy rbehaviour wrt this, file GStreamer bugs for 
it):
NULL <=> READY: Set up/Tear down everything external to GStreamer.
Device/file opening/closing happens here. As does connecting to 
servers and so on.
READY <=> PAUSED: Set up/Tear down everything internal to GStreamer.
Most of this is internal to GStreamer. The only important thing: 
Going to READY resets the stream. So when you restart you're at the 
beginning again.
PAUSED <=> PLAYING: Start/Stop realtime stuff.
This is only a difference between "are we really playing or not?" 
Clocks get started/stopped here for example.
Comment 3 Ted Gould 2003-08-14 15:49:46 UTC
I guess my question here comes down to: should we just be recommend
using ESD?  It seems like having the recorder tear down everything
when it isn't playing isn't really reasonable to have it do.  It
should be able to maintain some resources...  And ESD does solve this
problem right?  Essentially creating enough connections so everything
gets mixed together happilly.  I'm leaning twoards 'NOTABUG', anyone else?
Comment 4 Ted Gould 2003-08-19 06:28:22 UTC
*** Bug 111819 has been marked as a duplicate of this bug. ***
Comment 5 Frederic Crozat 2003-08-20 10:20:46 UTC
Using esd would only be a ugly workaround.. If I was trying to play
two files at the same time, I'll agree with you, but here, I try to
play one and then the other, sequentially.

This bug should really be fixed by setting pipeline to NULL when
pausing (I think RB does now the same thing, btw)
Comment 6 Balamurali Viswanathan 2003-08-28 11:50:13 UTC
Putting up a patch for this problem, please review the patch and give
your comments. Thanks.
Comment 7 Balamurali Viswanathan 2003-08-28 11:51:27 UTC
Created attachment 19579 [details] [review]
Patch for this bug
Comment 8 Balamurali Viswanathan 2003-08-28 12:00:22 UTC
With the attached patch I can open 2 files in sound recorder and play
them one after another. I am also able to play the opened file
repeatedly. But if the file size is bigger than I am able to play only
once or twice and after that I get the following error repeatedly, but
I guess this is a different problem.

(gnome-sound-recorder:1518): GStreamer-WARNING **: abnormal clock
request diff: ABS(14123774442) > 2000000000

The patch also does things similar to the sample program given in
http://gstreamer.net/docs/manual/ch12.html

Thanks
Comment 9 Kjartan Maraas 2003-09-02 23:25:12 UTC
Changing pri because of the patch.
Comment 10 Frederic Crozat 2003-09-05 09:53:54 UTC
This patch works perfectly.. I think it should go to r-t approval :)
Comment 11 Ted Gould 2003-09-05 20:20:37 UTC
Comitted to HEAD.  Thanks for the patch!