mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
timeline: Add all assets of the clip added to the timeline to the project
This commit is contained in:
parent
e7a45f0eef
commit
99a36b2b69
2 changed files with 11 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue