mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
ges: Add layer up to the wanted layer priority in the structure interface
Making the thing easier to use
This commit is contained in:
parent
6f1091f84a
commit
396196dfdf
1 changed files with 12 additions and 2 deletions
|
@ -135,11 +135,21 @@ GESLayer *
|
|||
_ges_get_layer_by_priority (GESTimeline * timeline, gint priority)
|
||||
{
|
||||
GList *layers, *tmp;
|
||||
gint nlayers;
|
||||
GESLayer *layer = NULL;
|
||||
|
||||
layers = ges_timeline_get_layers (timeline);
|
||||
if (priority == (gint) g_list_length (layers)) {
|
||||
layer = gst_object_ref (ges_timeline_append_layer (timeline));
|
||||
nlayers = (gint) g_list_length (layers);
|
||||
if (priority >= nlayers) {
|
||||
gint i = nlayers;
|
||||
|
||||
while (i <= priority) {
|
||||
layer = ges_timeline_append_layer (timeline);
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
layer = gst_object_ref (layer);
|
||||
|
||||
goto done;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue