[Xfce4-commits] <parole:master> Merge branch 'master' of github.com:ochosi/Parole

Simon Steinbeiss noreply at xfce.org
Mon Jul 23 01:25:09 CEST 2012


Updating branch refs/heads/master
         to 3d8217787b750620a5a9838cf42173000cce4dec (commit)
       from d60186cc80cbe6a2ade432beec6c9cc2ac18b621 (commit)

commit 3d8217787b750620a5a9838cf42173000cce4dec
Merge: d60186c 4565225
Author: Simon Steinbeiss <ochosi at xfce.org>
Date:   Thu Jul 19 18:09:48 2012 +0200

    Merge branch 'master' of github.com:ochosi/Parole

commit 4565225c5bab4abe7652f34d092f70b55a669def
Merge: 56f9f0a 4d67081
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Thu Jul 19 05:05:17 2012 -0400

    Merge branch 'master' of https://github.com/ochosi/Parole

commit 56f9f0acd5f18566e911e4484f148843135aebb9
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Thu Jul 19 05:04:48 2012 -0400

    Added audio stream switching.

 data/interfaces/parole.ui |    1 +
 src/gst/parole-gst.c      |    6 ++++++
 src/gst/parole-gst.h      |    2 ++
 src/parole-player.c       |    6 ++++++
 4 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index 8e10c15..60f2728 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -607,6 +607,7 @@
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
                                                 <property name="model">liststore_audiotrack</property>
+                                                <signal name="changed" handler="parole_player_combo_box_audiotrack_changed_cb" swapped="no"/>
                                               </object>
                                               <packing>
                                                 <property name="expand">False</property>
diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index b3948dd..a4d0959 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -2266,6 +2266,12 @@ gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name)
   return g_list_reverse (ret);
 }
 
+void
+gst_set_current_audio_track( ParoleGst *gst, gint track_no )
+{
+	g_object_set (G_OBJECT (gst->priv->playbin), "current-audio", (track_no), NULL);
+}
+
 const ParoleStream     *parole_gst_get_stream 		(ParoleGst *gst)
 {
     g_return_val_if_fail (PAROLE_IS_GST (gst), NULL);
diff --git a/src/gst/parole-gst.h b/src/gst/parole-gst.h
index 0f3e9f1..55f718c 100644
--- a/src/gst/parole-gst.h
+++ b/src/gst/parole-gst.h
@@ -142,6 +142,8 @@ void 			parole_gst_set_cursor_visible 	(ParoleGst *gst,
 							 
 GList *			gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name);
 
+void			gst_set_current_audio_track( ParoleGst *gst, gint track_no );
+
 const ParoleStream     *parole_gst_get_stream 		(ParoleGst *gst);
 							 
 G_END_DECLS
diff --git a/src/parole-player.c b/src/parole-player.c
index 9b8d10c..3102e09 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -2394,6 +2394,12 @@ void parole_player_play_uri_disc (ParolePlayer *player, const gchar *uri, const
     }
 }
 
+void parole_player_combo_box_audiotrack_changed_cb(GtkWidget *widget, ParolePlayer *player)
+{
+	gint index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack));
+	gst_set_current_audio_track(PAROLE_GST(player->priv->gst), index);
+}
+
 void parole_player_terminate (ParolePlayer *player)
 {
     parole_player_delete_event_cb (NULL, NULL, player);


More information about the Xfce4-commits mailing list