totem r5589 - in trunk: . src src/backend src/plugins/lirc
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5589 - in trunk: . src src/backend src/plugins/lirc
- Date: Thu, 21 Aug 2008 12:45:30 +0000 (UTC)
Author: hadess
Date: Thu Aug 21 12:45:30 2008
New Revision: 5589
URL: http://svn.gnome.org/viewvc/totem?rev=5589&view=rev
Log:
2008-08-21 Bastien Nocera <hadess hadess net>
* src/plugins/lirc/totem-lirc.c (totem_lirc_to_command):
* src/plugins/lirc/totem_lirc_default:
* src/totem.c (totem_action_remote):
* src/totem.h: Add support for the stop remote control key,
will stop the playback and go back to the beginning of the playlist
(as the stop button on a CD player would do)
* src/backend/bacon-video-widget-gst-0.10.c (got_time_tick),
(bacon_video_widget_stop): Don't print out warnings when trying to
stop a stream but nothing is opened
See http://bugzilla.gnome.org/show_bug.cgi?id=470672#c3
Modified:
trunk/ChangeLog
trunk/src/backend/bacon-video-widget-gst-0.10.c
trunk/src/plugins/lirc/totem-lirc.c
trunk/src/plugins/lirc/totem_lirc_default
trunk/src/totem.c
trunk/src/totem.h
Modified: trunk/src/backend/bacon-video-widget-gst-0.10.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-gst-0.10.c (original)
+++ trunk/src/backend/bacon-video-widget-gst-0.10.c Thu Aug 21 12:45:30 2008
@@ -1644,7 +1644,6 @@
g_return_if_fail (bvw != NULL);
g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
- g_return_if_fail (bvw->priv->logo_mode == FALSE);
bvw->priv->current_time_nanos = time_nanos;
@@ -2950,9 +2949,6 @@
GST_LOG ("Stopping");
bvw_stop_play_pipeline (bvw);
- if (bvw->priv->logo_mode == FALSE)
- return;
-
/* Reset position to 0 when stopping */
got_time_tick (GST_ELEMENT (bvw->priv->play), 0, bvw);
}
Modified: trunk/src/plugins/lirc/totem-lirc.c
==============================================================================
--- trunk/src/plugins/lirc/totem-lirc.c (original)
+++ trunk/src/plugins/lirc/totem-lirc.c Thu Aug 21 12:45:30 2008
@@ -67,6 +67,7 @@
/* strings that we recognize as commands from lirc */
#define TOTEM_IR_COMMAND_PLAY "play"
#define TOTEM_IR_COMMAND_PAUSE "pause"
+#define TOTEM_IR_COMMAND_STOP "stop"
#define TOTEM_IR_COMMAND_NEXT "next"
#define TOTEM_IR_COMMAND_PREVIOUS "previous"
#define TOTEM_IR_COMMAND_SEEK_FORWARD "seek_forward"
@@ -133,6 +134,8 @@
return TOTEM_REMOTE_COMMAND_PAUSE;
else if (strcmp (str, TOTEM_IR_COMMAND_PLAYPAUSE) == 0)
return TOTEM_REMOTE_COMMAND_PLAYPAUSE;
+ else if (strcmp (str, TOTEM_IR_COMMAND_STOP) == 0)
+ return TOTEM_REMOTE_COMMAND_STOP;
else if (strcmp (str, TOTEM_IR_COMMAND_NEXT) == 0)
return TOTEM_REMOTE_COMMAND_NEXT;
else if (strcmp (str, TOTEM_IR_COMMAND_PREVIOUS) == 0)
Modified: trunk/src/plugins/lirc/totem_lirc_default
==============================================================================
--- trunk/src/plugins/lirc/totem_lirc_default (original)
+++ trunk/src/plugins/lirc/totem_lirc_default Thu Aug 21 12:45:30 2008
@@ -20,6 +20,14 @@
begin
prog = Totem
remote = *
+ button = KEY_STOP
+ repeat = 0
+ config = stop
+end
+
+begin
+ prog = Totem
+ remote = *
button = KEY_FASTFORWARD
repeat = 1
config = seek_forward
Modified: trunk/src/totem.c
==============================================================================
--- trunk/src/totem.c (original)
+++ trunk/src/totem.c Thu Aug 21 12:45:30 2008
@@ -2164,6 +2164,20 @@
case TOTEM_REMOTE_COMMAND_PAUSE:
totem_action_pause (totem);
break;
+ case TOTEM_REMOTE_COMMAND_STOP: {
+ char *mrl, *subtitle;
+
+ totem_playlist_set_at_start (totem->playlist);
+ update_buttons (totem);
+ totem_action_stop (totem);
+ mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
+ if (mrl != NULL) {
+ totem_action_set_mrl_with_warning (totem, mrl, subtitle, FALSE);
+ bacon_video_widget_pause (totem->bvw);
+ g_free (mrl);
+ g_free (subtitle);
+ }
+ };
case TOTEM_REMOTE_COMMAND_SEEK_FORWARD:
totem_action_seek_relative (totem, SEEK_FORWARD_OFFSET * 1000);
break;
Modified: trunk/src/totem.h
==============================================================================
--- trunk/src/totem.h (original)
+++ trunk/src/totem.h Thu Aug 21 12:45:30 2008
@@ -41,6 +41,7 @@
TOTEM_REMOTE_COMMAND_UNKNOWN,
TOTEM_REMOTE_COMMAND_PLAY,
TOTEM_REMOTE_COMMAND_PAUSE,
+ TOTEM_REMOTE_COMMAND_STOP,
TOTEM_REMOTE_COMMAND_PLAYPAUSE,
TOTEM_REMOTE_COMMAND_NEXT,
TOTEM_REMOTE_COMMAND_PREVIOUS,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]