From cbd61e28b2b47a24ffa5bf9be5f83592e1e97ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 15 Oct 2020 18:26:48 +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: --- ext/dash/gstxmlhelper.c | 26 -------------------------- meson.build | 2 +- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/ext/dash/gstxmlhelper.c b/ext/dash/gstxmlhelper.c index 966b243ba1..ee7aa661cc 100644 --- a/ext/dash/gstxmlhelper.c +++ b/ext/dash/gstxmlhelper.c @@ -460,32 +460,6 @@ gst_xml_helper_get_prop_unsigned_integer (xmlNode * a_node, return exists; } -/* g_ascii_string_to_unsigned is available since 2.54. Get rid of this wrapper - * when we bump the version in 1.18 */ -#if !GLIB_CHECK_VERSION(2,54,0) -#define g_ascii_string_to_unsigned gst_xml_helper_ascii_string_to_unsigned -static gboolean -gst_xml_helper_ascii_string_to_unsigned (const gchar * str, guint base, - guint64 min, guint64 max, guint64 * out_num, GError ** error) -{ - guint64 number; - gchar *endptr = NULL; - - number = g_ascii_strtoull (str, &endptr, base); - - /* Be as strict as the implementation of g_ascii_string_to_unsigned in glib */ - if (errno) - return FALSE; - if (g_ascii_isspace (str[0]) || str[0] == '-' || str[0] == '+') - return FALSE; - if (*endptr != '\0' || endptr == NULL) - return FALSE; - - *out_num = number; - return TRUE; -} -#endif - gboolean gst_xml_helper_get_prop_unsigned_integer_64 (xmlNode * a_node, const gchar * property_name, guint64 default_val, guint64 * property_value) diff --git a/meson.build b/meson.build index 631ad475be..d298439ad4 100644 --- a/meson.build +++ b/meson.build @@ -16,7 +16,7 @@ else endif gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90 -glib_req = '>= 2.44.0' +glib_req = '>= 2.56.0' orc_req = '>= 0.4.17' gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)