From 4f0bb60c912a519cfd8e4d268c7c074c7a6f9070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Fri, 16 Oct 2020 13:17:04 +0200 Subject: [PATCH] meson: update glib minimum version to 2.56 In order to support the symbol g_enum_to_string in various project using GStreamer ( gst-validate etc.), the glib minimum version should be 2.56.0. Remove compat code as glib requirement is now > 2.56 Version used by Ubuntu 18.04 LTS Part-of: --- ges/ges-asset.c | 35 ++++++++++++++--------------------- meson.build | 2 +- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/ges/ges-asset.c b/ges/ges-asset.c index c924ff07f8..c2f334dd6e 100644 --- a/ges/ges-asset.c +++ b/ges/ges-asset.c @@ -351,34 +351,27 @@ ges_asset_extract_default (GESAsset * asset, GError ** error) GParameter *params; GESAssetPrivate *priv = asset->priv; GESExtractable *n_extractable; - + gint i; + GValue *values; + const gchar **names; params = ges_extractable_type_get_parameters_from_id (priv->extractable_type, priv->id, &n_params); -#if GLIB_CHECK_VERSION(2, 53, 1) - { - gint i; - GValue *values; - const gchar **names; - values = g_malloc0 (sizeof (GValue) * n_params); - names = g_malloc0 (sizeof (gchar *) * n_params); + values = g_malloc0 (sizeof (GValue) * n_params); + names = g_malloc0 (sizeof (gchar *) * n_params); - for (i = 0; i < n_params; i++) { - values[i] = params[i].value; - names[i] = params[i].name; - } - - n_extractable = - GES_EXTRACTABLE (g_object_new_with_properties (priv->extractable_type, - n_params, names, values)); - g_free (names); - g_free (values); + for (i = 0; i < n_params; i++) { + values[i] = params[i].value; + names[i] = params[i].name; } -#else - n_extractable = g_object_newv (priv->extractable_type, n_params, params); -#endif + + n_extractable = + GES_EXTRACTABLE (g_object_new_with_properties (priv->extractable_type, + n_params, names, values)); + g_free (names); + g_free (values); while (n_params--) g_value_unset (¶ms[n_params].value); diff --git a/meson.build b/meson.build index b3e58d8efd..aee0e9fadd 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,7 @@ curversion = gst_version_minor * 100 + gst_version_micro libversion = '@0@.@1@.0'.format(soversion, curversion) osxversion = curversion + 1 -glib_req = '>= 2.44.0' +glib_req = '>= 2.56.0' gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) cc = meson.get_compiler('c')