From 654f3370a01dfe96f962fbbadba34b865d123a90 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] meson: Bump GLib requirement to >= 2.64 This includes fixes to make GstBus watches non-racy. Part-of: --- subprojects/gst-devtools/meson.build | 2 +- subprojects/gst-editing-services/meson.build | 2 +- subprojects/gst-plugins-bad/meson.build | 2 +- subprojects/gst-plugins-base/meson.build | 2 +- subprojects/gst-plugins-good/meson.build | 2 +- subprojects/gst-plugins-ugly/meson.build | 2 +- subprojects/gst-rtsp-server/meson.build | 2 +- subprojects/gstreamer/gst/gstbus.c | 14 -------------- subprojects/gstreamer/meson.build | 2 +- 9 files changed, 8 insertions(+), 22 deletions(-) diff --git a/subprojects/gst-devtools/meson.build b/subprojects/gst-devtools/meson.build index 1b84d296ff..2bcb013d35 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.62.0' +glib_req = '>= 2.64.0' if gst_version_is_stable gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) diff --git a/subprojects/gst-editing-services/meson.build b/subprojects/gst-editing-services/meson.build index e076844a7d..3ab0963593 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.62.0' +glib_req = '>= 2.64.0' if gst_version_is_stable gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) diff --git a/subprojects/gst-plugins-bad/meson.build b/subprojects/gst-plugins-bad/meson.build index d2833182c2..9abaea0d64 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.62.0' +glib_req = '>= 2.64.0' orc_req = '>= 0.4.17' if gst_version_is_stable diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build index 20325085fa..454d76f60f 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.62.0' +glib_req = '>= 2.64.0' orc_req = '>= 0.4.24' if gst_version_is_stable diff --git a/subprojects/gst-plugins-good/meson.build b/subprojects/gst-plugins-good/meson.build index c979e6bc89..b8bc0f5176 100644 --- a/subprojects/gst-plugins-good/meson.build +++ b/subprojects/gst-plugins-good/meson.build @@ -22,7 +22,7 @@ if have_cxx cxx = meson.get_compiler('cpp') endif -glib_req = '>= 2.62.0' +glib_req = '>= 2.64.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 2b509ce3bb..215a1fbd64 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.62.0' +glib_req = '>= 2.64.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 fd21b9a7b2..3cda29d081 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.62.0' +glib_req = '>= 2.64.0' if gst_version_is_stable gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) diff --git a/subprojects/gstreamer/gst/gstbus.c b/subprojects/gstreamer/gst/gstbus.c index bfecd9bd25..9b954bdcbb 100644 --- a/subprojects/gstreamer/gst/gstbus.c +++ b/subprojects/gstreamer/gst/gstbus.c @@ -834,7 +834,6 @@ no_handler: } } -#if GLIB_CHECK_VERSION(2,63,3) static void gst_bus_source_dispose (GSource * source) { @@ -850,22 +849,11 @@ gst_bus_source_dispose (GSource * source) bus->priv->gsource = NULL; GST_OBJECT_UNLOCK (bus); } -#endif static void gst_bus_source_finalize (GSource * source) { GstBusSource *bsource = (GstBusSource *) source; -#if !GLIB_CHECK_VERSION(2,63,3) - GstBus *bus = bsource->bus; - - GST_DEBUG_OBJECT (bus, "finalize source %p", source); - - GST_OBJECT_LOCK (bus); - if (bus->priv->gsource == source) - bus->priv->gsource = NULL; - GST_OBJECT_UNLOCK (bus); -#endif gst_clear_object (&bsource->bus); } @@ -894,9 +882,7 @@ gst_bus_create_watch_unlocked (GstBus * bus) source = (GstBusSource *) bus->priv->gsource; g_source_set_name ((GSource *) source, "GStreamer message bus watch"); -#if GLIB_CHECK_VERSION(2,63,3) g_source_set_dispose_function ((GSource *) source, gst_bus_source_dispose); -#endif source->bus = gst_object_ref (bus); g_source_add_poll ((GSource *) source, &bus->priv->pollfd); diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build index f0d3f742f8..41f5e5af0b 100644 --- a/subprojects/gstreamer/meson.build +++ b/subprojects/gstreamer/meson.build @@ -534,7 +534,7 @@ configinc = include_directories('.') libsinc = include_directories('libs') privinc = include_directories('gst') -glib_req = '>= 2.62.0' +glib_req = '>= 2.64.0' # Find dependencies glib_dep = dependency('glib-2.0', version: glib_req,