mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
validate: Handle passing timeline desc in .validatetest files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/227>
This commit is contained in:
parent
410fd67045
commit
8094f8cd93
4 changed files with 21 additions and 0 deletions
|
@ -469,6 +469,7 @@ _set_rendering_details (GESLauncher * self)
|
||||||
GESLauncherParsedOptions *opts = &self->priv->parsed_options;
|
GESLauncherParsedOptions *opts = &self->priv->parsed_options;
|
||||||
gboolean smart_profile = FALSE;
|
gboolean smart_profile = FALSE;
|
||||||
GESPipelineFlags cmode = ges_pipeline_get_mode (self->priv->pipeline);
|
GESPipelineFlags cmode = ges_pipeline_get_mode (self->priv->pipeline);
|
||||||
|
GESProject *proj;
|
||||||
|
|
||||||
if (cmode & GES_PIPELINE_MODE_RENDER
|
if (cmode & GES_PIPELINE_MODE_RENDER
|
||||||
|| cmode & GES_PIPELINE_MODE_SMART_RENDER) {
|
|| cmode & GES_PIPELINE_MODE_SMART_RENDER) {
|
||||||
|
@ -918,12 +919,23 @@ _run_pipeline (GESLauncher * self)
|
||||||
GESLauncherParsedOptions *opts = &self->priv->parsed_options;
|
GESLauncherParsedOptions *opts = &self->priv->parsed_options;
|
||||||
|
|
||||||
if (!opts->load_path) {
|
if (!opts->load_path) {
|
||||||
|
g_clear_pointer (&opts->sanitized_timeline, &g_free);
|
||||||
if (ges_validate_activate (GST_PIPELINE (self->priv->pipeline),
|
if (ges_validate_activate (GST_PIPELINE (self->priv->pipeline),
|
||||||
self, opts) == FALSE) {
|
self, opts) == FALSE) {
|
||||||
g_error ("Could not activate scenario %s", opts->scenario);
|
g_error ("Could not activate scenario %s", opts->scenario);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opts->sanitized_timeline) {
|
||||||
|
GESProject *project = ges_project_new (opts->sanitized_timeline);
|
||||||
|
|
||||||
|
if (!ges_project_load (project, self->priv->timeline, NULL)) {
|
||||||
|
ges_printerr ("Could not load timeline: %s\n",
|
||||||
|
opts->sanitized_timeline);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!_timeline_set_user_options (self, self->priv->timeline, NULL)) {
|
if (!_timeline_set_user_options (self, self->priv->timeline, NULL)) {
|
||||||
ges_printerr ("Could not properly set tracks\n");
|
ges_printerr ("Could not properly set tracks\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -183,6 +183,8 @@ ges_validate_activate (GstPipeline * pipeline, GESLauncher * launcher,
|
||||||
|
|
||||||
ges_launcher_parse_options (launcher, &ges_options_full, NULL, NULL,
|
ges_launcher_parse_options (launcher, &ges_options_full, NULL, NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
opts->sanitized_timeline =
|
||||||
|
sanitize_timeline_description (ges_options_full, opts);
|
||||||
g_strfreev (ges_options_full);
|
g_strfreev (ges_options_full);
|
||||||
g_strfreev (ges_options);
|
g_strfreev (ges_options);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
|
|
||||||
|
#include "utils.h"
|
||||||
#include "ges-launcher.h"
|
#include "ges-launcher.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
|
@ -110,6 +110,12 @@ sanitize_timeline_description (gchar ** args, GESLauncherParsedOptions * opts)
|
||||||
prev_arg = args[i];
|
prev_arg = args[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i == 1) {
|
||||||
|
g_free (string);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (strstr (string, "+track")) {
|
if (strstr (string, "+track")) {
|
||||||
gchar *res = g_strconcat ("ges:", string, NULL);
|
gchar *res = g_strconcat ("ges:", string, NULL);
|
||||||
g_free (string);
|
g_free (string);
|
||||||
|
|
Loading…
Reference in a new issue