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-plugins-good/-/merge_requests/774>
This commit is contained in:
Stéphane Cerveau 2020-10-15 18:21:54 +02:00
parent 5fb5abc8a8
commit 0429c24637
4 changed files with 1 additions and 52 deletions

View file

@ -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)
{

View file

@ -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
*/

View file

@ -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 */

View file

@ -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)