mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
ges: Add a ges_timeline_append_layer convenience method
API: ges_timeline_append_layer
This commit is contained in:
parent
09e0d1bbe2
commit
8d15025aae
3 changed files with 27 additions and 0 deletions
|
@ -236,6 +236,7 @@ ges_timeline_new
|
|||
ges_timeline_new_audio_video
|
||||
ges_timeline_new_from_uri
|
||||
ges_timeline_add_layer
|
||||
ges_timeline_append_layer
|
||||
ges_timeline_remove_layer
|
||||
ges_timeline_add_track
|
||||
ges_timeline_remove_track
|
||||
|
|
|
@ -696,6 +696,31 @@ layer_object_removed_cb (GESTimelineLayer * layer, GESTimelineObject * object,
|
|||
GST_DEBUG ("Done");
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_append_layer:
|
||||
* @timeline: a #GESTimeline
|
||||
* @layer: the #GESTimelineLayer to add
|
||||
*
|
||||
* Convenience method to append @layer to @timeline which means that the
|
||||
* priority of @layer is changed to correspond to the last layer of @timeline.
|
||||
* The reference to the @layer will be stolen by @timeline.
|
||||
*
|
||||
* Returns: TRUE if the layer was properly added, else FALSE.
|
||||
*/
|
||||
gboolean
|
||||
ges_timeline_append_layer (GESTimeline * timeline, GESTimelineLayer * layer)
|
||||
{
|
||||
guint32 priority;
|
||||
GESTimelinePrivate *priv = timeline->priv;
|
||||
|
||||
GST_DEBUG ("Appending layer to layer:%p, timeline:%p", timeline, layer);
|
||||
priority = g_list_length (priv->layers);
|
||||
|
||||
ges_timeline_layer_set_priority (layer, priority);
|
||||
|
||||
return ges_timeline_add_layer (timeline, layer);
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_add_layer:
|
||||
* @timeline: a #GESTimeline
|
||||
|
|
|
@ -89,6 +89,7 @@ gboolean ges_timeline_load_from_uri (GESTimeline *timeline, const gchar *uri);
|
|||
gboolean ges_timeline_save_to_uri (GESTimeline *timeline, const gchar *uri);
|
||||
|
||||
gboolean ges_timeline_add_layer (GESTimeline *timeline, GESTimelineLayer *layer);
|
||||
gboolean ges_timeline_append_layer (GESTimeline * timeline, GESTimelineLayer * layer);
|
||||
gboolean ges_timeline_remove_layer (GESTimeline *timeline, GESTimelineLayer *layer);
|
||||
GList* ges_timeline_get_layers (GESTimeline *timeline);
|
||||
|
||||
|
|
Loading…
Reference in a new issue