GNOME Bugzilla – Bug 350799
play on startup doesn't work
Last modified: 2006-12-19 15:41:28 UTC
That bug has been described on https://launchpad.net/distros/ubuntu/+source/gnome-media/+bug/51900 "After selecting the option to "Start playback when CD player starts" and then restarting, gnome-cd starts in paused mode instead of playback mode. This also occurs if starting gnome-cd from the command line: $ gnome-cd --play version gnome-cd 2.14.2 Ubuntu 6.06 LTS"
That appears due to the gst0.10 port. Tim, is it still possible to directly gst_element_set_play (pipe);? If not, how do we workaround this?
Created attachment 71649 [details] [review] fix It is still possible, but that's not the problem here I think. Can't test with CVS HEAD right now since I don't have Gtk+-2.10 installed here, but did some tests with a version from April. According to the GST_DEBUG=gnome-cd:5 log what happens is that it calls play_cb(), which gets the status first and then tells the backend to start playing. Even though playbin is up and running at this point, the _get_status() seems to fail though. I believe this is because the backend didn't have a chance to process the TAG messages on the bus yet (which is where it gets its disc layout information from) because the main loop hasn't run yet. The easy fix is to move the play_cb() in main() to a low priority idle callback, so that all bus messages have been processed before it is called. Patch for that is attached. If you want to have a fix that's local to the backend it could probably be solved by manually processing pending bus messages in _ensure_open() or so. I can't say off the top of my head if doing that would have any side-effects.
Ping? Is this fix acceptable?
I first want to test it for the side-effects.
Ah, okay. This one shouldn't have any side-effects though (as far as I can see at least).
Assuming you tested all regular cases, then please apply.
Commited. Thanks.