summaryrefslogtreecommitdiff
path: root/gtk
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 /gtk
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 'gtk')
-rw-r--r--gtk/gtk-play.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
index b1ad7ac..c601f32 100644
--- a/gtk/gtk-play.c
+++ b/gtk/gtk-play.c
@@ -1730,7 +1730,9 @@ gtk_play_constructor (GType type, guint n_construct_params,
(GtkPlay *) G_OBJECT_CLASS (gtk_play_parent_class)->constructor (type,
n_construct_params, construct_params);
- self->player = gst_player_new ();
+ self->player =
+ gst_player_new_full (gst_player_g_main_context_signal_dispatcher_new
+ (NULL));
self->playing = TRUE;
if (self->inhibit_cookie)
@@ -1740,8 +1742,6 @@ gtk_play_constructor (GType type, guint n_construct_params,
gtk_application_inhibit (GTK_APPLICATION (g_application_get_default ()),
GTK_WINDOW (self), GTK_APPLICATION_INHIBIT_IDLE, "Playing media");
- g_object_set (self->player, "dispatch-to-main-context", TRUE, NULL);
-
create_ui (self);
g_signal_connect (self->player, "position-updated",