From: Thibault Saunier Date: Wed, 1 May 2019 22:20:42 +0000 (-0400) Subject: project: Add a signal to notify when a new timeline is starting to load X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85e966963e7e48b12666ae46f426fd2d1ed886eb;p=platform%2Fupstream%2Fgst-editing-services.git project: Add a signal to notify when a new timeline is starting to load --- diff --git a/ges/ges-project.c b/ges/ges-project.c index 5f5baab..b65a1a0 100644 --- a/ges/ges-project.c +++ b/ges/ges-project.c @@ -80,6 +80,7 @@ typedef struct EmitLoadedInIdle enum { + LOADING_SIGNAL, LOADED_SIGNAL, ERROR_LOADING_ASSET, ASSET_ADDED_SIGNAL, @@ -179,6 +180,7 @@ _load_project (GESProject * project, GESTimeline * timeline, GError ** error) priv = GES_PROJECT (project)->priv; + g_signal_emit (project, _signals[LOADING_SIGNAL], 0, timeline); if (priv->uri == NULL) { EmitLoadedInIdle *data = g_slice_new (EmitLoadedInIdle); @@ -482,9 +484,22 @@ ges_project_class_init (GESProjectClass * klass) NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, GES_TYPE_ASSET); /** + * GESProject::loading: + * @project: the #GESProject that is starting to load a timeline + * @timeline: The #GESTimeline that started loading + * + * Since: 1.18 + */ + _signals[LOADING_SIGNAL] = + g_signal_new ("loading", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GESProjectClass, loading), + NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, + 1, GES_TYPE_TIMELINE); + + /** * GESProject::loaded: - * @project: the #GESProject that is done loading a project. - * @timeline: The #GESTimeline that complete loading + * @project: the #GESProject that is done loading a timeline. + * @timeline: The #GESTimeline that completed loading */ _signals[LOADED_SIGNAL] = g_signal_new ("loaded", G_TYPE_FROM_CLASS (klass), diff --git a/ges/ges-project.h b/ges/ges-project.h index 1823984..a964835 100644 --- a/ges/ges-project.h +++ b/ges/ges-project.h @@ -71,8 +71,10 @@ struct _GESProjectClass GType extractable_type); gboolean (*loaded) (GESProject * self, GESTimeline * timeline); + gboolean (*loading) (GESProject * self, + GESTimeline * timeline); - gpointer _ges_reserved[GES_PADDING]; + gpointer _ges_reserved[GES_PADDING - 1]; }; GES_API