summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2012-09-12 23:35:29 +0200
committerSjoerd Simons <sjoerd@luon.net>2012-09-13 00:10:03 +0200
commitda58e0cfd3c11a56d0079363cdbb27a980d69844 (patch)
treedb0c9d6f393029d0a4a095011cb2d61bf39b7155 /tests
parent0d5714b926e4e2aac1fa7aeeb4c584789a9655b6 (diff)
downloadfarstream-da58e0cfd3c11a56d0079363cdbb27a980d69844.tar.gz
Rename the mutex to test_mutex as gstcheck defines mutex now
Diffstat (limited to 'tests')
-rw-r--r--tests/check/transmitter/shm.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/check/transmitter/shm.c b/tests/check/transmitter/shm.c
index 3c9257f6..498e62a4 100644
--- a/tests/check/transmitter/shm.c
+++ b/tests/check/transmitter/shm.c
@@ -43,7 +43,7 @@ gboolean src_setup[2] = {FALSE, FALSE};
guint received_known[2] = {0, 0};
gboolean associate_on_source = TRUE;
-GMutex *mutex;
+GMutex *test_mutex;
GCond *cond;
gboolean done = FALSE;
guint connected_count;
@@ -119,9 +119,9 @@ static void
_state_changed (FsStreamTransmitter *st, guint component_id,
FsStreamState state, gpointer user_data)
{
- g_mutex_lock (mutex);
+ g_mutex_lock (test_mutex);
connected_count++;
- g_mutex_unlock (mutex);
+ g_mutex_unlock (test_mutex);
g_cond_signal (cond);
}
@@ -157,9 +157,9 @@ _handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
ts_fail_unless (received_known[0] == 0 && received_known[1] == 0,
"Got a known-source-packet-received signal when we shouldn't have");
- g_mutex_lock (mutex);
+ g_mutex_lock (test_mutex);
done = TRUE;
- g_mutex_unlock (mutex);
+ g_mutex_unlock (test_mutex);
g_cond_signal (cond);
}
}
@@ -220,7 +220,7 @@ run_shm_transmitter_test (gint flags)
done = FALSE;
connected_count = 0;
cond = g_cond_new ();
- mutex = g_mutex_new ();
+ test_mutex = g_mutex_new ();
buffer_count[0] = 0;
buffer_count[1] = 0;
@@ -368,18 +368,18 @@ run_shm_transmitter_test (gint flags)
ts_fail_unless (ret == TRUE, "No detailed error from add_remote_candidate");
g_clear_error (&error);
- g_mutex_lock (mutex);
+ g_mutex_lock (test_mutex);
while (connected_count < 2)
- g_cond_wait (cond, mutex);
- g_mutex_unlock (mutex);
+ g_cond_wait (cond, test_mutex);
+ g_mutex_unlock (test_mutex);
setup_fakesrc (trans, pipeline, 1);
setup_fakesrc (trans, pipeline, 2);
- g_mutex_lock (mutex);
+ g_mutex_lock (test_mutex);
while (!done)
- g_cond_wait (cond, mutex);
- g_mutex_unlock (mutex);
+ g_cond_wait (cond, test_mutex);
+ g_mutex_unlock (test_mutex);
fail_unless (got_prepared[0] == TRUE);
fail_unless (got_prepared[1] == TRUE);
@@ -399,7 +399,7 @@ run_shm_transmitter_test (gint flags)
gst_object_unref (pipeline);
g_cond_free (cond);
- g_mutex_free (mutex);
+ g_mutex_free (test_mutex);
}
GST_START_TEST (test_shmtransmitter_run_basic)