Commit ca562ba8 authored by Thibault Saunier's avatar Thibault Saunier
Browse files

clip: Return the newly created TrackElement when adding an asset

This is a minor API change
parent 002977cd
......@@ -1417,16 +1417,23 @@ _trim (GESTimelineElement * element, GstClockTime start)
* Takes a reference on @track_element.
* Returns: %TRUE on success, %FALSE on failure.
* Returns: (transfer none)(allow-none): Created #GESTrackElement or NULL
* if an error happened
GESTrackElement *
ges_clip_add_asset (GESClip * clip, GESAsset * asset)
g_return_val_if_fail (GES_IS_CLIP (clip), FALSE);
g_return_val_if_fail (GES_IS_ASSET (asset), FALSE);
GESTrackElement *element;
g_return_val_if_fail (GES_IS_CLIP (clip), NULL);
g_return_val_if_fail (GES_IS_ASSET (asset), NULL);
g_return_val_if_fail (g_type_is_a (ges_asset_get_extractable_type
element = GES_TRACK_ELEMENT (ges_asset_extract (asset, NULL));
if (!ges_container_add (GES_CONTAINER (clip), GES_TIMELINE_ELEMENT (element)))
return NULL;
return ges_container_add (GES_CONTAINER (clip),
GES_TIMELINE_ELEMENT (ges_asset_extract (asset, NULL)));
return element;
......@@ -144,7 +144,7 @@ GType ges_clip_get_type (void);
GESTrackType ges_clip_get_supported_formats (GESClip *clip);
void ges_clip_set_supported_formats (GESClip *clip, GESTrackType supportedformats);
gboolean ges_clip_add_asset (GESClip *clip, GESAsset *asset);
GESTrackElement* ges_clip_add_asset (GESClip *clip, GESAsset *asset);
GESTrackElement* ges_clip_find_track_element (GESClip *clip, GESTrack *track,
GType type);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment