diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2020-10-16 12:49:02 +0200 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-10-30 19:01:24 +0000 |
commit | dbf7dbe8302997405d3d06abde6ac2376e239171 (patch) | |
tree | 57b51c1bbb78dae2ce2710d99118618417ad77d3 | |
parent | bf56c5ab92d2d8c541c5c26e199a4d0859eb2ba2 (diff) |
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-devtools/-/merge_requests/224>
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-report.c | 2 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-reporter.c | 2 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-scenario.c | 29 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-utils.c | 8 |
5 files changed, 1 insertions, 42 deletions
diff --git a/meson.build b/meson.build index 2bff5ac..719dccf 100644 --- a/meson.build +++ b/meson.build @@ -26,7 +26,7 @@ osxversion = curversion + 1 prefix = get_option('prefix') -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') diff --git a/validate/gst/validate/gst-validate-report.c b/validate/gst/validate/gst-validate-report.c index c027921..981752a 100644 --- a/validate/gst/validate/gst-validate-report.c +++ b/validate/gst/validate/gst-validate-report.c @@ -1411,12 +1411,10 @@ gst_validate_error_structure (gpointer structure, const gchar * format, ...) const gchar *endcolor = ""; -#if GLIB_CHECK_VERSION(2,50,0) if (g_log_writer_supports_color (fileno (stderr))) { color = gst_debug_construct_term_color (GST_DEBUG_FG_RED); endcolor = "\033[0m"; } -#endif if (structure) { if (GST_IS_STRUCTURE (structure)) { diff --git a/validate/gst/validate/gst-validate-reporter.c b/validate/gst/validate/gst-validate-reporter.c index ac15a45..960cfd4 100644 --- a/validate/gst/validate/gst-validate-reporter.c +++ b/validate/gst/validate/gst-validate-reporter.c @@ -378,12 +378,10 @@ done: gchar *message, **lines, *color = NULL; const gchar *endcolor = ""; -#if GLIB_CHECK_VERSION(2,50,0) if (g_log_writer_supports_color (fileno (stderr))) { color = gst_debug_construct_term_color (GST_DEBUG_FG_RED); endcolor = "\033[0m"; } -#endif gst_validate_printf (NULL, "%*s%s> Error%s:\n", indent, "", color ? color : "", endcolor); diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c index 2571732..00e948c 100644 --- a/validate/gst/validate/gst-validate-scenario.c +++ b/validate/gst/validate/gst-validate-scenario.c @@ -278,35 +278,6 @@ typedef struct KeyFileGroupName #define NOT_KF_AFTER_FORCE_KF_EVT_TOLERANCE 1 -#if !GLIB_CHECK_VERSION(2,54,0) -#define g_enum_to_string gst_validate_g_enum_to_string -static gchar * -gst_validate_g_enum_to_string (GType g_enum_type, gint value) -{ - gchar *result; - GEnumClass *enum_class; - GEnumValue *enum_value; - - g_return_val_if_fail (G_TYPE_IS_ENUM (g_enum_type), NULL); - - enum_class = g_type_class_ref (g_enum_type); - - /* Already warned */ - if (enum_class == NULL) - return g_strdup_printf ("%d", value); - - enum_value = g_enum_get_value (enum_class, value); - - if (enum_value == NULL) - result = g_strdup_printf ("%d", value); - else - result = g_strdup (enum_value->value_name); - - g_type_class_unref (enum_class); - return result; -} -#endif - static void gst_validate_sink_information_free (GstValidateSinkInformation * info) { diff --git a/validate/gst/validate/gst-validate-utils.c b/validate/gst/validate/gst-validate-utils.c index 59d58fd..29157f0 100644 --- a/validate/gst/validate/gst-validate-utils.c +++ b/validate/gst/validate/gst-validate-utils.c @@ -577,15 +577,7 @@ setup_quarks (void) gboolean gst_validate_has_colored_output (void) { -#if GLIB_CHECK_VERSION(2,50,0) return g_log_writer_supports_color (fileno (stdout)); -#endif - -#ifdef G_OS_UNIX - return isatty (STDOUT_FILENO); -#elif defined(G_OS_WIN32) - return FALSE; -#endif } /* Parse file that contains a list of GStructures */ |