summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@collabora.com>2013-11-25 15:17:33 -0300
committerThibault Saunier <thibault.saunier@collabora.com>2013-11-25 15:18:24 -0300
commit99a36b2b695ef8d595beb8a610b7a99f9fbeab6a (patch)
tree2c4f8733f5d7e2c39b1a6c4fc579e0be5f97fbf8
parente7a45f0eef880a5530431c8ae1984a85169921d6 (diff)
timeline: Add all assets of the clip added to the timeline to the project
-rw-r--r--ges/ges-project.c1
-rw-r--r--ges/ges-timeline.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/ges/ges-project.c b/ges/ges-project.c
index 5600a3a9..9cbb883c 100644
--- a/ges/ges-project.c
+++ b/ges/ges-project.c
@@ -236,6 +236,7 @@ ges_project_extract (GESAsset * project, GError ** error)
{
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))
return GES_EXTRACTABLE (timeline);
diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c
index 1edfd2f0..241c0d18 100644
--- a/ges/ges-timeline.c
+++ b/ges/ges-timeline.c
@@ -2042,6 +2042,8 @@ clip_track_element_removed_cb (GESClip * clip,
static void
layer_object_added_cb (GESLayer * layer, GESClip * clip, GESTimeline * timeline)
{
+ GESProject *project;
+
/* We make sure not to be connected twice */
g_signal_handlers_disconnect_by_func (clip, clip_track_element_added_cb,
timeline);
@@ -2063,7 +2065,15 @@ layer_object_added_cb (GESLayer * layer, GESClip * clip, GESTimeline * timeline)
return;
}
+
add_object_to_tracks (timeline, clip, NULL);
+
+ GST_DEBUG ("Making sure that the asset is in our project");
+ project =
+ GES_PROJECT (ges_extractable_get_asset (GES_EXTRACTABLE (timeline)));
+ ges_project_add_asset (project,
+ ges_extractable_get_asset (GES_EXTRACTABLE (clip)));
+
GST_DEBUG ("Done");
}