build: Add an option to disable examples

And make it yield as in other modules

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/198>
This commit is contained in:
Thibault Saunier 2020-07-08 07:42:38 -04:00
parent 3a6530a127
commit e291383237
2 changed files with 13 additions and 5 deletions

View file

@ -23,3 +23,4 @@ option('libpython-dir', type : 'string', value : '',
description: 'Path to find libpythonXX.so')
option('validate', type : 'feature', value : 'auto', yield: true,
description: 'Enable GstValidate integration.')
option('examples', type : 'feature', value : 'auto', yield : true)

View file

@ -141,14 +141,21 @@ static GstEncodingProfile *
get_smart_profile (GESLauncher * self)
{
gint n_audio, n_video;
GList *tmp, *assets, *possible_profiles = NULL;
GList *tmp, *assets = NULL, *possible_profiles = NULL;
GstEncodingProfile *res = NULL;
GESProject *proj =
GES_PROJECT (ges_extractable_get_asset (GES_EXTRACTABLE (self->
priv->timeline)));
_check_has_audio_video (self, &n_audio, &n_video);
assets = ges_project_list_assets (proj, GES_TYPE_URI_CLIP);
for (tmp = self->priv->timeline->layers; tmp; tmp = tmp->next) {
GList *tclip, *clips = ges_layer_get_clips (tmp->data);
for (tclip = clips; tclip; tclip = tclip->next) {
if (GES_IS_URI_CLIP (tclip->data))
assets =
g_list_append (assets, ges_extractable_get_asset (tclip->data));
}
g_list_free_full (clips, gst_object_unref);
}
for (tmp = assets; tmp; tmp = tmp->next) {
GESAsset *asset = tmp->data;
GList *audio_streams, *video_streams;