return FALSE;
if (priv->pending_assets == NULL)
- g_idle_add ((GSourceFunc) _loading_done_cb, g_object_ref (self));
+ ges_idle_add ((GSourceFunc) _loading_done_cb, g_object_ref (self), NULL);
return TRUE;
}
G_GNUC_INTERNAL GstElementFactory *
ges_get_compositor_factory (void);
+G_GNUC_INTERNAL void
+ges_idle_add (GSourceFunc func, gpointer udata, GDestroyNotify notify);
+
/****************************************************
* GESContainer *
data->project = gst_object_ref (project);
/* Make sure the signal is emitted after the functions ends */
- g_idle_add ((GSourceFunc) _emit_loaded_in_idle, data);
+ ges_idle_add ((GSourceFunc) _emit_loaded_in_idle, data, NULL);
return TRUE;
}
}
data->arg = g_param_spec_ref (arg);
data->self = gst_object_ref (self);
- g_idle_add ((GSourceFunc) emit_deep_notify_in_idle, data);
+ ges_idle_add ((GSourceFunc) emit_deep_notify_in_idle, data, NULL);
}
gboolean
return compositor_factory;
}
+void
+ges_idle_add (GSourceFunc func, gpointer udata, GDestroyNotify notify)
+{
+ GMainContext *context = g_main_context_get_thread_default ();
+ GSource *source = g_idle_source_new ();
+ if (!context)
+ context = g_main_context_default ();
+
+ g_source_set_callback (source, func, udata, notify);
+ g_source_attach (source, context);
+
+}
+
gboolean
ges_nle_composition_add_object (GstElement * comp, GstElement * object)
{