From 0429c24637f72eaa6b98c06f090d603f298e0f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 15 Oct 2020 18:21:54 +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/isomp4/qtdemux.c | 27 --------------------------- gst/rtpmanager/gstrtpjitterbuffer.c | 18 ------------------ gst/udp/gstudp.c | 6 ------ meson.build | 2 +- 4 files changed, 1 insertion(+), 52 deletions(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 3e06079d00..5991ddad30 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -13064,33 +13064,6 @@ qtdemux_reuse_and_configure_stream (GstQTDemux * qtdemux, return gst_qtdemux_configure_stream (qtdemux, newstream); } -/* g_ptr_array_find_with_equal_func is available since 2.54, - * replacement until we can depend unconditionally on the real one in GLib */ -#if !GLIB_CHECK_VERSION(2,54,0) -#define g_ptr_array_find_with_equal_func qtdemux_ptr_array_find_with_equal_func -static gboolean -qtdemux_ptr_array_find_with_equal_func (GPtrArray * haystack, - gconstpointer needle, GEqualFunc equal_func, guint * index_) -{ - guint i; - - g_return_val_if_fail (haystack != NULL, FALSE); - - if (equal_func == NULL) - equal_func = g_direct_equal; - - for (i = 0; i < haystack->len; i++) { - if (equal_func (g_ptr_array_index (haystack, i), needle)) { - if (index_ != NULL) - *index_ = i; - return TRUE; - } - } - - return FALSE; -} -#endif - static gboolean qtdemux_update_streams (GstQTDemux * qtdemux) { diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index 60d8ad875a..f9c3aef352 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -1368,24 +1368,6 @@ gst_rtp_jitter_buffer_getcaps (GstPad * pad, GstCaps * filter) return caps; } -/* 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_jitter_buffer_ascii_string_to_unsigned -static gboolean -_gst_jitter_buffer_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 - /* * Must be called with JBUF_LOCK held */ diff --git a/gst/udp/gstudp.c b/gst/udp/gstudp.c index eb021122e9..66d3f2efaa 100644 --- a/gst/udp/gstudp.c +++ b/gst/udp/gstudp.c @@ -31,12 +31,6 @@ static gboolean plugin_init (GstPlugin * plugin) { - /* not using GLIB_CHECK_VERSION on purpose, run-time version matters */ - if (glib_check_version (2, 36, 0) != NULL) { - GST_WARNING ("Your GLib version is < 2.36, UDP multicasting support may " - "be broken, see https://bugzilla.gnome.org/show_bug.cgi?id=688378"); - } - /* register info of the netaddress metadata so that we can use it from * multiple threads right away. Note that the plugin loading is always * serialized */ diff --git a/meson.build b/meson.build index 8b57ea554a..527167acd6 100644 --- a/meson.build +++ b/meson.build @@ -18,7 +18,7 @@ gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90 have_cxx = add_languages('cpp', native: false, required: false) -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)