GNOME Bugzilla – Bug 167364
Playing music from a newly-inserted CD right after Rhythmbox is launched causes the song time to be out of sync
Last modified: 2005-07-21 14:10:58 UTC
This bug has been opened here: https://bugzilla.ubuntu.com/4748 "Recently, I inserted a CD full of sound files and launched Rhythmbox to play one. I imported the files to the library and clicked on the file I wanted to play. At that moment, the CD drive spinned up and about 3 seconds later I heard the music. However, the elapsed time in Rhythmbox was out of sync, reading 3-4 seconds more than it should."
Created attachment 49012 [details] [review] use gst_element_query rather than a g_timer The problem is that the time displayed is based on a g_timer started when rb_player_open is called, not on the actual playback position. I think this is a leftover from the old playback pipeline. playbin seems to report the playback position correctly. The patch also reworks RBHeader so it uses the tick signal emitted by RBPlayer rather than polling. I've been testing this patch for about an hour and it's working fine so far.
2005-07-22 James Livingston <jrl@ids.org.au> * player/rb-player-gst.c: (rb_player_finalize), (rb_player_construct), (rb_player_sync_pipeline), (rb_player_open), (rb_player_pause), (rb_player_set_time), (rb_player_get_time): * widgets/rb-header.c: (rb_header_class_init), (rb_header_init), (rb_header_finalize), (rb_header_set_property), (rb_header_get_property), (rb_header_sync_time), (rb_header_get_elapsed_string), (rb_header_update_elapsed), (rb_header_tick_cb): Query GStreamer, rather than using a timer, to determine the current playback position. Patch from Jonathan Matthew <jonathan@kaolin.hn.org> (Closes 167364)