diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2013-06-28 11:00:46 +0200 |
---|---|---|
committer | Matthew Waters <ystreet00@gmail.com> | 2014-03-15 18:36:56 +0100 |
commit | bef97ad03e0ccd6bde6e638bc511a2681f404b7d (patch) | |
tree | 39894ae5585bc8ddfec6b333fc3781f6a1bdf236 /tests | |
parent | 98cca97840e672c648e4532b39ca19d0059a0b68 (diff) | |
download | gstreamer-plugins-bad-bef97ad03e0ccd6bde6e638bc511a2681f404b7d.tar.gz |
[720/906] examples: Stop using deprecated GLib thread API
Diffstat (limited to 'tests')
-rw-r--r-- | tests/examples/clutter/clutteractortee.c | 9 | ||||
-rw-r--r-- | tests/examples/gtk/fxtest/fxtest.c | 2 | ||||
-rw-r--r-- | tests/examples/gtk/fxtest/pixbufdrop.c | 2 |
3 files changed, 3 insertions, 10 deletions
diff --git a/tests/examples/clutter/clutteractortee.c b/tests/examples/clutter/clutteractortee.c index 97b1fcc9b..657e8f628 100644 --- a/tests/examples/clutter/clutteractortee.c +++ b/tests/examples/clutter/clutteractortee.c @@ -71,7 +71,7 @@ create_window (GstBus * bus, GstMessage * message, gpointer data) { GstGLClutterActor **actor = (GstGLClutterActor **) data; static gint count = 0; - static GMutex *mutex = NULL; + static GMutex mutex; // ignore anything but 'prepare-window-handle' element messages if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT) return GST_BUS_PASS; @@ -79,10 +79,7 @@ create_window (GstBus * bus, GstMessage * message, gpointer data) if (!gst_is_video_overlay_prepare_window_handle_message (message)) return GST_BUS_PASS; - if (!mutex) - mutex = g_mutex_new (); - - g_mutex_lock (mutex); + g_mutex_lock (&mutex); if (count < N_ACTORS) { g_message ("adding actor %d", count); @@ -92,7 +89,7 @@ create_window (GstBus * bus, GstMessage * message, gpointer data) count++; } - g_mutex_unlock (mutex); + g_mutex_unlock (&mutex); gst_message_unref (message); return GST_BUS_DROP; diff --git a/tests/examples/gtk/fxtest/fxtest.c b/tests/examples/gtk/fxtest/fxtest.c index 40298d297..124beb140 100644 --- a/tests/examples/gtk/fxtest/fxtest.c +++ b/tests/examples/gtk/fxtest/fxtest.c @@ -132,8 +132,6 @@ main (gint argc, gchar * argv[]) {NULL} }; - g_thread_init (NULL); - context = g_option_context_new (NULL); g_option_context_add_main_entries (context, options, NULL); g_option_context_add_group (context, gst_init_get_option_group ()); diff --git a/tests/examples/gtk/fxtest/pixbufdrop.c b/tests/examples/gtk/fxtest/pixbufdrop.c index 1607b962b..585306843 100644 --- a/tests/examples/gtk/fxtest/pixbufdrop.c +++ b/tests/examples/gtk/fxtest/pixbufdrop.c @@ -213,8 +213,6 @@ main (gint argc, gchar * argv[]) {NULL} }; - g_thread_init (NULL); - context = g_option_context_new (NULL); g_option_context_add_main_entries (context, options, NULL); g_option_context_add_group (context, gst_init_get_option_group ()); |