totem r5564 - in trunk: . src
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5564 - in trunk: . src
- Date: Mon, 18 Aug 2008 11:57:19 +0000 (UTC)
Author: hadess
Date: Mon Aug 18 11:57:19 2008
New Revision: 5564
URL: http://svn.gnome.org/viewvc/totem?rev=5564&view=rev
Log:
2008-08-18 Bastien Nocera <hadess hadess net>
* src/totem-session.c (totem_session_restore):
* src/totem.c (update_mrl_label), (on_error_event),
(update_seekable): Only seek for session restore once
we've opened the file, and we know it's seekable,
fixes restoring playlists from the session, including
seeking (Closes: #434936)
Modified:
trunk/ChangeLog
trunk/src/totem-session.c
trunk/src/totem.c
Modified: trunk/src/totem-session.c
==============================================================================
--- trunk/src/totem-session.c (original)
+++ trunk/src/totem-session.c Mon Aug 18 11:57:19 2008
@@ -145,11 +145,8 @@
totem_action_set_mrl_with_warning (totem, mrl, subtitle, FALSE);
- if (totem->seek_to != 0) {
- bacon_video_widget_seek_time (totem->bvw,
- totem->seek_to, NULL);
- }
- bacon_video_widget_pause (totem->bvw);
+ /* We do the seeking after being told that the stream is seekable,
+ * not straight away */
g_free (mrl);
g_free (subtitle);
Modified: trunk/src/totem.c
==============================================================================
--- trunk/src/totem.c (original)
+++ trunk/src/totem.c Mon Aug 18 11:57:19 2008
@@ -992,17 +992,8 @@
static void
update_mrl_label (Totem *totem, const char *name)
{
- gint time;
-
if (name != NULL)
{
- /* Get the length of the stream */
- time = bacon_video_widget_get_stream_length (totem->bvw);
- totem_statusbar_set_time_and_length (TOTEM_STATUSBAR
- (totem->statusbar), 0, time / 1000);
-
- g_object_notify (G_OBJECT (totem), "stream-length");
-
/* Update the mrl label */
totem_fullscreen_set_title (totem->fs, name);
@@ -1717,6 +1708,10 @@
on_error_event (BaconVideoWidget *bvw, char *message,
gboolean playback_stopped, gboolean fatal, Totem *totem)
{
+ /* Clear the seek if it's there, we only want to try and seek
+ * the first file, even if it's not there */
+ totem->seek_to = 0;
+
if (playback_stopped)
play_pause_set_label (totem, STATE_STOPPED);
@@ -1765,6 +1760,14 @@
action = gtk_action_group_get_action (action_group, "skip-backwards");
gtk_action_set_sensitive (action, seekable);
+ /* This is for the session restore to seek */
+ if (seekable != FALSE && totem->seek_to != 0) {
+ bacon_video_widget_seek_time (totem->bvw,
+ totem->seek_to, NULL);
+ totem_action_pause (totem);
+ }
+ totem->seek_to = 0;
+
g_object_notify (G_OBJECT (totem), "seekable");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]