d3dvideosink: Print lock/unlock log with trace debug level

This commit is contained in:
Seungha Yang 2018-10-30 22:49:01 +09:00 committed by Sebastian Dröge
parent 2a3207bfc1
commit c9b204ea87

View file

@ -75,17 +75,24 @@ struct _GstD3DVideoSinkClass
GRecMutex lock; GRecMutex lock;
}; };
#if 1 #define LOCK_SINK(sink) G_STMT_START { \
# define LOCK_SINK(sink) g_rec_mutex_lock(&sink->lock); GST_TRACE_OBJECT(sink, "Locking sink from thread %p", g_thread_self()); \
# define UNLOCK_SINK(sink) g_rec_mutex_unlock(&sink->lock); g_rec_mutex_lock(&sink->lock); \
# define LOCK_CLASS(obj, klass) g_rec_mutex_lock(&klass->lock); GST_TRACE_OBJECT(sink, "Locked sink from thread %p", g_thread_self()); \
# define UNLOCK_CLASS(obj, klass) g_rec_mutex_unlock(&klass->lock); } G_STMT_END
#else #define UNLOCK_SINK(sink) G_STMT_START { \
# define LOCK_SINK(sink) GST_LOG_OBJECT(sink, "SINK LOCK"); g_rec_mutex_lock(&sink->lock); GST_LOG_OBJECT(sink, "SINK LOCKED"); GST_TRACE_OBJECT(sink, "Unlocking sink from thread %p", g_thread_self()); \
# define UNLOCK_SINK(sink) g_rec_mutex_unlock(&sink->lock); GST_LOG_OBJECT(sink, "SINK UNLOCKED"); g_rec_mutex_unlock(&sink->lock); \
# define LOCK_CLASS(obj, klass) GST_LOG_OBJECT(obj, "CLASS LOCK"); g_rec_mutex_lock(&klass->lock); GST_LOG_OBJECT(obj, "CLASS LOCKED"); } G_STMT_END
# define UNLOCK_CLASS(obj, klass) g_rec_mutex_unlock(&klass->lock); GST_LOG_OBJECT(obj, "CLASS UNLOCKED"); #define LOCK_CLASS(obj, klass) G_STMT_START { \
#endif GST_TRACE_OBJECT(obj, "Locking class from thread %p", g_thread_self()); \
g_rec_mutex_lock(&klass->lock); \
GST_TRACE_OBJECT(obj, "Locked class from thread %p", g_thread_self()); \
} G_STMT_END
#define UNLOCK_CLASS(obj, klass) G_STMT_START { \
GST_TRACE_OBJECT(obj, "Unlocking class from thread %p", g_thread_self()); \
g_rec_mutex_unlock(&klass->lock); \
} G_STMT_END
GType gst_d3dvideosink_get_type (void); GType gst_d3dvideosink_get_type (void);