From c6c6ad26679420c84c1cd806de09f99981097bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Wed, 3 Jul 2019 09:29:26 +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/gstiterator.c | 5 ----- meson.build | 2 +- tests/misc/netclock-replay.c | 18 ------------------ tools/gst-inspect.c | 4 ---- 4 files changed, 1 insertion(+), 28 deletions(-) diff --git a/gst/gstiterator.c b/gst/gstiterator.c index 26894358bd..82847bf761 100644 --- a/gst/gstiterator.c +++ b/gst/gstiterator.c @@ -629,12 +629,7 @@ gst_iterator_fold (GstIterator * it, GstIteratorFoldFunction func, fold_done: -#if GLIB_CHECK_VERSION (2, 48, 0) g_value_unset (&item); -#else - if (item.g_type != 0) - g_value_unset (&item); -#endif return result; } diff --git a/meson.build b/meson.build index a22578ace6..3e0f1d8e84 100644 --- a/meson.build +++ b/meson.build @@ -478,7 +478,7 @@ libsinc = include_directories('libs') privinc = include_directories('gst') # Find dependencies -glib_dep = dependency('glib-2.0', version : '>=2.44.0', +glib_dep = dependency('glib-2.0', version : '>=2.56.0', fallback: ['glib', 'libglib_dep']) gobject_dep = dependency('gobject-2.0', fallback: ['glib', 'libgobject_dep']) diff --git a/tests/misc/netclock-replay.c b/tests/misc/netclock-replay.c index be8123349f..e405902223 100644 --- a/tests/misc/netclock-replay.c +++ b/tests/misc/netclock-replay.c @@ -48,24 +48,6 @@ static GOptionEntry entries[] = { {NULL,} }; -/* 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 parse_ascii_string_to_unsigned -static gboolean -parse_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 - static gboolean parse_time_values (const gchar * line, GstClockTime * local_1, GstClockTime * remote_1, GstClockTime * remote_2, GstClockTime * local_2) diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index f8a268f408..34c741561e 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -2104,15 +2104,11 @@ main (int argc, char *argv[]) #elif defined(G_OS_WIN32) { /* g_log_writer_supports_color is available since 2.50.0 */ -#if GLIB_CHECK_VERSION(2,50,0) gint fd = _fileno (stdout); /* On Windows 10, g_log_writer_supports_color will also setup the console * so that it correctly interprets ANSI VT sequences if it's supported */ if (!_isatty (fd) || !g_log_writer_supports_color (fd)) colored_output = FALSE; -#else - colored_output = FALSE; -#endif } #endif