diff --git a/ext/alsa/gstalsamixer.c b/ext/alsa/gstalsamixer.c index 9bf54204f4..182b313767 100644 --- a/ext/alsa/gstalsamixer.c +++ b/ext/alsa/gstalsamixer.c @@ -496,11 +496,7 @@ gst_alsa_mixer_new (const char *device, GstAlsaMixerDirection dir) if (pipe (ret->pfd) == -1) goto error; -#if !GLIB_CHECK_VERSION (2, 31, 0) - g_static_rec_mutex_init (&ret->rec_mutex); -#else g_rec_mutex_init (&ret->rec_mutex); -#endif g_static_rec_mutex_init (&ret->task_mutex); ret->task = gst_task_new (task_monitor_alsa, ret); @@ -583,11 +579,7 @@ gst_alsa_mixer_free (GstAlsaMixer * mixer) snd_mixer_close (mixer->handle); mixer->handle = NULL; } -#if !GLIB_CHECK_VERSION (2, 31, 0) - g_static_rec_mutex_free (&mixer->rec_mutex); -#else g_rec_mutex_clear (&mixer->rec_mutex); -#endif g_free (mixer); } diff --git a/ext/alsa/gstalsamixer.h b/ext/alsa/gstalsamixer.h index a58459a004..38d6d41696 100644 --- a/ext/alsa/gstalsamixer.h +++ b/ext/alsa/gstalsamixer.h @@ -55,11 +55,7 @@ struct _GstAlsaMixer GstTask * task; GStaticRecMutex task_mutex; -#if !GLIB_CHECK_VERSION (2, 31, 0) - GStaticRecMutex rec_mutex; -#else GRecMutex rec_mutex; -#endif int pfd[2]; @@ -70,13 +66,8 @@ struct _GstAlsaMixer GstAlsaMixerDirection dir; }; -#if !GLIB_CHECK_VERSION (2, 31, 0) -#define GST_ALSA_MIXER_LOCK(mixer) g_static_rec_mutex_lock (&mixer->rec_mutex) -#define GST_ALSA_MIXER_UNLOCK(mixer) g_static_rec_mutex_unlock (&mixer->rec_mutex) -#else #define GST_ALSA_MIXER_LOCK(mixer) g_rec_mutex_lock (&mixer->rec_mutex) #define GST_ALSA_MIXER_UNLOCK(mixer) g_rec_mutex_unlock (&mixer->rec_mutex) -#endif GstAlsaMixer* gst_alsa_mixer_new (const gchar *device, GstAlsaMixerDirection dir); diff --git a/gst-libs/gst/audio/gstaudiosink.c b/gst-libs/gst/audio/gstaudiosink.c index 835dc4b9b3..6efa2f554a 100644 --- a/gst-libs/gst/audio/gstaudiosink.c +++ b/gst-libs/gst/audio/gstaudiosink.c @@ -438,14 +438,8 @@ gst_audio_sink_ring_buffer_activate (GstAudioRingBuffer * buf, gboolean active) GST_DEBUG_OBJECT (sink, "starting thread"); -#if !GLIB_CHECK_VERSION (2, 31, 0) - sink->thread = - g_thread_create ((GThreadFunc) audioringbuffer_thread_func, buf, TRUE, - &error); -#else sink->thread = g_thread_try_new ("audiosink-ringbuffer", (GThreadFunc) audioringbuffer_thread_func, buf, &error); -#endif if (!sink->thread || error != NULL) goto thread_failed; diff --git a/gst-libs/gst/audio/gstaudiosrc.c b/gst-libs/gst/audio/gstaudiosrc.c index 8be7fa3eff..c8e3a29adc 100644 --- a/gst-libs/gst/audio/gstaudiosrc.c +++ b/gst-libs/gst/audio/gstaudiosrc.c @@ -398,14 +398,8 @@ gst_audio_src_ring_buffer_acquire (GstAudioRingBuffer * buf, abuf->running = TRUE; /* FIXME: handle thread creation failure */ -#if !GLIB_CHECK_VERSION (2, 31, 0) - src->thread = - g_thread_create ((GThreadFunc) audioringbuffer_thread_func, buf, TRUE, - NULL); -#else src->thread = g_thread_try_new ("audiosrc-ringbuffer", (GThreadFunc) audioringbuffer_thread_func, buf, NULL); -#endif GST_AUDIO_RING_BUFFER_WAIT (buf); diff --git a/gst-libs/gst/glib-compat-private.h b/gst-libs/gst/glib-compat-private.h index b9248e6861..53a9c80c03 100644 --- a/gst-libs/gst/glib-compat-private.h +++ b/gst-libs/gst/glib-compat-private.h @@ -27,43 +27,19 @@ G_BEGIN_DECLS -#if !GLIB_CHECK_VERSION(2,25,0) - -#if defined (_MSC_VER) && !defined(_WIN64) -typedef struct _stat32 GStatBuf; -#else -typedef struct stat GStatBuf; -#endif - -#endif - -#if GLIB_CHECK_VERSION(2,26,0) +/* FIXME: can use unconditionally now */ #define GLIB_HAS_GDATETIME -#endif -/* See bug #651514 */ -#if GLIB_CHECK_VERSION(2,29,5) +/* FIXME: can use the new functions unconditionally now */ #define G_ATOMIC_POINTER_COMPARE_AND_EXCHANGE(a,b,c) \ g_atomic_pointer_compare_and_exchange ((a),(b),(c)) #define G_ATOMIC_INT_COMPARE_AND_EXCHANGE(a,b,c) \ g_atomic_int_compare_and_exchange ((a),(b),(c)) -#else -#define G_ATOMIC_POINTER_COMPARE_AND_EXCHANGE(a,b,c) \ - g_atomic_pointer_compare_and_exchange ((volatile gpointer *)(a),(b),(c)) -#define G_ATOMIC_INT_COMPARE_AND_EXCHANGE(a,b,c) \ - g_atomic_int_compare_and_exchange ((volatile int *)(a),(b),(c)) -#endif - -/* See bug #651514 */ -#if GLIB_CHECK_VERSION(2,29,5) #define G_ATOMIC_INT_ADD(a,b) g_atomic_int_add ((a),(b)) -#else -#define G_ATOMIC_INT_ADD(a,b) g_atomic_int_exchange_and_add ((a),(b)) -#endif /* copies */ -#if GLIB_CHECK_VERSION (2, 31, 0) +/* FIXME: use new GLib API */ #define g_mutex_new gst_g_mutex_new static inline GMutex * gst_g_mutex_new (void) @@ -126,7 +102,6 @@ gst_g_cond_timed_wait (GCond *cond, GMutex *mutex, GTimeVal *abs_time) end_time += g_get_monotonic_time () - g_get_real_time (); return g_cond_wait_until (cond, mutex, end_time); } -#endif /* GLIB_CHECK_VERSION (2, 31, 0) */ /* adaptations */ diff --git a/gst-libs/gst/tag/licenses.c b/gst-libs/gst/tag/licenses.c index f765cfd7b6..189134447d 100644 --- a/gst-libs/gst/tag/licenses.c +++ b/gst-libs/gst/tag/licenses.c @@ -110,64 +110,6 @@ gst_tag_get_license_translations_dictionary (void) #endif #ifdef ENABLE_NLS - -#if !GLIB_CHECK_VERSION(2,28,0) -static GVariant * -gst_g_variant_lookup_value (GVariant * dictionary, const gchar * key, - const GVariantType * expected_type) -{ - GVariantIter iter; - GVariant *entry; - GVariant *value; - - GST_ERROR ("here, using fallback"); - - g_assert (g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{s*}"))); - g_assert (expected_type != NULL); - - g_variant_iter_init (&iter, dictionary); - while ((entry = g_variant_iter_next_value (&iter))) { - GVariant *entry_key; - gboolean matches; - - entry_key = g_variant_get_child_value (entry, 0); - matches = strcmp (g_variant_get_string (entry_key, NULL), key) == 0; - g_variant_unref (entry_key); - - if (matches) - break; - - g_variant_unref (entry); - } - - if (entry == NULL) - return NULL; - - value = g_variant_get_child_value (entry, 1); - g_variant_unref (entry); - - if (g_variant_is_of_type (value, G_VARIANT_TYPE_VARIANT)) { - GVariant *tmp; - - tmp = g_variant_get_variant (value); - g_variant_unref (value); - - if (expected_type && !g_variant_is_of_type (tmp, expected_type)) { - g_variant_unref (tmp); - tmp = NULL; - } - - value = tmp; - } - - g_assert (value == NULL || g_variant_is_of_type (value, expected_type)); - - return value; -} - -#define g_variant_lookup_value gst_g_variant_lookup_value -#endif /* !GLIB_CHECK_VERSION(2,28,0) */ - static gboolean gst_variant_lookup_string_value (GVariant * dict, const gchar * lang, const gchar ** translation) diff --git a/gst-libs/gst/tag/xmpwriter.c b/gst-libs/gst/tag/xmpwriter.c index 10bf1f9534..d350249df8 100644 --- a/gst-libs/gst/tag/xmpwriter.c +++ b/gst-libs/gst/tag/xmpwriter.c @@ -47,20 +47,11 @@ static GQuark tag_xmp_writer_key; typedef struct { GSList *schemas; -#if !GLIB_CHECK_VERSION (2, 31, 0) - GStaticMutex lock; -#else GMutex lock; -#endif } GstTagXmpWriterData; -#if !GLIB_CHECK_VERSION (2, 31, 0) -#define GST_TAG_XMP_WRITER_DATA_LOCK(data) g_static_mutex_lock(&data->lock) -#define GST_TAG_XMP_WRITER_DATA_UNLOCK(data) g_static_mutex_unlock(&data->lock) -#else #define GST_TAG_XMP_WRITER_DATA_LOCK(data) g_mutex_lock(&data->lock) #define GST_TAG_XMP_WRITER_DATA_UNLOCK(data) g_mutex_unlock(&data->lock) -#endif GType gst_tag_xmp_writer_get_type (void) @@ -128,11 +119,7 @@ gst_tag_xmp_writer_data_free (gpointer p) } g_slist_free (data->schemas); } -#if !GLIB_CHECK_VERSION (2, 31, 0) - g_static_mutex_free (&data->lock); -#else g_mutex_clear (&data->lock); -#endif g_slice_free (GstTagXmpWriterData, data); } @@ -145,36 +132,22 @@ gst_tag_xmp_writer_get_data (GstTagXmpWriter * xmpconfig) data = g_object_get_qdata (G_OBJECT (xmpconfig), tag_xmp_writer_key); if (!data) { /* make sure no other thread is creating a GstTagData at the same time */ -#if !GLIB_CHECK_VERSION (2, 31, 0) - static GStaticMutex create_mutex = G_STATIC_MUTEX_INIT; - - g_static_mutex_lock (&create_mutex); -#else static GMutex create_mutex; /* no initialisation required */ g_mutex_lock (&create_mutex); -#endif data = g_object_get_qdata (G_OBJECT (xmpconfig), tag_xmp_writer_key); if (!data) { data = g_slice_new (GstTagXmpWriterData); -#if !GLIB_CHECK_VERSION (2, 31, 0) - g_static_mutex_init (&data->lock); -#else g_mutex_init (&data->lock); -#endif data->schemas = NULL; gst_tag_xmp_writer_data_add_all_schemas_unlocked (data); g_object_set_qdata_full (G_OBJECT (xmpconfig), tag_xmp_writer_key, data, gst_tag_xmp_writer_data_free); } -#if !GLIB_CHECK_VERSION (2, 31, 0) - g_static_mutex_unlock (&create_mutex); -#else g_mutex_unlock (&create_mutex); -#endif } return data; diff --git a/gst-libs/gst/video/video-overlay-composition.c b/gst-libs/gst/video/video-overlay-composition.c index 9bf887ff05..9b984dff1e 100644 --- a/gst-libs/gst/video/video-overlay-composition.c +++ b/gst-libs/gst/video/video-overlay-composition.c @@ -136,11 +136,7 @@ struct _GstVideoOverlayRectangle /* FIXME: we may also need a (private) way to cache converted/scaled * pixel blobs */ -#if !GLIB_CHECK_VERSION (2, 31, 0) - GStaticMutex lock; -#else GMutex lock; -#endif GList *scaled_rectangles; }; @@ -150,13 +146,8 @@ struct _GstVideoOverlayRectangleClass GstMiniObjectClass parent_class; }; -#if !GLIB_CHECK_VERSION (2, 31, 0) -#define GST_RECTANGLE_LOCK(rect) g_static_mutex_lock(&rect->lock) -#define GST_RECTANGLE_UNLOCK(rect) g_static_mutex_unlock(&rect->lock) -#else #define GST_RECTANGLE_LOCK(rect) g_mutex_lock(&rect->lock) #define GST_RECTANGLE_UNLOCK(rect) g_mutex_unlock(&rect->lock) -#endif static void gst_video_overlay_composition_class_init (GstMiniObjectClass * k); static void gst_video_overlay_composition_finalize (GstMiniObject * comp); @@ -197,11 +188,7 @@ gst_video_overlay_get_seqnum (void) { static gint seqnum; /* 0 */ -#if GLIB_CHECK_VERSION(2,29,5) return (guint) g_atomic_int_add (&seqnum, 1); -#else - return (guint) g_atomic_int_exchange_and_add (&seqnum, 1); -#endif } #define GST_OVERLAY_COMPOSITION_QUARK gst_overlay_composition_quark_get() @@ -683,11 +670,8 @@ gst_video_overlay_rectangle_finalize (GstMiniObject * mini_obj) rect->scaled_rectangles = g_list_delete_link (rect->scaled_rectangles, rect->scaled_rectangles); } -#if !GLIB_CHECK_VERSION (2, 31, 0) - g_static_mutex_free (&rect->lock); -#else g_mutex_clear (&rect->lock); -#endif + /* not chaining up to GstMiniObject's finalize for now, we know it's empty */ } @@ -703,11 +687,7 @@ gst_video_overlay_rectangle_instance_init (GstMiniObject * mini_obj) { GstVideoOverlayRectangle *rect = (GstVideoOverlayRectangle *) mini_obj; -#if !GLIB_CHECK_VERSION (2, 31, 0) - g_static_mutex_init (&rect->lock); -#else g_mutex_init (&rect->lock); -#endif } static inline gboolean diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index fa1f957e7c..02414040ac 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -40,6 +40,10 @@ */ /* Element-Checklist-Version: 5 */ +/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex + * with newer GLib versions (>= 2.31.0) */ +#define GLIB_DISABLE_DEPRECATION_WARNINGS + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -981,11 +985,7 @@ gst_adder_request_new_pad (GstElement * element, GstPadTemplate * templ, adder = GST_ADDER (element); /* increment pad counter */ -#if GLIB_CHECK_VERSION(2,29,5) padcount = g_atomic_int_add (&adder->padcount, 1); -#else - padcount = g_atomic_int_exchange_and_add (&adder->padcount, 1); -#endif name = g_strdup_printf ("sink_%u", padcount); newpad = gst_pad_new_from_template (templ, name); diff --git a/gst/audiorate/gstaudiorate.c b/gst/audiorate/gstaudiorate.c index 82074755f8..ba5c54bf46 100644 --- a/gst/audiorate/gstaudiorate.c +++ b/gst/audiorate/gstaudiorate.c @@ -402,21 +402,13 @@ gst_audio_rate_convert_segments (GstAudioRate * audiorate) static void gst_audio_rate_notify_drop (GstAudioRate * audiorate) { -#if !GLIB_CHECK_VERSION(2,26,0) - g_object_notify ((GObject *) audiorate, "drop"); -#else g_object_notify_by_pspec ((GObject *) audiorate, pspec_drop); -#endif } static void gst_audio_rate_notify_add (GstAudioRate * audiorate) { -#if !GLIB_CHECK_VERSION(2,26,0) - g_object_notify ((GObject *) audiorate, "add"); -#else g_object_notify_by_pspec ((GObject *) audiorate, pspec_add); -#endif } static GstFlowReturn diff --git a/gst/tcp/gstmultisocketsink.c b/gst/tcp/gstmultisocketsink.c index 110ef1ca43..08b22de3e9 100644 --- a/gst/tcp/gstmultisocketsink.c +++ b/gst/tcp/gstmultisocketsink.c @@ -2635,13 +2635,8 @@ gst_multi_socket_sink_start (GstBaseSink * bsink) this->running = TRUE; -#if !GLIB_CHECK_VERSION (2, 31, 0) - this->thread = g_thread_create ((GThreadFunc) gst_multi_socket_sink_thread, - this, TRUE, NULL); -#else this->thread = g_thread_new ("multisocketsink", (GThreadFunc) gst_multi_socket_sink_thread, this); -#endif GST_OBJECT_FLAG_SET (this, GST_MULTI_SOCKET_SINK_OPEN); diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 7b786a540b..1e07387929 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -652,21 +652,13 @@ gst_video_rate_swap_prev (GstVideoRate * videorate, GstBuffer * buffer, static void gst_video_rate_notify_drop (GstVideoRate * videorate) { -#if !GLIB_CHECK_VERSION(2,26,0) - g_object_notify ((GObject *) videorate, "drop"); -#else g_object_notify_by_pspec ((GObject *) videorate, pspec_drop); -#endif } static void gst_video_rate_notify_duplicate (GstVideoRate * videorate) { -#if !GLIB_CHECK_VERSION(2,26,0) - g_object_notify ((GObject *) videorate, "duplicate"); -#else g_object_notify_by_pspec ((GObject *) videorate, pspec_duplicate); -#endif } #define MAGIC_LIMIT 25 diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 248dec3f30..f08eccbd9e 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -740,13 +740,8 @@ gst_ximagesink_manage_event_thread (GstXImageSink * ximagesink) GST_DEBUG_OBJECT (ximagesink, "run xevent thread, expose %d, events %d", ximagesink->handle_expose, ximagesink->handle_events); ximagesink->running = TRUE; -#if !GLIB_CHECK_VERSION (2, 31, 0) - ximagesink->event_thread = g_thread_create ( - (GThreadFunc) gst_ximagesink_event_thread, ximagesink, TRUE, NULL); -#else ximagesink->event_thread = g_thread_try_new ("ximagesink-events", (GThreadFunc) gst_ximagesink_event_thread, ximagesink, NULL); -#endif } } else { if (ximagesink->event_thread) { diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index f5aa49cdf9..523b73673b 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -1171,13 +1171,8 @@ gst_xvimagesink_manage_event_thread (GstXvImageSink * xvimagesink) GST_DEBUG_OBJECT (xvimagesink, "run xevent thread, expose %d, events %d", xvimagesink->handle_expose, xvimagesink->handle_events); xvimagesink->running = TRUE; -#if !GLIB_CHECK_VERSION (2, 31, 0) - xvimagesink->event_thread = g_thread_create ( - (GThreadFunc) gst_xvimagesink_event_thread, xvimagesink, TRUE, NULL); -#else xvimagesink->event_thread = g_thread_try_new ("xvimagesink-events", (GThreadFunc) gst_xvimagesink_event_thread, xvimagesink, NULL); -#endif } } else { if (xvimagesink->event_thread) { diff --git a/tests/examples/encoding/encoding.c b/tests/examples/encoding/encoding.c index bb0072a86a..7c01a085a7 100644 --- a/tests/examples/encoding/encoding.c +++ b/tests/examples/encoding/encoding.c @@ -395,11 +395,6 @@ main (int argc, char **argv) GstEncodingProfile *prof; gchar *inputuri; -#if !GLIB_CHECK_VERSION (2, 31, 0) - if (!g_thread_supported ()) - g_thread_init (NULL); -#endif - ctx = g_option_context_new ("- encode URIs with GstProfile and encodebin"); g_option_context_add_main_entries (ctx, options, NULL); g_option_context_add_group (ctx, gst_init_get_option_group ()); diff --git a/tests/examples/overlay/gtk-videooverlay.c b/tests/examples/overlay/gtk-videooverlay.c index f09c895457..6d9ef23643 100644 --- a/tests/examples/overlay/gtk-videooverlay.c +++ b/tests/examples/overlay/gtk-videooverlay.c @@ -98,11 +98,6 @@ main (int argc, char **argv) gulong embed_xid; GstStateChangeReturn sret; -#if !GLIB_CHECK_VERSION (2, 31, 0) - if (!g_thread_supported ()) - g_thread_init (NULL); -#endif - gst_init (&argc, &argv); gtk_init (&argc, &argv); diff --git a/tests/examples/overlay/qt-videooverlay.cpp b/tests/examples/overlay/qt-videooverlay.cpp index 451d22cfd1..8ec99927fa 100644 --- a/tests/examples/overlay/qt-videooverlay.cpp +++ b/tests/examples/overlay/qt-videooverlay.cpp @@ -80,11 +80,6 @@ find_video_sink (void) int main(int argc, char *argv[]) { -#if !GLIB_CHECK_VERSION (2, 31, 0) - if (!g_thread_supported ()) - g_thread_init (NULL); -#endif - gst_init (&argc, &argv); QApplication app(argc, argv); app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit ())); diff --git a/tests/examples/seek/jsseek.c b/tests/examples/seek/jsseek.c index b803eb6e07..9ade3b81f9 100644 --- a/tests/examples/seek/jsseek.c +++ b/tests/examples/seek/jsseek.c @@ -2676,11 +2676,6 @@ main (int argc, char **argv) GOptionContext *ctx; GError *err = NULL; -#if !GLIB_CHECK_VERSION (2, 31, 0) - if (!g_thread_supported ()) - g_thread_init (NULL); -#endif - ctx = g_option_context_new ("- test seeking in gsteamer"); g_option_context_add_main_entries (ctx, options, NULL); g_option_context_add_group (ctx, gst_init_get_option_group ()); diff --git a/tests/examples/seek/scrubby.c b/tests/examples/seek/scrubby.c index 47b062ca2e..d77ca24083 100644 --- a/tests/examples/seek/scrubby.c +++ b/tests/examples/seek/scrubby.c @@ -458,11 +458,6 @@ main (int argc, char **argv) GOptionContext *ctx; GError *err = NULL; -#if !GLIB_CHECK_VERSION (2, 31, 0) - if (!g_thread_supported ()) - g_thread_init (NULL); -#endif - ctx = g_option_context_new ("seek"); g_option_context_add_main_entries (ctx, options, NULL); g_option_context_add_group (ctx, gst_init_get_option_group ()); diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index 126d88b05c..d27e9d0756 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -1809,11 +1809,6 @@ main (int argc, char **argv) GOptionContext *ctx; GError *err = NULL; -#if !GLIB_CHECK_VERSION (2, 31, 0) - if (!g_thread_supported ()) - g_thread_init (NULL); -#endif - ctx = g_option_context_new ("- test seeking in gsteamer"); g_option_context_add_main_entries (ctx, options, NULL); g_option_context_add_group (ctx, gst_init_get_option_group ()); diff --git a/tests/icles/stress-playbin.c b/tests/icles/stress-playbin.c index 30970ce0d7..b4471afe1d 100644 --- a/tests/icles/stress-playbin.c +++ b/tests/icles/stress-playbin.c @@ -100,11 +100,6 @@ main (int argc, char **argv) }; GTimer *timer; -#if !GLIB_CHECK_VERSION (2, 31, 0) - if (!g_thread_supported ()) - g_thread_init (NULL); -#endif - ctx = g_option_context_new ("FILES OR DIRECTORIES WITH AUDIO FILES"); g_option_context_add_main_entries (ctx, options, NULL); g_option_context_add_group (ctx, gst_init_get_option_group ()); diff --git a/tests/icles/test-colorkey.c b/tests/icles/test-colorkey.c index fdd9899dc5..f7fab58637 100644 --- a/tests/icles/test-colorkey.c +++ b/tests/icles/test-colorkey.c @@ -173,11 +173,6 @@ main (int argc, char **argv) GValueArray *arr; #endif -#if !GLIB_CHECK_VERSION (2, 31, 0) - if (!g_thread_supported ()) - g_thread_init (NULL); -#endif - gst_init (&argc, &argv); gtk_init (&argc, &argv); diff --git a/tests/icles/test-videooverlay.c b/tests/icles/test-videooverlay.c index 176d91f2f8..8b5f5e43c4 100644 --- a/tests/icles/test-videooverlay.c +++ b/tests/icles/test-videooverlay.c @@ -144,11 +144,6 @@ main (gint argc, gchar ** argv) gulong embed_xid = 0; gboolean force_aspect = FALSE, draw_borders = FALSE; -#if !GLIB_CHECK_VERSION (2, 31, 0) - if (!g_thread_supported ()) - g_thread_init (NULL); -#endif - gst_init (&argc, &argv); gtk_init (&argc, &argv); diff --git a/tools/gst-discoverer.c b/tools/gst-discoverer.c index 9101c49a14..f17def52c6 100644 --- a/tools/gst-discoverer.c +++ b/tools/gst-discoverer.c @@ -514,11 +514,6 @@ main (int argc, char **argv) }; GOptionContext *ctx; -#if !GLIB_CHECK_VERSION (2, 31, 0) - if (!g_thread_supported ()) - g_thread_init (NULL); -#endif - ctx = g_option_context_new ("- discover files synchronously with GstDiscoverer");