GNOME Bugzilla – Bug 675264
pulsesink: Wrong time cursor position when a playlist is finished in totem
Last modified: 2015-10-30 13:44:18 UTC
To give the context, when the playlist (containing more than one media file) is finished, and if the repeat mode is disabled, the current media file selected is the first one and the mode is "paused". But the time cursor is not at the beginning position, which can be a bit confusing. For example, if the duration of the last media file is 5:12, the time cursor will be at this position, but in the first media. If the duration of the first media is less than 5:12, for example 3:31, then the cursor position will be at the end, but in the statusbar it is written "Paused | 5:12 / 3:31". When making some tests, to continue the example, if I place the cursor at 5:02 in the last song and wait 10 seconds so the playlist is finished, the time cursor in the first file will be at 0:10, not 5:12. Anyway, the time cursor position should be at 0:00 when the playlist is finished. Or, alternatively, the media selected could be the last one, and the cursor should be at the end in this case. But maybe it's more convenient to be at the beginning of the playlist so it's easy to replay it.
I'm pretty sure we fixed something similar for GNOME 3.6. Can you please check whether that's fixed?
In Totem from the master branch, the bug is still there but there is an improvement: the "bullet" cursor disappear when the playlist is finished. However, we still see the blue line in the progress bar for the time. And in the statusbar, it is still written something like "Paused | 0:09" (if we played the last 9 seconds of the last song of the playlist).
Created attachment 239102 [details] gst log I can reproduce this problem with matroska files, without any problems on a recent gst 1.x build. I've added a "About to call time tick" debug message before the gst_element_query_position() call in bvw_query_timeout() and it looks like the pulse sink isn't flushing when changing streams: 0:00:16.292975804 9853 0x1bf7640 DEBUG basesink gstbasesink.c:4382:gst_base_sink_get_position:<audio-sink-actual-sink-pulse> in paused, using start time 0:00:05.269158000 and reports an incorrect position.
Is totem setting playbin to the READY state when switching files, or using the about-to-finish stuff? What exactly is it doing when starting-but-pausing the first file again?
Still happen with Totem 3.14. (In reply to comment #4) > Is totem setting playbin to the READY state when switching files, or using the > about-to-finish stuff? What exactly is it doing when starting-but-pausing the > first file again? Bastien: ^^^
(In reply to comment #5) > Still happen with Totem 3.14. > > (In reply to comment #4) > > Is totem setting playbin to the READY state when switching files, or using the > > about-to-finish stuff? What exactly is it doing when starting-but-pausing the > > first file again? > > Bastien: ^^^ Dude! You're the one that reworked that code :) It goes to READY: https://git.gnome.org/browse/totem/tree/src/backend/bacon-video-widget.c#n4167
Totem goes to GST_STATE_PAUSED when EOS is sent, then it seeks to 0 with gst_element_seek() (in PAUSED state as well). And that's it.
Can you reproduce it with GIT master? There were some related changes some weeks ago.
Yes, still happen with GStreamer from git (with totem 3.14.0). It is easy to reproduce: 1. $ totem directory-with-several-songs/ 2. play the last ~10 seconds of the last song in the playist
It's fixed with Totem 3.18 and GStreamer 1.6.0.