Project
Object Hierarchy:
GES.Project
GES.Project
GES.Project
GES.Asset
GES.Asset
GES.Asset->GES.Project
GLib.Object
GLib.Object
GLib.Object->GES.Asset
GES.MetaContainer
GES.MetaContainer
GES.MetaContainer->GES.Project
GES.MetaContainer->GES.Asset
GLib.AsyncInitable
GLib.AsyncInitable
GLib.AsyncInitable->GES.Project
GLib.AsyncInitable->GES.Asset
GLib.Initable
GLib.Initable
GLib.Initable->GES.Project
GLib.Initable->GES.Asset
Description:
[
CCode ( type_id =
"ges_project_get_type ()" ) ]
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.
Content:
Properties:
public string uri { owned get ; construct ; }
Creation methods:
Methods:
public bool add_asset (Asset asset)
Adds a Asset to
this , the project will keep a reference on asset
.
public bool add_encoding_profile (EncodingProfile profile)
Adds profile
to the project.
public void add_formatter (Formatter formatter)
Adds a formatter as used to load this
public bool create_asset (string ? id, Type extractable_type)
Create and add a Asset to
this .
public Asset ? create_asset_sync (string ? id, Type extractable_type) throws Error
Create and add a Asset to
this .
public Asset ? get_asset (string id, Type extractable_type)
public List <Asset > get_loading_assets ()
Get the assets that are being loaded
public string ? get_uri ()
Retrieve the uri that is currently set on
this
public List <Asset > list_assets (Type filter)
List all asset
contained in
this filtering per extractable_type as defined by filter
.
public unowned List <EncodingProfile >? list_encoding_profiles ()
Lists the encoding profile that have been set to
this .
public bool load (Timeline timeline) throws Error
Loads this into timeline
public virtual bool loading_error (Error error, string id, Type extractable_type)
public bool remove_asset (Asset asset)
remove a asset
to from this
.
public bool save (Timeline timeline, string uri, owned Asset ? formatter_asset, bool overwrite) throws Error
Save the timeline of this to
uri
.
Signals:
public virtual signal void asset_added (Asset asset)
public virtual signal void asset_loading (Asset asset)
public virtual signal void asset_removed (Asset asset)
public signal void error_loading (Timeline timeline, Error error)
public signal void error_loading_asset (Error error, string id, Type extractable_type)
Informs you that a Asset
could not be created.
public virtual signal void loaded (Timeline timeline)
public virtual signal void loading (Timeline timeline)
public virtual signal string ? missing_uri (Error error, Asset wrong_asset)
static gchar source_moved_cb (GESProject *project, GError *error, GESAsset *asset_with_error) { return g_strdup ("file:///the/new/uri.ogg" ); }static int main (int argc, gchar ** argv) { GESTimeline *timeline; GESProject *project = ges_project_new ("file:///some/uri.xges" ); g_signal_connect (project, "missing-uri" , source_moved_cb, NULL ); timeline = ges_asset_extract (GES_ASSET (project)); }
Inherited Members:
All known members inherited from class GES.Asset
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface GES.MetaContainer
All known members inherited from interface GLib.AsyncInitable
All known members inherited from interface GLib.Initable