totem r5486 - in trunk: . src src/backend
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5486 - in trunk: . src src/backend
- Date: Fri, 20 Jun 2008 16:30:09 +0000 (UTC)
Author: hadess
Date: Fri Jun 20 16:30:09 2008
New Revision: 5486
URL: http://svn.gnome.org/viewvc/totem?rev=5486&view=rev
Log:
2008-06-20 Bastien Nocera <hadess hadess net>
* src/backend/bacon-video-widget-xine.c (setup_config),
(xine_event_message), (bacon_video_widget_get_mrls):
Ask xine-lib to not remember the last DVB channel used,
so we don't have to skip one when copying the MRLs,
prepare for better error message when getting the list
of MRLs for DVB
* src/totem-playlist.c (totem_playlist_mrl_to_title):
Another label work-around for DVB MRLs, just like the DVD one
* src/totem.c (totem_action_set_mrl_with_warning),
(totem_action_open_files_list), (totem_action_remote),
(on_eos_event): When calling play_pause_set_label() make sure the
right enum is used (fixes playlist and play button showing the
wrong status), Only call "_load_media()" for DVB, it will
automatically start playing if it's successful,
Print out a decent error message when receiving an EOS from DVB,
it can only happen when losing the signal
Modified:
trunk/ChangeLog
trunk/src/backend/bacon-video-widget-xine.c
trunk/src/totem-playlist.c
trunk/src/totem.c
Modified: trunk/src/backend/bacon-video-widget-xine.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-xine.c (original)
+++ trunk/src/backend/bacon-video-widget-xine.c Fri Jun 20 16:30:09 2008
@@ -824,6 +824,12 @@
entry.num_value = 0;
xine_config_update_entry (bvw->priv->xine, &entry);
+ /* Don't save the last viewed channel for DVB */
+ bvw_config_helper_num (bvw->priv->xine,
+ "media.dvb.remember_channel", 1, &entry);
+ entry.num_value = 0;
+ xine_config_update_entry (bvw->priv->xine, &entry);
+
if (bvw->priv->gc == NULL) {
g_warning ("GConf not available, broken installation?");
return;
@@ -1340,6 +1346,7 @@
case XINE_MSG_NO_ERROR:
return;
case XINE_MSG_GENERAL_WARNING:
+ g_message ("general warning: %s", data->messages);
if (data->messages != NULL && strcmp (data->messages, "DVB Signal Lost. Please check connections.") == 0) {
num = BVW_ERROR_INVALID_DEVICE;
message = g_strdup (_("The TV adapter could not tune into the channel. Please check your hardware setup, and channel configuration."));
@@ -3521,11 +3528,15 @@
}
} else if (type == MEDIA_TYPE_DVB) {
/* No channels.conf, and we couldn't find it */
- if (g_str_has_prefix (mrls[0], "Sorry") != FALSE)
+ if (g_str_has_prefix (mrls[0], "Sorry, No valid channels.conf found") != FALSE) {
+ return NULL;
+ } else if (g_str_has_prefix (mrls[0], "Sorry, No DVB input device found.") != FALSE) {
+ g_message ("Device is busy...");
return NULL;
+ }
/* The first channel can be the last channel played,
* or a copy of the first one, ignore it */
- return bacon_video_widget_strdupnv ((const char **) mrls++, num_mrls - 1);
+ return bacon_video_widget_strdupnv ((const char **) mrls, num_mrls);
}
return bacon_video_widget_strdupnv ((const char **) mrls, num_mrls);
Modified: trunk/src/totem-playlist.c
==============================================================================
--- trunk/src/totem-playlist.c (original)
+++ trunk/src/totem-playlist.c Fri Jun 20 16:30:09 2008
@@ -275,6 +275,9 @@
/* This is "Title 3", where title is a DVD title
* Note: NOT a DVD chapter */
return g_strdup_printf (_("Title %d"), (int) g_strtod (mrl + 6, NULL));
+ } else if (g_str_has_prefix (mrl, "dvb://") != FALSE) {
+ /* This is "BBC ONE(BBC)" for "dvb://BBC ONE(BBC)" */
+ return g_strdup (mrl + 6);
}
file = g_file_new_for_uri (mrl);
Modified: trunk/src/totem.c
==============================================================================
--- trunk/src/totem.c (original)
+++ trunk/src/totem.c Fri Jun 20 16:30:09 2008
@@ -1035,14 +1035,14 @@
totem->mrl = NULL;
bacon_video_widget_close (totem->bvw);
totem_file_closed (totem);
- play_pause_set_label (totem, TOTEM_PLAYLIST_STATUS_NONE);
+ play_pause_set_label (totem, STATE_STOPPED);
}
if (mrl == NULL)
{
retval = FALSE;
- play_pause_set_label (totem, TOTEM_PLAYLIST_STATUS_NONE);
+ play_pause_set_label (totem, STATE_STOPPED);
/* Play/Pause */
totem_action_set_sensitivity ("play", FALSE);
@@ -1960,7 +1960,7 @@
totem_playlist_add_mrl (totem->playlist, data, NULL);
changed = TRUE;
} else if (g_str_equal (filename, "dvb:") != FALSE) {
- totem_action_play_media (totem, MEDIA_TYPE_DVB, "0");
+ totem_action_load_media (totem, MEDIA_TYPE_DVB, "0");
changed = TRUE;
} else if (totem_playlist_add_mrl (totem->playlist, filename, NULL) != FALSE) {
totem_action_add_recent (totem, filename);
@@ -2186,7 +2186,7 @@
/* FIXME b0rked */
totem_action_play_media (totem, MEDIA_TYPE_VCD, NULL);
} else if (g_str_has_prefix (url, "dvb:") != FALSE) {
- totem_action_play_media (totem, MEDIA_TYPE_DVB, "0");
+ totem_action_load_media (totem, MEDIA_TYPE_DVB, "0");
} else if (totem_playlist_add_mrl_with_cursor (totem->playlist, url, NULL) != FALSE) {
totem_action_add_recent (totem, url);
}
@@ -2516,6 +2516,15 @@
if (bacon_video_widget_get_logo_mode (totem->bvw) != FALSE)
return FALSE;
+ /* EOS on DVB means that we lost the signal */
+ if (totem->mrl != NULL && g_str_has_prefix (totem->mrl, "dvb://") != FALSE) {
+ totem_action_stop (totem);
+ totem_action_error_and_exit (_("TV signal lost"),
+ _("Please verify your hardware setup."),
+ totem);
+ return FALSE;
+ }
+
if (totem_playlist_has_next_mrl (totem->playlist) == FALSE
&& totem_playlist_get_repeat (totem->playlist) == FALSE)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]