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 675264 - pulsesink: Wrong time cursor position when a playlist is finished in totem
pulsesink: Wrong time cursor position when a playlist is finished in totem
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.x
Other Linux
: Normal minor
: 1.6.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-01 21:31 UTC by Sébastien Wilmet
Modified: 2015-10-30 13:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst log (40.41 KB, text/plain)
2013-03-18 09:00 UTC, Bastien Nocera
Details

Description Sébastien Wilmet 2012-05-01 21:31:33 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.
Comment 1 Bastien Nocera 2013-03-08 14:23:33 UTC
I'm pretty sure we fixed something similar for GNOME 3.6. Can you please check whether that's fixed?
Comment 2 Sébastien Wilmet 2013-03-10 14:05:00 UTC
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).
Comment 3 Bastien Nocera 2013-03-18 09:00:23 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2013-12-20 14:43:58 UTC
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?
Comment 5 Sébastien Wilmet 2014-09-29 11:51:10 UTC
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: ^^^
Comment 6 Bastien Nocera 2014-09-29 11:54:36 UTC
(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
Comment 7 Bastien Nocera 2014-09-29 11:56:19 UTC
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.
Comment 8 Sebastian Dröge (slomo) 2014-09-29 12:45:48 UTC
Can you reproduce it with GIT master? There were some related changes some weeks ago.
Comment 9 Sébastien Wilmet 2014-09-29 15:01:18 UTC
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
Comment 10 Sébastien Wilmet 2015-10-30 11:04:36 UTC
It's fixed with Totem 3.18 and GStreamer 1.6.0.