From 9d9e59622f0531781a76e1d8ac96471cb14c6677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 6 Apr 2022 12:56:30 +0100 Subject: [PATCH] Bump GLib requirement to >= 2.62 Can't require 2.64 yet because of https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/323 Part-of: --- subprojects/gst-devtools/meson.build | 2 +- .../validate/gst/validate/validate.c | 101 ------------------ subprojects/gst-editing-services/meson.build | 2 +- subprojects/gst-omx/meson.build | 2 +- .../gst-plugins-bad/ext/gs/gstgscommon.cpp | 31 ------ .../gst/mpegtsdemux/mpegtsbase.c | 6 -- .../gst-plugins-bad/gst/mxf/mxfdemux.c | 19 ---- subprojects/gst-plugins-bad/meson.build | 2 +- .../sys/d3d11/gstd3d11deinterlace.cpp | 16 --- subprojects/gst-plugins-bad/sys/va/vacompat.h | 30 ------ .../gst-libs/gst/rtsp/gstrtspconnection.c | 26 ----- .../gst-libs/gst/video/gstvideodecoder.c | 12 --- .../gst-libs/gst/video/gstvideoencoder.c | 12 --- subprojects/gst-plugins-base/meson.build | 2 +- .../tests/check/elements/audioresample.c | 5 - .../ext/adaptivedemux2/hls/m3u8.h | 28 ----- .../gst/rtpmanager/gstrtpjitterbuffer.c | 12 --- .../gst/rtpmanager/gstrtpst2022-1-fecenc.c | 12 --- .../gst-plugins-good/gst/udp/gstudpelement.c | 6 -- subprojects/gst-plugins-good/meson.build | 2 +- subprojects/gst-plugins-ugly/meson.build | 2 +- subprojects/gst-rtsp-server/meson.build | 2 +- subprojects/gstreamer/gst/gstdevicemonitor.c | 12 --- subprojects/gstreamer/meson.build | 4 +- .../gstreamer/tests/check/gst/gsturi.c | 15 --- 25 files changed, 11 insertions(+), 352 deletions(-) diff --git a/subprojects/gst-devtools/meson.build b/subprojects/gst-devtools/meson.build index d30ae9dffa..fa8e8458d0 100644 --- a/subprojects/gst-devtools/meson.build +++ b/subprojects/gst-devtools/meson.build @@ -28,7 +28,7 @@ osxversion = curversion + 1 prefix = get_option('prefix') -glib_req = '>= 2.56.0' +glib_req = '>= 2.62.0' if gst_version_is_stable gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) diff --git a/subprojects/gst-devtools/validate/gst/validate/validate.c b/subprojects/gst-devtools/validate/gst/validate/validate.c index 4eea3267ba..a6e8bdfcb1 100644 --- a/subprojects/gst-devtools/validate/gst/validate/validate.c +++ b/subprojects/gst-devtools/validate/gst/validate/validate.c @@ -582,107 +582,6 @@ gst_validate_get_test_file_scenario (GList ** structs, return TRUE; } -#if !GLIB_CHECK_VERSION(2,58,0) - -/* Copied from https://gitlab.gnome.org/GNOME/glib/-/blob/main/glib/gfileutils.c#L2736 */ -static gchar * -g_canonicalize_filename (const gchar * filename, const gchar * relative_to) -{ - gchar *canon, *start, *p, *q; - guint i; - - g_return_val_if_fail (relative_to == NULL - || g_path_is_absolute (relative_to), NULL); - - if (!g_path_is_absolute (filename)) { - gchar *cwd_allocated = NULL; - const gchar *cwd; - - if (relative_to != NULL) - cwd = relative_to; - else - cwd = cwd_allocated = g_get_current_dir (); - - canon = g_build_filename (cwd, filename, NULL); - g_free (cwd_allocated); - } else { - canon = g_strdup (filename); - } - - start = (char *) g_path_skip_root (canon); - - if (start == NULL) { - /* This shouldn't really happen, as g_get_current_dir() should - return an absolute pathname, but bug 573843 shows this is - not always happening */ - g_free (canon); - return g_build_filename (G_DIR_SEPARATOR_S, filename, NULL); - } - - /* POSIX allows double slashes at the start to - * mean something special (as does windows too). - * So, "//" != "/", but more than two slashes - * is treated as "/". - */ - i = 0; - for (p = start - 1; (p >= canon) && G_IS_DIR_SEPARATOR (*p); p--) - i++; - if (i > 2) { - i -= 1; - start -= i; - memmove (start, start + i, strlen (start + i) + 1); - } - - /* Make sure we're using the canonical dir separator */ - p++; - while (p < start && G_IS_DIR_SEPARATOR (*p)) - *p++ = G_DIR_SEPARATOR; - - p = start; - while (*p != 0) { - if (p[0] == '.' && (p[1] == 0 || G_IS_DIR_SEPARATOR (p[1]))) { - memmove (p, p + 1, strlen (p + 1) + 1); - } else if (p[0] == '.' && p[1] == '.' && (p[2] == 0 - || G_IS_DIR_SEPARATOR (p[2]))) { - q = p + 2; - /* Skip previous separator */ - p = p - 2; - if (p < start) - p = start; - while (p > start && !G_IS_DIR_SEPARATOR (*p)) - p--; - if (G_IS_DIR_SEPARATOR (*p)) - *p++ = G_DIR_SEPARATOR; - memmove (p, q, strlen (q) + 1); - } else { - /* Skip until next separator */ - while (*p != 0 && !G_IS_DIR_SEPARATOR (*p)) - p++; - - if (*p != 0) { - /* Canonicalize one separator */ - *p++ = G_DIR_SEPARATOR; - } - } - - /* Remove additional separators */ - q = p; - while (*q && G_IS_DIR_SEPARATOR (*q)) - q++; - - if (p != q) - memmove (p, q, strlen (q) + 1); - } - - /* Remove trailing slashes */ - if (p > start && G_IS_DIR_SEPARATOR (*(p - 1))) - *(p - 1) = 0; - - return canon; -} - -#endif - /* Only the first monitor pipeline will be used */ GstStructure * gst_validate_setup_test_file (const gchar * testfile, gboolean use_fakesinks) diff --git a/subprojects/gst-editing-services/meson.build b/subprojects/gst-editing-services/meson.build index 3947253a71..823f5a1b46 100644 --- a/subprojects/gst-editing-services/meson.build +++ b/subprojects/gst-editing-services/meson.build @@ -27,7 +27,7 @@ curversion = gst_version_minor * 100 + gst_version_micro libversion = '@0@.@1@.0'.format(soversion, curversion) osxversion = curversion + 1 -glib_req = '>= 2.56.0' +glib_req = '>= 2.62.0' if gst_version_is_stable gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) diff --git a/subprojects/gst-omx/meson.build b/subprojects/gst-omx/meson.build index 8cd8cf6e80..06147ad836 100644 --- a/subprojects/gst-omx/meson.build +++ b/subprojects/gst-omx/meson.build @@ -15,7 +15,7 @@ else gst_version_nano = 0 endif -glib_req = '>= 2.56.0' +glib_req = '>= 2.62.0' gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) tizil_req = '>= 0.19.0' api_version = '1.0' diff --git a/subprojects/gst-plugins-bad/ext/gs/gstgscommon.cpp b/subprojects/gst-plugins-bad/ext/gs/gstgscommon.cpp index 8326baaa68..b954b3fb44 100644 --- a/subprojects/gst-plugins-bad/ext/gs/gstgscommon.cpp +++ b/subprojects/gst-plugins-bad/ext/gs/gstgscommon.cpp @@ -25,37 +25,6 @@ namespace gcs = google::cloud::storage; -namespace { - -#if !GLIB_CHECK_VERSION(2, 62, 0) -static inline gchar* g_date_time_format_iso8601(GDateTime* datetime) { - GString* outstr = NULL; - gchar* main_date = NULL; - gint64 offset; - - // Main date and time. - main_date = g_date_time_format(datetime, "%Y-%m-%dT%H:%M:%S"); - outstr = g_string_new(main_date); - g_free(main_date); - - // Timezone. Format it as `%:::z` unless the offset is zero, in which case - // we can simply use `Z`. - offset = g_date_time_get_utc_offset(datetime); - - if (offset == 0) { - g_string_append_c(outstr, 'Z'); - } else { - gchar* time_zone = g_date_time_format(datetime, "%:::z"); - g_string_append(outstr, time_zone); - g_free(time_zone); - } - - return g_string_free(outstr, FALSE); -} -#endif - -} // namespace - std::unique_ptr gst_gs_create_client( const gchar* service_account_email, const gchar* service_account_credentials, diff --git a/subprojects/gst-plugins-bad/gst/mpegtsdemux/mpegtsbase.c b/subprojects/gst-plugins-bad/gst/mpegtsdemux/mpegtsbase.c index 2f9e88cea6..01bc68e2f4 100644 --- a/subprojects/gst-plugins-bad/gst/mpegtsdemux/mpegtsbase.c +++ b/subprojects/gst-plugins-bad/gst/mpegtsdemux/mpegtsbase.c @@ -502,13 +502,7 @@ mpegts_base_steal_program (MpegTSBase * base, gint program_number) for (i = 0; i < base->programs->len; i++) { MpegTSBaseProgram *program = g_ptr_array_index (base->programs, i); if (program->program_number == program_number) { -#if GLIB_CHECK_VERSION(2, 58, 0) return g_ptr_array_steal_index (base->programs, i); -#else - program->recycle = TRUE; - g_ptr_array_remove_index (base->programs, i); - return program; -#endif } } diff --git a/subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c b/subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c index b0ccc17efe..f9d9a69ed5 100644 --- a/subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c +++ b/subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c @@ -3338,21 +3338,6 @@ compare_index_table_segment (MXFIndexTableSegment * sa, return 1; } -#if !GLIB_CHECK_VERSION(2, 62, 0) -static gboolean -has_table_segment (GArray * segments, MXFIndexTableSegment * target) -{ - guint i; - for (i = 0; i < segments->len; i++) { - MXFIndexTableSegment *cand = - &g_array_index (segments, MXFIndexTableSegment, i); - if (compare_index_table_segment (cand, target) == 0) - return TRUE; - } - return FALSE; -} -#endif - static GstFlowReturn gst_mxf_demux_handle_index_table_segment (GstMXFDemux * demux, GstMXFKLV * klv) { @@ -3392,12 +3377,8 @@ gst_mxf_demux_handle_index_table_segment (GstMXFDemux * demux, GstMXFKLV * klv) } for (tmp = demux->index_tables; tmp; tmp = tmp->next) { GstMXFDemuxIndexTable *table = (GstMXFDemuxIndexTable *) tmp->data; -#if !GLIB_CHECK_VERSION (2, 62, 0) - if (has_table_segment (table->segments, segment)) { -#else if (g_array_binary_search (table->segments, segment, (GCompareFunc) compare_index_table_segment, NULL)) { -#endif GST_DEBUG_OBJECT (demux, "Already handled"); g_free (segment); return GST_FLOW_OK; diff --git a/subprojects/gst-plugins-bad/meson.build b/subprojects/gst-plugins-bad/meson.build index 87bda3f7ad..cb5e573283 100644 --- a/subprojects/gst-plugins-bad/meson.build +++ b/subprojects/gst-plugins-bad/meson.build @@ -17,7 +17,7 @@ endif gst_version_is_stable = gst_version_minor.is_even() gst_version_is_dev = gst_version_minor.is_odd() and gst_version_micro < 90 -glib_req = '>= 2.56.0' +glib_req = '>= 2.62.0' orc_req = '>= 0.4.17' if gst_version_is_stable diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11deinterlace.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11deinterlace.cpp index 4add8bed4f..10abed9691 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11deinterlace.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11deinterlace.cpp @@ -80,22 +80,6 @@ using namespace Microsoft::WRL; * D3D11_VIDEO_PROCESSOR_STREAM::ppFutureSurfaces */ -/* g_queue_clear_full is available since 2.60 */ -#if !GLIB_CHECK_VERSION(2,60,0) -#define g_queue_clear_full gst_d3d11_deinterlace_g_queue_clear_full -static void -gst_d3d11_deinterlace_g_queue_clear_full (GQueue * queue, - GDestroyNotify free_func) -{ - g_return_if_fail (queue != NULL); - - if (free_func != NULL) - g_queue_foreach (queue, (GFunc) free_func, NULL); - - g_queue_clear (queue); -} -#endif - typedef enum { GST_D3D11_DEINTERLACE_METHOD_BLEND = diff --git a/subprojects/gst-plugins-bad/sys/va/vacompat.h b/subprojects/gst-plugins-bad/sys/va/vacompat.h index 3f057dad90..5245dcc45e 100644 --- a/subprojects/gst-plugins-bad/sys/va/vacompat.h +++ b/subprojects/gst-plugins-bad/sys/va/vacompat.h @@ -24,34 +24,4 @@ G_BEGIN_DECLS -#if !GLIB_CHECK_VERSION(2, 60, 0) -#define g_queue_clear_full queue_clear_full -static inline void -queue_clear_full (GQueue * queue, GDestroyNotify free_func) -{ - gpointer data; - - while ((data = g_queue_pop_head (queue)) != NULL) - free_func (data); -} -#endif - -#if !GLIB_CHECK_VERSION(2, 62, 0) -#define g_array_copy array_copy -static inline GArray * -array_copy (GArray *array) -{ - GArray *new_array; - guint elt_size = g_array_get_element_size (array); - - new_array = g_array_sized_new (FALSE, FALSE, elt_size, array->len); - - g_array_set_size (new_array, array->len); - if (array->len > 0) - memcpy (new_array->data, array->data, array->len * elt_size); - - return new_array; -} -#endif - G_END_DECLS diff --git a/subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c b/subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c index 0ad9be33a1..67cc4f5266 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c @@ -1304,7 +1304,6 @@ error: } /* NOTE: This changes the values of vectors if multiple iterations are needed! */ -#if GLIB_CHECK_VERSION(2, 59, 1) static GstRTSPResult writev_bytes (GOutputStream * stream, GOutputVector * vectors, gint n_vectors, gsize * bytes_written, gboolean block, GCancellable * cancellable) @@ -1373,31 +1372,6 @@ error: return ret; } } -#else -static GstRTSPResult -writev_bytes (GOutputStream * stream, GOutputVector * vectors, gint n_vectors, - gsize * bytes_written, gboolean block, GCancellable * cancellable) -{ - gsize _bytes_written = 0; - guint written; - gint i; - GstRTSPResult res = GST_RTSP_OK; - - for (i = 0; i < n_vectors; i++) { - written = 0; - res = - write_bytes (stream, vectors[i].buffer, &written, vectors[i].size, - block, cancellable); - _bytes_written += written; - if (G_UNLIKELY (res != GST_RTSP_OK)) - break; - } - - *bytes_written = _bytes_written; - - return res; -} -#endif static gint fill_raw_bytes (GstRTSPConnection * conn, guint8 * buffer, guint size, diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c b/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c index 0daedbd472..7d7a91f1c7 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c @@ -2281,18 +2281,6 @@ gst_video_decoder_get_buffer_info_at_offset (GstVideoDecoder * GST_TIME_ARGS (*pts), GST_TIME_ARGS (*dts), *flags, got_offset, offset); } -#if !GLIB_CHECK_VERSION(2, 60, 0) -#define g_queue_clear_full queue_clear_full -static void -queue_clear_full (GQueue * queue, GDestroyNotify free_func) -{ - gpointer data; - - while ((data = g_queue_pop_head (queue)) != NULL) - free_func (data); -} -#endif - static void gst_video_decoder_clear_queues (GstVideoDecoder * dec) { diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoencoder.c b/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoencoder.c index ae859a139c..f99653ed82 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoencoder.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoencoder.c @@ -444,18 +444,6 @@ _flush_events (GstPad * pad, GList * events) return NULL; } -#if !GLIB_CHECK_VERSION(2, 60, 0) -#define g_queue_clear_full queue_clear_full -static void -queue_clear_full (GQueue * queue, GDestroyNotify free_func) -{ - gpointer data; - - while ((data = g_queue_pop_head (queue)) != NULL) - free_func (data); -} -#endif - static gboolean gst_video_encoder_reset (GstVideoEncoder * encoder, gboolean hard) { diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build index 222cbcb417..d776e77199 100644 --- a/subprojects/gst-plugins-base/meson.build +++ b/subprojects/gst-plugins-base/meson.build @@ -27,7 +27,7 @@ else have_objc = false endif -glib_req = '>= 2.56.0' +glib_req = '>= 2.62.0' orc_req = '>= 0.4.24' if gst_version_is_stable diff --git a/subprojects/gst-plugins-base/tests/check/elements/audioresample.c b/subprojects/gst-plugins-base/tests/check/elements/audioresample.c index d48d0fa65c..96b364c974 100644 --- a/subprojects/gst-plugins-base/tests/check/elements/audioresample.c +++ b/subprojects/gst-plugins-base/tests/check/elements/audioresample.c @@ -469,11 +469,6 @@ live_switch_push (gint pts, gint rate, GstCaps * caps) gst_caps_unref (desired); } -#if !GLIB_CHECK_VERSION(2,58,0) -#define G_APPROX_VALUE(a, b, epsilon) \ - (((a) > (b) ? (a) - (b) : (b) - (a)) < (epsilon)) -#endif - GST_START_TEST (test_live_switch) { GstElement *audioresample; diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.h b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.h index d1b535d6b9..2dba1c39a8 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.h +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.h @@ -383,34 +383,6 @@ GstStreamType gst_stream_type_from_hls_type (GstHLSRenditionStreamType GstStreamType gst_hls_get_stream_type_from_structure (GstStructure *structure); GstStreamType gst_hls_get_stream_type_from_caps (GstCaps *caps); -#if !GLIB_CHECK_VERSION(2, 62, 0) -static inline gchar* g_date_time_format_iso8601(GDateTime* datetime) { - GString* outstr = NULL; - gchar* main_date = NULL; - gint64 offset; - - // Main date and time. - main_date = g_date_time_format(datetime, "%Y-%m-%dT%H:%M:%S"); - outstr = g_string_new(main_date); - g_free(main_date); - - // Timezone. Format it as `%:::z` unless the offset is zero, in which case - // we can simply use `Z`. - offset = g_date_time_get_utc_offset(datetime); - - if (offset == 0) { - g_string_append_c(outstr, 'Z'); - } else { - gchar* time_zone = g_date_time_format(datetime, "%:::z"); - g_string_append(outstr, time_zone); - g_free(time_zone); - } - - return g_string_free(outstr, FALSE); -} -#endif - - G_END_DECLS #endif /* __M3U8_H__ */ diff --git a/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpjitterbuffer.c b/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpjitterbuffer.c index 1959e1fd32..09a292bb62 100644 --- a/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpjitterbuffer.c @@ -279,18 +279,6 @@ enum #define GST_BUFFER_IS_RETRANSMISSION(buffer) \ GST_BUFFER_FLAG_IS_SET (buffer, GST_RTP_BUFFER_FLAG_RETRANSMISSION) -#if !GLIB_CHECK_VERSION(2, 60, 0) -#define g_queue_clear_full queue_clear_full -static void -queue_clear_full (GQueue * queue, GDestroyNotify free_func) -{ - gpointer data; - - while ((data = g_queue_pop_head (queue)) != NULL) - free_func (data); -} -#endif - struct _GstRtpJitterBufferPrivate { GstPad *sinkpad, *srcpad; diff --git a/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpst2022-1-fecenc.c b/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpst2022-1-fecenc.c index 95595079e5..1a8f790d9e 100644 --- a/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpst2022-1-fecenc.c +++ b/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpst2022-1-fecenc.c @@ -70,18 +70,6 @@ #include "gstrtpst2022-1-fecenc.h" -#if !GLIB_CHECK_VERSION(2, 60, 0) -#define g_queue_clear_full queue_clear_full -static void -queue_clear_full (GQueue * queue, GDestroyNotify free_func) -{ - gpointer data; - - while ((data = g_queue_pop_head (queue)) != NULL) - free_func (data); -} -#endif - GST_DEBUG_CATEGORY_STATIC (gst_rtpst_2022_1_fecenc_debug); #define GST_CAT_DEFAULT gst_rtpst_2022_1_fecenc_debug diff --git a/subprojects/gst-plugins-good/gst/udp/gstudpelement.c b/subprojects/gst-plugins-good/gst/udp/gstudpelement.c index 96d0ae4525..ceef41eaeb 100644 --- a/subprojects/gst-plugins-good/gst/udp/gstudpelement.c +++ b/subprojects/gst-plugins-good/gst/udp/gstudpelement.c @@ -32,12 +32,6 @@ udp_element_init (GstPlugin * plugin) { static gsize res = FALSE; if (g_once_init_enter (&res)) { - /* 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/subprojects/gst-plugins-good/meson.build b/subprojects/gst-plugins-good/meson.build index 42edbdd802..97e0b97b79 100644 --- a/subprojects/gst-plugins-good/meson.build +++ b/subprojects/gst-plugins-good/meson.build @@ -19,7 +19,7 @@ gst_version_is_dev = gst_version_minor.is_odd() and gst_version_micro < 90 have_cxx = add_languages('cpp', native: false, required: false) -glib_req = '>= 2.56.0' +glib_req = '>= 2.62.0' orc_req = '>= 0.4.17' if gst_version_is_stable diff --git a/subprojects/gst-plugins-ugly/meson.build b/subprojects/gst-plugins-ugly/meson.build index 34a7309dd6..bca09e34b5 100644 --- a/subprojects/gst-plugins-ugly/meson.build +++ b/subprojects/gst-plugins-ugly/meson.build @@ -19,7 +19,7 @@ gst_version_is_dev = gst_version_minor.is_odd() and gst_version_micro < 90 have_cxx = add_languages('cpp', native: false, required: false) -glib_req = '>= 2.56.0' +glib_req = '>= 2.62.0' if gst_version_is_stable gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) diff --git a/subprojects/gst-rtsp-server/meson.build b/subprojects/gst-rtsp-server/meson.build index 945655e21b..f82e271e2f 100644 --- a/subprojects/gst-rtsp-server/meson.build +++ b/subprojects/gst-rtsp-server/meson.build @@ -16,7 +16,7 @@ endif gst_version_is_stable = gst_version_minor.is_even() gst_version_is_dev = gst_version_minor.is_odd() and gst_version_micro < 90 -glib_req = '>= 2.56.0' +glib_req = '>= 2.62.0' if gst_version_is_stable gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) diff --git a/subprojects/gstreamer/gst/gstdevicemonitor.c b/subprojects/gstreamer/gst/gstdevicemonitor.c index 4beea72dd5..ef0c23d53a 100644 --- a/subprojects/gstreamer/gst/gstdevicemonitor.c +++ b/subprojects/gstreamer/gst/gstdevicemonitor.c @@ -373,18 +373,6 @@ gst_device_monitor_dispose (GObject * object) G_OBJECT_CLASS (gst_device_monitor_parent_class)->dispose (object); } -#if !GLIB_CHECK_VERSION(2, 60, 0) -#define g_queue_clear_full queue_clear_full -static void -queue_clear_full (GQueue * queue, GDestroyNotify free_func) -{ - gpointer data; - - while ((data = g_queue_pop_head (queue)) != NULL) - free_func (data); -} -#endif - /** * gst_device_monitor_get_devices: * @monitor: A #GstDeviceProvider diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build index a293e43109..dcdc8e5dfe 100644 --- a/subprojects/gstreamer/meson.build +++ b/subprojects/gstreamer/meson.build @@ -521,8 +521,10 @@ configinc = include_directories('.') libsinc = include_directories('libs') privinc = include_directories('gst') +glib_req = '>= 2.62.0' + # Find dependencies -glib_dep = dependency('glib-2.0', version : '>=2.56.0', +glib_dep = dependency('glib-2.0', version: glib_req, fallback: ['glib', 'libglib_dep']) gobject_dep = dependency('gobject-2.0') gmodule_dep = dependency('gmodule-no-export-2.0') diff --git a/subprojects/gstreamer/tests/check/gst/gsturi.c b/subprojects/gstreamer/tests/check/gst/gsturi.c index 3364ee7f42..92511b3061 100644 --- a/subprojects/gstreamer/tests/check/gst/gsturi.c +++ b/subprojects/gstreamer/tests/check/gst/gsturi.c @@ -477,12 +477,7 @@ static const struct URITest url_presenting_tests[] = { {.uri = {"scheme", "user:pass", "host", 1234, "/path/to/dir", {{"query", NULL}, {"key", "value"}}, "fragment"}, .str = -#if GLIB_CHECK_VERSION(2, 59, 0) "scheme://user:pass@host:1234/path/to/dir?key=value&query#fragment"}, -#else - "scheme://user:pass@host:1234/path/to/dir?query&key=value#fragment"}, -#endif - /* IPv6 literal should render in square brackets */ {.uri = {"scheme", "user:pass", "12:34:56:78:9a:bc:de:f0", 1234, "/path/to/dir", {{"query", "value"}}, "fragment"}, @@ -1044,24 +1039,14 @@ GST_START_TEST (test_url_get_set) fail_unless (gst_uri_set_query_value (url, "key", "value")); tmp_str = gst_uri_to_string (url); -#if GLIB_CHECK_VERSION(2, 59, 0) fail_unless_equals_string (tmp_str, "//example.com/path/to/file/there/segment?key=value&query#fragment"); -#else - fail_unless_equals_string (tmp_str, - "//example.com/path/to/file/there/segment?query&key=value#fragment"); -#endif g_free (tmp_str); fail_unless (gst_uri_set_query_value (url, "key", NULL)); tmp_str = gst_uri_to_string (url); -#if GLIB_CHECK_VERSION(2, 59, 0) fail_unless_equals_string (tmp_str, "//example.com/path/to/file/there/segment?key&query#fragment"); -#else - fail_unless_equals_string (tmp_str, - "//example.com/path/to/file/there/segment?query&key#fragment"); -#endif g_free (tmp_str); fail_unless (!gst_uri_set_query_value (NULL, "key", "value"));