diff options
author | Seungha Yang <seungha@centricular.com> | 2021-05-20 18:38:17 +0900 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-05-20 11:19:44 +0000 |
commit | 7a0bc2a91d4e8eb641dd7b468a59ab2c0eaf44cd (patch) | |
tree | eb2983c79ebda405c7cf24870abb8f106155e947 /gst-libs/gst | |
parent | 1f743c8d843e6f9b4f871f298cd86fc7e06a507e (diff) | |
download | gstreamer-plugins-bad-7a0bc2a91d4e8eb641dd7b468a59ab2c0eaf44cd.tar.gz |
d3d11memory: Add trace log for debugging locking thread
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2267>
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/d3d11/gstd3d11memory.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gst-libs/gst/d3d11/gstd3d11memory.c b/gst-libs/gst/d3d11/gstd3d11memory.c index c25ae1a2a..47091dab6 100644 --- a/gst-libs/gst/d3d11/gstd3d11memory.c +++ b/gst-libs/gst/d3d11/gstd3d11memory.c @@ -232,8 +232,16 @@ gst_d3d11_allocation_params_init (GType type) /* GstD3D11Memory */ #define GST_D3D11_MEMORY_GET_LOCK(m) (&(GST_D3D11_MEMORY_CAST(m)->priv->lock)) -#define GST_D3D11_MEMORY_LOCK(m) g_mutex_lock(GST_D3D11_MEMORY_GET_LOCK(m)) -#define GST_D3D11_MEMORY_UNLOCK(m) g_mutex_unlock(GST_D3D11_MEMORY_GET_LOCK(m)) +#define GST_D3D11_MEMORY_LOCK(m) G_STMT_START { \ + GST_TRACE("Locking %p from thread %p", (m), g_thread_self()); \ + g_mutex_lock(GST_D3D11_MEMORY_GET_LOCK(m)); \ + GST_TRACE("Locked %p from thread %p", (m), g_thread_self()); \ +} G_STMT_END + +#define GST_D3D11_MEMORY_UNLOCK(m) G_STMT_START { \ + GST_TRACE("Unlocking %p from thread %p", (m), g_thread_self()); \ + g_mutex_unlock(GST_D3D11_MEMORY_GET_LOCK(m)); \ +} G_STMT_END struct _GstD3D11MemoryPrivate { |