From 967e650937bc7ba3692f7dc1031554d8961b8823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 15 Oct 2020 18:20:37 +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: --- gst-libs/gst/video/video-anc.c | 11 ----------- gst-libs/gst/video/video-hdr.c | 18 ------------------ meson.build | 2 +- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/gst-libs/gst/video/video-anc.c b/gst-libs/gst/video/video-anc.c index 4748c50913..f5aa50c70c 100644 --- a/gst-libs/gst/video/video-anc.c +++ b/gst-libs/gst/video/video-anc.c @@ -26,17 +26,6 @@ #include #include "video-anc.h" -#if !GLIB_CHECK_VERSION(2, 47, 4) -#ifdef __GNUC__ -#define G_GNUC_CHECK_VERSION(major, minor) \ - ((__GNUC__ > (major)) || \ - ((__GNUC__ == (major)) && \ - (__GNUC_MINOR__ >= (minor)))) -#else -#define G_GNUC_CHECK_VERSION(major, minor) 0 -#endif -#endif - /** * SECTION:gstvideoanc * @title: GstVideo Ancillary diff --git a/gst-libs/gst/video/video-hdr.c b/gst-libs/gst/video/video-hdr.c index 41c3131d1f..2f97c5d8a5 100644 --- a/gst-libs/gst/video/video-hdr.c +++ b/gst-libs/gst/video/video-hdr.c @@ -41,24 +41,6 @@ (m)->max_display_mastering_luminance, \ (m)->min_display_mastering_luminance -/* 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 video_hdr_ascii_string_to_unsigned -static gboolean -video_hdr_ascii_string_to_unsigned (const gchar * str, guint base, guint64 min, - guint64 max, guint64 * out_num, GError ** error) -{ - gchar *endptr = NULL; - *out_num = g_ascii_strtoull (str, &endptr, base); - if (errno) - return FALSE; - if (endptr == str) - return FALSE; - return TRUE; -} -#endif - /** * gst_video_mastering_display_info_init: * @minfo: a #GstVideoMasteringDisplayInfo diff --git a/meson.build b/meson.build index 897d9ac234..876eb0ebf4 100644 --- a/meson.build +++ b/meson.build @@ -26,7 +26,7 @@ else have_objc = false endif -glib_req = '>= 2.44.0' +glib_req = '>= 2.56.0' orc_req = '>= 0.4.24' gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)