mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
ges-validate: Add support for Layer.auto-transition
+ Fix a bug where the mandatory field name for the name of the clip to remove in remove-clip did not correspond to what we used in the action (clip-name vs name).
This commit is contained in:
parent
f362e81a29
commit
4691210030
1 changed files with 14 additions and 3 deletions
|
@ -206,7 +206,7 @@ _add_layer (GstValidateScenario * scenario, GstValidateAction * action)
|
||||||
GESTimeline *timeline = get_timeline (scenario);
|
GESTimeline *timeline = get_timeline (scenario);
|
||||||
GESLayer *layer;
|
GESLayer *layer;
|
||||||
gint priority;
|
gint priority;
|
||||||
gboolean res = FALSE;
|
gboolean res = FALSE, auto_transition = FALSE;
|
||||||
|
|
||||||
if (!gst_structure_get_int (action->structure, "priority", &priority)) {
|
if (!gst_structure_get_int (action->structure, "priority", &priority)) {
|
||||||
GST_ERROR ("priority is needed when adding a layer");
|
GST_ERROR ("priority is needed when adding a layer");
|
||||||
|
@ -223,8 +223,12 @@ _add_layer (GstValidateScenario * scenario, GstValidateAction * action)
|
||||||
goto beach;
|
goto beach;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_structure_get_boolean (action->structure, "auto-transition",
|
||||||
|
&auto_transition);
|
||||||
|
|
||||||
layer = ges_layer_new ();
|
layer = ges_layer_new ();
|
||||||
g_object_set (layer, "priority", priority, NULL);
|
g_object_set (layer, "priority", priority, "auto-transition", auto_transition,
|
||||||
|
NULL);
|
||||||
res = ges_timeline_add_layer (timeline, layer);
|
res = ges_timeline_add_layer (timeline, layer);
|
||||||
|
|
||||||
beach:
|
beach:
|
||||||
|
@ -579,6 +583,13 @@ ges_validate_register_action_types (void)
|
||||||
.mandatory = TRUE,
|
.mandatory = TRUE,
|
||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "auto-transition",
|
||||||
|
.description = "Wheter auto-transition is activated on the new layer.",
|
||||||
|
.mandatory = FALSE,
|
||||||
|
.types="boolean",
|
||||||
|
.def = "False"
|
||||||
|
},
|
||||||
{ NULL }
|
{ NULL }
|
||||||
},
|
},
|
||||||
"Allows to remove a layer from the current timeline", FALSE);
|
"Allows to remove a layer from the current timeline", FALSE);
|
||||||
|
@ -633,7 +644,7 @@ ges_validate_register_action_types (void)
|
||||||
gst_validate_register_action_type ("remove-clip", "ges", _remove_clip,
|
gst_validate_register_action_type ("remove-clip", "ges", _remove_clip,
|
||||||
(GstValidateActionParameter []) {
|
(GstValidateActionParameter []) {
|
||||||
{
|
{
|
||||||
.name = "clip-name",
|
.name = "name",
|
||||||
.description = "The name of the clip to remove",
|
.description = "The name of the clip to remove",
|
||||||
.types = "string",
|
.types = "string",
|
||||||
.mandatory = TRUE,
|
.mandatory = TRUE,
|
||||||
|
|
Loading…
Reference in a new issue