Project
Object Hierarchy:
Description:
public class Project : Asset, MetaContainer, AsyncInitable, Initable
The Project is used to control a set of Asset
and is a Asset with `GES_TYPE_TIMELINE` as extractable_type
itself.
That means that you can extract Timeline from a project as followed:
GESProject *project;
GESTimeline *timeline;
project = ges_project_new ("file:///path/to/a/valid/project/uri");
// Here you can connect to the various signal to get more infos about
// what is happening and recover from errors if possible
...
timeline = ges_asset_extract (GES_ASSET (project));
The Project class offers a higher level API to handle Asset-s. It lets you request new asset, and it informs you about new assets through a set of signals. Also it handles problem such as missing files/missing Element and lets you try to recover from those.
Subprojects
In order to add a subproject, the only thing to do is to add the subproject to the main project:
``` c ges_project_add_asset (project, GES_ASSET (subproject)); ``` then the subproject will be serialized in the project files. To use the subproject in a timeline, you should use a UriClip with the same subproject URI.
When loading a project with subproject, subprojects URIs will be temporary writable local files. If you want to edit the subproject timeline, you should retrieve the subproject from the parent project asset list and extract the timeline with extract and save it at the same temporary location.