}
project_uri = ges_project_get_uri (project);
- _timeline_set_user_options (self, timeline, project_uri);
if (self->priv->parsed_options.load_path && project_uri
&& ges_validate_activate (GST_PIPELINE (self->priv->pipeline),
- opts->scenario, &opts->needs_set_state) == FALSE) {
+ &opts->track_types, opts->scenario,
+ &opts->needs_set_state) == FALSE) {
g_error ("Could not activate scenario %s", opts->scenario);
self->priv->seenerrors = TRUE;
g_application_quit (G_APPLICATION (self));
}
+ _timeline_set_user_options (self, timeline, project_uri);
g_free (project_uri);
if (!opts->load_path) {
if (ges_validate_activate (GST_PIPELINE (self->priv->pipeline),
- opts->scenario, &opts->needs_set_state) == FALSE) {
+ &opts->track_types, opts->scenario,
+ &opts->needs_set_state) == FALSE) {
g_error ("Could not activate scenario %s", opts->scenario);
return FALSE;
}
#include "config.h"
#endif
+#include "utils.h"
#include "ges-validate.h"
#include <string.h>
-#include <ges/ges.h>
#ifdef HAVE_GST_VALIDATE
#include <gst/validate/gst-validate-scenario.h>
#include <gst/validate/validate.h>
#include <gst/validate/gst-validate-utils.h>
#include <gst/validate/gst-validate-element-monitor.h>
+#include <gst/validate/gst-validate-bin-monitor.h>
#define MONITOR_ON_PIPELINE "validate-monitor"
#define RUNNER_ON_PIPELINE "runner-monitor"
" in a Video track).", GST_VALIDATE_REPORT_LEVEL_CRITICAL));
}
-
gboolean
-ges_validate_activate (GstPipeline * pipeline, const gchar * scenario,
- gboolean * needs_setting_state)
+ges_validate_activate (GstPipeline * pipeline, GESTrackType * track_types,
+ const gchar * scenario, gboolean * needs_setting_state)
{
GstValidateRunner *runner = NULL;
GstValidateMonitor *monitor = NULL;
monitor =
gst_validate_monitor_factory_create (GST_OBJECT_CAST (pipeline), runner,
NULL);
+ if (GST_VALIDATE_BIN_MONITOR (monitor)->scenario) {
+ GstStructure *metas =
+ GST_VALIDATE_BIN_MONITOR (monitor)->scenario->description;
+
+ if (metas) {
+ const gchar *track_types_str;
+
+ if ((track_types_str =
+ gst_structure_get_string (metas, "ges-track-types"))) {
+ if (!get_flags_from_string (GES_TYPE_TRACK_TYPE, track_types_str,
+ track_types)) {
+ GST_ERROR_OBJECT (pipeline, "Scenario track types: %s no valid",
+ track_types_str);
+ return FALSE;
+ }
+ }
+ }
+ }
gst_validate_reporter_set_handle_g_logs (GST_VALIDATE_REPORTER (monitor));
}
gboolean
-ges_validate_activate (GstPipeline * pipeline, const gchar * scenario,
- gboolean * needs_setting_state)
+ges_validate_activate (GstPipeline * pipeline, GESTrackType * track_types,
+ const gchar * scenario, gboolean * needs_setting_state)
{
if (scenario) {
GST_WARNING ("Trying to run scenario %s, but gst-validate not supported",
#include <glib.h>
#include <gio/gio.h>
#include <gst/gst.h>
+#include <ges/ges.h>
G_BEGIN_DECLS
gboolean
-ges_validate_activate (GstPipeline *pipeline, const gchar *scenario, gboolean *needs_set_state);
+ges_validate_activate (GstPipeline *pipeline, GESTrackType *track_types,
+ const gchar *scenario, gboolean *needs_set_state);
void ges_launch_validate_uri (const gchar *nid);
gint