mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:46:13 +00:00
tests: insertbin: Don't use duplicated variable name
../subprojects/gst-plugins-bad/tests/check/libs/insertbin.c(46): warning C4273: 'mutex': ... The "mutex" was declared in gstcheck.h already
This commit is contained in:
parent
38c3d4ca7b
commit
4e6e6ad0f9
1 changed files with 8 additions and 8 deletions
|
@ -43,7 +43,7 @@ GstStaticPadTemplate srcpad_template = GST_STATIC_PAD_TEMPLATE ("src", /* the n
|
||||||
|
|
||||||
gint cb_count = 0;
|
gint cb_count = 0;
|
||||||
|
|
||||||
GMutex mutex;
|
GMutex lock;
|
||||||
GCond cond;
|
GCond cond;
|
||||||
|
|
||||||
GThread *push_thread = NULL;
|
GThread *push_thread = NULL;
|
||||||
|
@ -103,10 +103,10 @@ thread_push_buffer (gpointer data)
|
||||||
static GstPadProbeReturn
|
static GstPadProbeReturn
|
||||||
got_buffer_block (GstPad * pad, GstPadProbeInfo * info, gpointer data)
|
got_buffer_block (GstPad * pad, GstPadProbeInfo * info, gpointer data)
|
||||||
{
|
{
|
||||||
g_mutex_lock (&mutex);
|
g_mutex_lock (&lock);
|
||||||
is_blocked = TRUE;
|
is_blocked = TRUE;
|
||||||
g_cond_broadcast (&cond);
|
g_cond_broadcast (&cond);
|
||||||
g_mutex_unlock (&mutex);
|
g_mutex_unlock (&lock);
|
||||||
|
|
||||||
return GST_PAD_PROBE_OK;
|
return GST_PAD_PROBE_OK;
|
||||||
}
|
}
|
||||||
|
@ -122,10 +122,10 @@ got_buffer_block (GstPad * pad, GstPadProbeInfo * info, gpointer data)
|
||||||
got_buffer_block, NULL, NULL); \
|
got_buffer_block, NULL, NULL); \
|
||||||
push_thread = g_thread_new ("push block", thread_push_buffer, srcpad); \
|
push_thread = g_thread_new ("push block", thread_push_buffer, srcpad); \
|
||||||
fail_unless (push_thread != NULL); \
|
fail_unless (push_thread != NULL); \
|
||||||
g_mutex_lock (&mutex); \
|
g_mutex_lock (&lock); \
|
||||||
while (is_blocked == FALSE) \
|
while (is_blocked == FALSE) \
|
||||||
g_cond_wait (&cond, &mutex); \
|
g_cond_wait (&cond, &lock); \
|
||||||
g_mutex_unlock (&mutex); \
|
g_mutex_unlock (&lock); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define unblock_thread() \
|
#define unblock_thread() \
|
||||||
|
@ -154,7 +154,7 @@ GST_START_TEST (test_insertbin_simple)
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
|
||||||
g_mutex_init (&mutex);
|
g_mutex_init (&lock);
|
||||||
g_cond_init (&cond);
|
g_cond_init (&cond);
|
||||||
|
|
||||||
insertbin = gst_insert_bin_new (NULL);
|
insertbin = gst_insert_bin_new (NULL);
|
||||||
|
@ -359,7 +359,7 @@ GST_START_TEST (test_insertbin_simple)
|
||||||
|
|
||||||
fail_unless (cb_count == 0);
|
fail_unless (cb_count == 0);
|
||||||
|
|
||||||
g_mutex_clear (&mutex);
|
g_mutex_clear (&lock);
|
||||||
g_cond_clear (&cond);
|
g_cond_clear (&cond);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue