launch: Add encoding profiles to the project

So it is serialized on `--save`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/227>
This commit is contained in:
Thibault Saunier 2021-01-15 15:27:30 -03:00
parent 8094f8cd93
commit 6336c1bb53

View file

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