launch: Add encoding profiles to the project
authorThibault Saunier <tsaunier@igalia.com>
Fri, 15 Jan 2021 18:27:30 +0000 (15:27 -0300)
committerThibault Saunier <tsaunier@igalia.com>
Wed, 10 Feb 2021 19:14:47 +0000 (16:14 -0300)
So it is serialized on `--save`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/227>

tools/ges-launcher.c

index acfd38e..baf8ae7 100644 (file)
@@ -477,13 +477,14 @@ _set_rendering_details (GESLauncher * self)
     return TRUE;
   }
 
+  proj =
+      GES_PROJECT (ges_extractable_get_asset (GES_EXTRACTABLE (self->
+              priv->timeline)));
+
   /* Setup profile/encoding if needed */
   if (opts->outputuri) {
     GstEncodingProfile *prof = NULL;
     if (!opts->format) {
-      GESProject *proj =
-          GES_PROJECT (ges_extractable_get_asset (GES_EXTRACTABLE (self->priv->
-                  timeline)));
       const GList *profiles = ges_project_list_encoding_profiles (proj);
 
       if (profiles) {
@@ -542,6 +543,8 @@ _set_rendering_details (GESLauncher * self)
           "");
       describe_encoding_profile (prof);
       g_print ("\n");
+
+      ges_project_add_encoding_profile (proj, prof);
     }
 
     opts->outputuri = ensure_uri (opts->outputuri);