summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2021-08-10 23:23:39 +0200
committerMathieu Duponchelle <mathieu@centricular.com>2021-08-14 18:07:56 +0200
commitee35cba6e837d961224a20b75273e2743fd4696a (patch)
treea595e30386ac075222ca6a0bdc43cb6e8703f4a7
parente12b3b7cef74b81e62f9b1124d8e82a90343a6a4 (diff)
launcher: don't start the pipeline before we're done updating it
Since 70e3b8ae2a8d13b50f52305b71cfa4b590bb63f6 the CommandLineFormatter also emit "loaded" so we ended up doing this twice, once as before in `run_pipeline` and another time in the `project:loaded` callback. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/265>
-rw-r--r--tools/ges-launcher.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/tools/ges-launcher.c b/tools/ges-launcher.c
index f4609b1e..43d17d97 100644
--- a/tools/ges-launcher.c
+++ b/tools/ges-launcher.c
@@ -692,12 +692,16 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline,
self->priv->seenerrors = TRUE;
g_application_quit (G_APPLICATION (self));
}
- _timeline_set_user_options (self, timeline, project_uri);
- if (project_uri) {
+
+ if (!_timeline_set_user_options (self, timeline, project_uri)) {
+ g_error ("Failed to set user options on timeline\n");
+ } else if (project_uri) {
if (!_set_rendering_details (self))
g_error ("Failed to setup rendering details\n");
}
+ print_timeline (self->priv->timeline);
+
g_free (project_uri);
if (!self->priv->seenerrors && opts->needs_set_state &&
@@ -947,22 +951,12 @@ _run_pipeline (GESLauncher * self)
g_error ("Failed to setup rendering details\n");
return FALSE;
}
-
- print_timeline (self->priv->timeline);
}
bus = gst_pipeline_get_bus (GST_PIPELINE (self->priv->pipeline));
gst_bus_add_signal_watch (bus);
g_signal_connect (bus, "message", G_CALLBACK (bus_message_cb), self);
- if (!opts->load_path) {
- if (opts->needs_set_state
- && gst_element_set_state (GST_ELEMENT (self->priv->pipeline),
- GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
- g_error ("Failed to start the pipeline\n");
- return FALSE;
- }
- }
g_application_hold (G_APPLICATION (self));
return TRUE;