diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2013-03-22 15:04:55 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2013-03-22 15:04:55 -0400 |
commit | 1a0dd0526eb5ab5ed40fe54ccb37b61a619c7d6c (patch) | |
tree | ba6cbb62e5194e1f9bcf979f8251e7ef8d3d3850 | |
parent | c355f2191a9bd67026d9d08969c370a4018513f0 (diff) | |
download | farstream-1a0dd0526eb5ab5ed40fe54ccb37b61a619c7d6c.tar.gz |
Remove deprecated GStaticMutex usage
-rw-r--r-- | farstream/fs-plugin.c | 14 | ||||
-rw-r--r-- | tests/check/raw/conference.c | 6 | ||||
-rw-r--r-- | tests/check/rtp/conference.c | 6 | ||||
-rw-r--r-- | tests/check/transmitter/nice.c | 6 | ||||
-rw-r--r-- | tests/check/transmitter/rawudp.c | 10 |
5 files changed, 21 insertions, 21 deletions
diff --git a/farstream/fs-plugin.c b/farstream/fs-plugin.c index 96957278..05a3bd4c 100644 --- a/farstream/fs-plugin.c +++ b/farstream/fs-plugin.c @@ -52,7 +52,7 @@ static gboolean fs_plugin_load (GTypeModule *module); -static GStaticMutex mutex = G_STATIC_MUTEX_INIT; +static GMutex mutex; static gchar **search_paths = NULL; static GList *plugins = NULL; @@ -229,14 +229,14 @@ fs_plugin_create_valist (const gchar *name, const gchar *type_suffix, _fs_conference_init_debug (); - g_static_mutex_lock (&mutex); + g_mutex_lock (&mutex); plugin = fs_plugin_get_by_name_locked (name, type_suffix); if (!plugin) { plugin = g_object_new (FS_TYPE_PLUGIN, NULL); if (!plugin) { - g_static_mutex_unlock (&mutex); + g_mutex_unlock (&mutex); g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create a fsplugin object"); return NULL; @@ -249,14 +249,14 @@ fs_plugin_create_valist (const gchar *name, const gchar *type_suffix, * the gstreamer libraries can't be unloaded */ if (!g_type_module_use (G_TYPE_MODULE (plugin))) { - g_static_mutex_unlock (&mutex); + g_mutex_unlock (&mutex); g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not load the %s-%s transmitter plugin", name, type_suffix); return NULL; } } - g_static_mutex_unlock (&mutex); + g_mutex_unlock (&mutex); object = g_object_new_valist (plugin->type, first_property_name, var_args); @@ -317,7 +317,7 @@ fs_plugin_list_available (const gchar *type_suffix) _fs_conference_init_debug (); - g_static_mutex_lock (&mutex); + g_mutex_lock (&mutex); fs_plugin_search_path_init (); @@ -386,7 +386,7 @@ fs_plugin_list_available (const gchar *type_suffix) g_ptr_array_free (list, TRUE); } - g_static_mutex_unlock (&mutex); + g_mutex_unlock (&mutex); return retval; } diff --git a/tests/check/raw/conference.c b/tests/check/raw/conference.c index d5ba354c..c8c571af 100644 --- a/tests/check/raw/conference.c +++ b/tests/check/raw/conference.c @@ -87,10 +87,10 @@ gint max_buffer_count = 20; guint max_src_pads = 1; -GStaticMutex testlock = G_STATIC_MUTEX_INIT; +GMutex testlock; -#define TEST_LOCK() g_static_mutex_lock (&testlock) -#define TEST_UNLOCK() g_static_mutex_unlock (&testlock) +#define TEST_LOCK() g_mutex_lock (&testlock) +#define TEST_UNLOCK() g_mutex_unlock (&testlock) gboolean select_last_codec = FALSE; gboolean reset_to_last_codec = FALSE; diff --git a/tests/check/rtp/conference.c b/tests/check/rtp/conference.c index 2bfecaa9..610f3c67 100644 --- a/tests/check/rtp/conference.c +++ b/tests/check/rtp/conference.c @@ -56,10 +56,10 @@ gint max_buffer_count = 20; guint max_src_pads = 1; -GStaticMutex testlock = G_STATIC_MUTEX_INIT; +GMutex testlock; -#define TEST_LOCK() g_static_mutex_lock (&testlock) -#define TEST_UNLOCK() g_static_mutex_unlock (&testlock) +#define TEST_LOCK() g_mutex_lock (&testlock) +#define TEST_UNLOCK() g_mutex_unlock (&testlock) GST_START_TEST (test_rtpconference_new) diff --git a/tests/check/transmitter/nice.c b/tests/check/transmitter/nice.c index 2d2ac76d..94ccab98 100644 --- a/tests/check/transmitter/nice.c +++ b/tests/check/transmitter/nice.c @@ -50,7 +50,7 @@ gboolean associate_on_source = TRUE; gboolean is_address_local = FALSE; gboolean force_candidates = FALSE; -GStaticMutex count_mutex = G_STATIC_MUTEX_INIT; +GMutex count_mutex; GST_START_TEST (test_nicetransmitter_new) { @@ -200,7 +200,7 @@ _handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad, "Buffer is size %d but component_id is %d", gst_buffer_get_size (buffer), component_id); - g_static_mutex_lock (&count_mutex); + g_mutex_lock (&count_mutex); buffer_count[stream][component_id-1]++; @@ -244,7 +244,7 @@ _handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad, g_main_loop_quit (loop); } - g_static_mutex_unlock (&count_mutex); + g_mutex_unlock (&count_mutex); } static void diff --git a/tests/check/transmitter/rawudp.c b/tests/check/transmitter/rawudp.c index 2be20bc8..b8749ec1 100644 --- a/tests/check/transmitter/rawudp.c +++ b/tests/check/transmitter/rawudp.c @@ -50,7 +50,7 @@ gboolean has_stun = FALSE; gboolean associate_on_source = TRUE; gboolean pipeline_done = FALSE; -GStaticMutex pipeline_mod_mutex = G_STATIC_MUTEX_INIT; +GMutex pipeline_mod_mutex; void *stun_alternd_data = NULL; @@ -187,11 +187,11 @@ _new_active_candidate_pair (FsStreamTransmitter *st, FsCandidate *local, GST_DEBUG ("New active candidate pair for component %d", local->component_id); - g_static_mutex_lock (&pipeline_mod_mutex); + g_mutex_lock (&pipeline_mod_mutex); if (!pipeline_done && !src_setup[local->component_id-1]) setup_fakesrc (user_data, pipeline, local->component_id); src_setup[local->component_id-1] = TRUE; - g_static_mutex_unlock (&pipeline_mod_mutex); + g_mutex_unlock (&pipeline_mod_mutex); } static void @@ -385,9 +385,9 @@ run_rawudp_transmitter_test (gint n_parameters, GParameter *params, skip: - g_static_mutex_lock (&pipeline_mod_mutex); + g_mutex_lock (&pipeline_mod_mutex); pipeline_done = TRUE; - g_static_mutex_unlock (&pipeline_mod_mutex); + g_mutex_unlock (&pipeline_mod_mutex); gst_element_set_state (pipeline, GST_STATE_NULL); |