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 167364 - Playing music from a newly-inserted CD right after Rhythmbox is launched causes the song time to be out of sync
Playing music from a newly-inserted CD right after Rhythmbox is launched caus...
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
0.8.8
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-14 16:53 UTC by Sebastien Bacher
Modified: 2005-07-21 14:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use gst_element_query rather than a g_timer (7.47 KB, patch)
2005-07-12 12:22 UTC, Jonathan Matthew
committed Details | Review

Description Sebastien Bacher 2005-02-14 16:53:17 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."
Comment 1 Jonathan Matthew 2005-07-12 12:22:35 UTC
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.
Comment 2 James "Doc" Livingston 2005-07-21 14:10:58 UTC
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)