mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
validate: Add an action type to ungroup containers
This commit is contained in:
parent
9f4877b2f5
commit
6e2354bd79
1 changed files with 46 additions and 0 deletions
|
@ -466,6 +466,35 @@ _container_remove_child (GstValidateScenario * scenario,
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
_ungroup (GstValidateScenario * scenario, GstValidateAction * action)
|
||||||
|
{
|
||||||
|
GESContainer *container;
|
||||||
|
gboolean recursive = FALSE;
|
||||||
|
const gchar *container_name;
|
||||||
|
|
||||||
|
gboolean res = TRUE;
|
||||||
|
|
||||||
|
DECLARE_AND_GET_TIMELINE (scenario, action);
|
||||||
|
|
||||||
|
container_name =
|
||||||
|
gst_structure_get_string (action->structure, "container-name");
|
||||||
|
container =
|
||||||
|
GES_CONTAINER (ges_timeline_get_element (timeline, container_name));
|
||||||
|
g_return_val_if_fail (GES_IS_CONTAINER (container), FALSE);
|
||||||
|
|
||||||
|
gst_validate_printf (action, "Ungrouping children from container %s\n",
|
||||||
|
GES_TIMELINE_ELEMENT_NAME (container));
|
||||||
|
|
||||||
|
gst_structure_get_boolean (action->structure, "recursive", &recursive);
|
||||||
|
|
||||||
|
g_list_free (ges_container_ungroup (container, recursive));
|
||||||
|
|
||||||
|
gst_object_unref (timeline);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_set_control_source (GstValidateScenario * scenario, GstValidateAction * action)
|
_set_control_source (GstValidateScenario * scenario, GstValidateAction * action)
|
||||||
{
|
{
|
||||||
|
@ -985,6 +1014,23 @@ ges_validate_register_action_types (void)
|
||||||
{NULL}
|
{NULL}
|
||||||
}, "Remove a child from @container-name.", FALSE);
|
}, "Remove a child from @container-name.", FALSE);
|
||||||
|
|
||||||
|
gst_validate_register_action_type ("ungroup-container", "ges", _ungroup,
|
||||||
|
(GstValidateActionParameter []) {
|
||||||
|
{
|
||||||
|
.name = "container-name",
|
||||||
|
.description = "The name of the GESContainer to ungroup children from",
|
||||||
|
.types = "string",
|
||||||
|
.mandatory = TRUE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "recursive",
|
||||||
|
.description = "Wether to recurse ungrouping or not.",
|
||||||
|
.types = "boolean",
|
||||||
|
.mandatory = FALSE,
|
||||||
|
},
|
||||||
|
{NULL}
|
||||||
|
}, "Ungroup children of @container-name.", FALSE);
|
||||||
|
|
||||||
gst_validate_register_action_type ("set-control-source", "ges", _set_control_source,
|
gst_validate_register_action_type ("set-control-source", "ges", _set_control_source,
|
||||||
(GstValidateActionParameter []) {
|
(GstValidateActionParameter []) {
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue