summaryrefslogtreecommitdiff
path: root/gst-play
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-08-12 16:00:15 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-08-12 18:13:31 +0200
commit6fdac7ed7307b53bb6523545bf918d942380b18b (patch)
tree91e33f831d09dcc130e3940fd7850d03d0b308c0 /gst-play
parent44af626c3d84489072f68b0525822eeee3370f02 (diff)
player: Abstract the signal emission dispatching to a new interface
This allows to implement signal dispatching to other event loop systems than GLib without having direct GLib support in the base GstPlayer class. A implementation for the GLib main context is provided and used in the applications and tests.
Diffstat (limited to 'gst-play')
-rw-r--r--gst-play/gst-play.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gst-play/gst-play.c b/gst-play/gst-play.c
index f22e3f2..368b814 100644
--- a/gst-play/gst-play.c
+++ b/gst-play/gst-play.c
@@ -351,9 +351,10 @@ play_new (gchar ** uris, gdouble initial_volume)
play->num_uris = g_strv_length (uris);
play->cur_idx = -1;
- play->player = gst_player_new ();
+ play->player =
+ gst_player_new_full (gst_player_g_main_context_signal_dispatcher_new
+ (NULL));
- g_object_set (play->player, "dispatch-to-main-context", TRUE, NULL);
g_signal_connect (play->player, "position-updated",
G_CALLBACK (position_updated_cb), play);
g_signal_connect (play->player, "state-changed",
@@ -447,9 +448,8 @@ play_next (GstPlay * play)
if (play->repeat) {
g_print ("Looping playlist \n");
play->cur_idx = -1;
- }
- else
- return FALSE;
+ } else
+ return FALSE;
}
play_uri (play, play->uris[++play->cur_idx]);