mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
ges-validate: Add an action to serialize the project
https://bugzilla.gnome.org/show_bug.cgi?id=729382 Conflicts: tools/ges-validate.c
This commit is contained in:
parent
4ce52d8a62
commit
8601666a5a
1 changed files with 17 additions and 0 deletions
|
@ -80,6 +80,17 @@ _set_child_property (GstValidateScenario * scenario, GstValidateAction * action)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
_serialize_project (GstValidateScenario * scenario, GstValidateAction * action)
|
||||||
|
{
|
||||||
|
const gchar *uri = gst_structure_get_string (action->structure, "uri");
|
||||||
|
GESTimeline *timeline = get_timeline (scenario);
|
||||||
|
|
||||||
|
gst_validate_printf (action, "Saving project to %s", uri);
|
||||||
|
|
||||||
|
return ges_timeline_save_to_uri (timeline, uri, NULL, TRUE, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_edit_clip (GstValidateScenario * scenario, GstValidateAction * action)
|
_edit_clip (GstValidateScenario * scenario, GstValidateAction * action)
|
||||||
{
|
{
|
||||||
|
@ -177,6 +188,10 @@ ges_validate_activate (GstPipeline * pipeline, const gchar * scenario)
|
||||||
const gchar *set_child_property_mandatory_fields[] =
|
const gchar *set_child_property_mandatory_fields[] =
|
||||||
{ "element-name", "property", "value", NULL };
|
{ "element-name", "property", "value", NULL };
|
||||||
|
|
||||||
|
const gchar *serialize_project_mandatory_fields[] = { "uri",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
gst_validate_init ();
|
gst_validate_init ();
|
||||||
|
|
||||||
if (g_strcmp0 (scenario, "none")) {
|
if (g_strcmp0 (scenario, "none")) {
|
||||||
|
@ -187,6 +202,8 @@ ges_validate_activate (GstPipeline * pipeline, const gchar * scenario)
|
||||||
|
|
||||||
gst_validate_add_action_type ("edit-clip", _edit_clip,
|
gst_validate_add_action_type ("edit-clip", _edit_clip,
|
||||||
move_clip_mandatory_fields, "Allows to seek into the files", FALSE);
|
move_clip_mandatory_fields, "Allows to seek into the files", FALSE);
|
||||||
|
gst_validate_add_action_type ("serialize-project", _serialize_project,
|
||||||
|
serialize_project_mandatory_fields, "serializes a project", FALSE);
|
||||||
|
|
||||||
gst_validate_add_action_type ("set-child-property", _set_child_property,
|
gst_validate_add_action_type ("set-child-property", _set_child_property,
|
||||||
set_child_property_mandatory_fields,
|
set_child_property_mandatory_fields,
|
||||||
|
|
Loading…
Reference in a new issue