meson: update glib minimum version to 2.56
authorStéphane Cerveau <scerveau@collabora.com>
Wed, 3 Jul 2019 07:29:26 +0000 (09:29 +0200)
committerStéphane Cerveau <scerveau@collabora.com>
Thu, 15 Oct 2020 16:12:32 +0000 (18:12 +0200)
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/gstreamer/-/merge_requests/199>

gst/gstiterator.c
meson.build
tests/misc/netclock-replay.c
tools/gst-inspect.c

index 2689435..82847bf 100644 (file)
@@ -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;
 }
index a22578a..3e0f1d8 100644 (file)
@@ -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'])
index be81233..e405902 100644 (file)
@@ -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)
index f8a268f..34c7415 100644 (file)
@@ -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