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: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/215>
This commit is contained in:
Stéphane Cerveau 2020-10-16 13:17:04 +02:00
parent 0030b0833b
commit 4f0bb60c91
2 changed files with 15 additions and 22 deletions

View file

@ -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 (&params[n_params].value);

View file

@ -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')