mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
ges:launch: Handle setting playback information in scenarios
This way we can avoid real sinks when implementing scenarios
This commit is contained in:
parent
32dae5e3da
commit
f55033223f
4 changed files with 14 additions and 9 deletions
|
@ -211,7 +211,7 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline,
|
|||
|
||||
if (self->priv->parsed_options.load_path && project_uri
|
||||
&& ges_validate_activate (GST_PIPELINE (self->priv->pipeline),
|
||||
opts) == FALSE) {
|
||||
self, opts) == FALSE) {
|
||||
g_error ("Could not activate scenario %s", opts->scenario);
|
||||
self->priv->seenerrors = TRUE;
|
||||
g_application_quit (G_APPLICATION (self));
|
||||
|
@ -441,7 +441,7 @@ _run_pipeline (GESLauncher * self)
|
|||
|
||||
if (!opts->load_path) {
|
||||
if (ges_validate_activate (GST_PIPELINE (self->priv->pipeline),
|
||||
opts) == FALSE) {
|
||||
self, opts) == FALSE) {
|
||||
g_error ("Could not activate scenario %s", opts->scenario);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -726,7 +726,7 @@ ges_launcher_get_playback_option_group (GESLauncherParsedOptions * opts)
|
|||
}
|
||||
|
||||
gboolean
|
||||
ges_launcher_parse_options (GESLauncherParsedOptions * opts,
|
||||
ges_launcher_parse_options (GESLauncher * self,
|
||||
gchar ** arguments[], gint * argc, GOptionContext * ctx, GError ** error)
|
||||
{
|
||||
gboolean res;
|
||||
|
@ -735,6 +735,7 @@ ges_launcher_parse_options (GESLauncherParsedOptions * opts,
|
|||
gchar **commands = NULL, *help, *tmp;
|
||||
GError *err = NULL;
|
||||
gboolean owns_ctx = ctx == NULL;
|
||||
GESLauncherParsedOptions *opts = &self->priv->parsed_options;
|
||||
GOptionEntry options[] = {
|
||||
{"disable-mixing", 0, 0, G_OPTION_ARG_NONE, &opts->disable_mixing,
|
||||
"Do not use mixing elements to mix layers together.", NULL}
|
||||
|
@ -826,6 +827,7 @@ ges_launcher_parse_options (GESLauncherParsedOptions * opts,
|
|||
|
||||
if (owns_ctx) {
|
||||
g_option_context_free (ctx);
|
||||
_set_playback_details (self);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
@ -846,7 +848,7 @@ _local_command_line (GApplication * application, gchar ** arguments[],
|
|||
argc = g_strv_length (*arguments);
|
||||
|
||||
gst_init (&argc, arguments);
|
||||
if (!ges_launcher_parse_options (opts, arguments, &argc, ctx, &error)) {
|
||||
if (!ges_launcher_parse_options (self, arguments, &argc, ctx, &error)) {
|
||||
gst_init (NULL, NULL);
|
||||
printerr ("Error initializing: %s\n", error->message);
|
||||
g_option_context_free (ctx);
|
||||
|
|
|
@ -91,7 +91,7 @@ GType ges_launcher_get_type (void);
|
|||
|
||||
GESLauncher* ges_launcher_new (void);
|
||||
gint ges_launcher_get_exit_status (GESLauncher *self);
|
||||
gboolean ges_launcher_parse_options(GESLauncherParsedOptions* opts, gchar*** arguments, gint *argc, GOptionContext* ctx, GError** error);
|
||||
gboolean ges_launcher_parse_options(GESLauncher* self, gchar*** arguments, gint *argc, GOptionContext* ctx, GError** error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -101,7 +101,8 @@ ges_validate_register_issues (void)
|
|||
}
|
||||
|
||||
gboolean
|
||||
ges_validate_activate (GstPipeline * pipeline, GESLauncherParsedOptions * opts)
|
||||
ges_validate_activate (GstPipeline * pipeline, GESLauncher * launcher,
|
||||
GESLauncherParsedOptions * opts)
|
||||
{
|
||||
GstValidateRunner *runner = NULL;
|
||||
GstValidateMonitor *monitor = NULL;
|
||||
|
@ -142,7 +143,8 @@ ges_validate_activate (GstPipeline * pipeline, GESLauncherParsedOptions * opts)
|
|||
for (i = 0; ges_options[i]; i++)
|
||||
ges_options_full[i + 1] = g_strdup (ges_options[i]);
|
||||
|
||||
ges_launcher_parse_options (opts, &ges_options_full, NULL, NULL, NULL);
|
||||
ges_launcher_parse_options (launcher, &ges_options_full, NULL, NULL,
|
||||
NULL);
|
||||
g_strfreev (ges_options_full);
|
||||
g_strfreev (ges_options);
|
||||
}
|
||||
|
@ -230,7 +232,8 @@ _print_position (GstElement * pipeline)
|
|||
}
|
||||
|
||||
gboolean
|
||||
ges_validate_activate (GstPipeline * pipeline, GESLauncherParsedOptions * opts)
|
||||
ges_validate_activate (GstPipeline * pipeline, GESLauncher * launcher,
|
||||
GESLauncherParsedOptions * opts)
|
||||
{
|
||||
if (opts->scenario) {
|
||||
GST_WARNING ("Trying to run scenario %s, but gst-validate not supported",
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
gboolean
|
||||
ges_validate_activate(GstPipeline* pipeline, GESLauncherParsedOptions* opts);
|
||||
ges_validate_activate(GstPipeline* pipeline, GESLauncher *launcher, GESLauncherParsedOptions* opts);
|
||||
void ges_launch_validate_uri(const gchar* nid);
|
||||
|
||||
gint
|
||||
|
|
Loading…
Reference in a new issue