From 289b04f170ddfa28ec4bc01794a8ef444b61a8b4 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 28 Nov 2013 15:13:06 -0300 Subject: [PATCH] ges: Reimplement 'always create a project to back a timeline' Keeping it simple, and making sure everything is synchronous --- ges/ges-project.c | 2 +- ges/ges-timeline.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ges/ges-project.c b/ges/ges-project.c index c6fd793..47ce90d 100644 --- a/ges/ges-project.c +++ b/ges/ges-project.c @@ -234,7 +234,7 @@ _uri_missing_accumulator (GSignalInvocationHint * ihint, GValue * return_accu, static GESExtractable * ges_project_extract (GESAsset * project, GError ** error) { - GESTimeline *timeline = ges_timeline_new (); + GESTimeline *timeline = g_object_new (GES_TYPE_TIMELINE, NULL); ges_extractable_set_asset (GES_EXTRACTABLE (timeline), GES_ASSET (project)); if (_load_project (GES_PROJECT (project), timeline, error)) diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c index 121eac9..73964b1 100644 --- a/ges/ges-timeline.c +++ b/ges/ges-timeline.c @@ -2374,7 +2374,13 @@ pad_removed_cb (GESTrack * track, GstPad * pad, TrackPrivate * tr_priv) GESTimeline * ges_timeline_new (void) { - return g_object_new (GES_TYPE_TIMELINE, NULL); + GESProject *project = ges_project_new (NULL); + GESExtractable *timeline = g_object_new (GES_TYPE_TIMELINE, NULL); + + ges_extractable_set_asset (timeline, GES_ASSET (project)); + gst_object_unref (project); + + return GES_TIMELINE (timeline); } /** -- 2.7.4