summaryrefslogtreecommitdiff
path: root/gst/rtpmanager/gstrtpjitterbuffer.c
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2016-03-02 13:57:07 +0100
committerEdward Hervey <bilboed@bilboed.com>2016-04-07 10:06:18 +0200
commitcf866a84694862cee766b63c80f5bc8d6e213364 (patch)
tree02039205cf5874291aebcfeaa29f79683ebadefd /gst/rtpmanager/gstrtpjitterbuffer.c
parenta5369c6be36fb22b505bb765f987212b39bcf408 (diff)
downloadgstreamer-plugins-good-cf866a84694862cee766b63c80f5bc8d6e213364.tar.gz
jitterbuffer: Add tracing of lock usage
Helps with debugging lock usage https://bugzilla.gnome.org/show_bug.cgi?id=762988
Diffstat (limited to 'gst/rtpmanager/gstrtpjitterbuffer.c')
-rw-r--r--gst/rtpmanager/gstrtpjitterbuffer.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c
index ae2bf9da6..0f622ab36 100644
--- a/gst/rtpmanager/gstrtpjitterbuffer.c
+++ b/gst/rtpmanager/gstrtpjitterbuffer.c
@@ -173,14 +173,21 @@ enum
PROP_RFC7273_SYNC
};
-#define JBUF_LOCK(priv) (g_mutex_lock (&(priv)->jbuf_lock))
+#define JBUF_LOCK(priv) G_STMT_START { \
+ GST_TRACE("Locking from thread %p", g_thread_self()); \
+ (g_mutex_lock (&(priv)->jbuf_lock)); \
+ GST_TRACE("Locked from thread %p", g_thread_self()); \
+ } G_STMT_END
#define JBUF_LOCK_CHECK(priv,label) G_STMT_START { \
JBUF_LOCK (priv); \
if (G_UNLIKELY (priv->srcresult != GST_FLOW_OK)) \
goto label; \
} G_STMT_END
-#define JBUF_UNLOCK(priv) (g_mutex_unlock (&(priv)->jbuf_lock))
+#define JBUF_UNLOCK(priv) G_STMT_START { \
+ GST_TRACE ("Unlocking from thread %p", g_thread_self ()); \
+ (g_mutex_unlock (&(priv)->jbuf_lock)); \
+} G_STMT_END
#define JBUF_WAIT_TIMER(priv) G_STMT_START { \
GST_DEBUG ("waiting timer"); \