All pastes #735354 Raw Edit

Mine

public text v1 · immutable
·published 2007-10-13 15:40 UTC
rendered paste body
/**
 * GST_OBJECT_LOCK:
 * @obj: a #GstObject to lock
 *
 * This macro will obtain a lock on the object, making serialization possible.
 * It blocks until the lock can be obtained.
 */
#define GST_OBJECT_LOCK(obj)   G_STMT_START {				\
    GST_LOG_OBJECT((GstObject*) obj,					\
		   "Locking object lock from thread %p",		\
		   g_thread_self());					\
    g_mutex_lock(GST_OBJECT_GET_LOCK(obj));				\
    GST_OBJECT_LOCK((GstObject*) obj,					\
		    "Locked object lock from thread %p",		\
		    g_thread_self());					\
  } G_STMT_END

/**
 * GST_OBJECT_TRYLOCK:
 * @obj: a #Object.
 *
 * This macro will try to obtain a lock on the object, but will return with
 * FALSE if it can't get it immediately.
 */
#define GST_OBJECT_TRYLOCK(obj)                g_mutex_trylock(GST_OBJECT_GET_LOCK(obj))
/**
 * GST_OBJECT_UNLOCK:
 * @obj: a #GstObject to unlock.
 *
 * This macro releases a lock on the object.
 */
#define GST_OBJECT_UNLOCK(obj)  G_STMT_START {				\
    GST_LOG_OBJECT ((GstObject*) obj,					\
		    "Unlocking object lock from thread %p",		\
		    g_thread_self());					\
    g_mutex_unlock(GST_OBJECT_GET_LOCK(obj));				\
  } G_STMT_END



-address -Wno-write-strings -MT libgstreamer_0.10_la-gstobject.lo -MD -MP -MF .deps/libgstreamer_0.10_la-gstobject.Tpo -c gstobject.c  -fPIC -DPIC -o .libs/libgstreamer_0.10_la-gstobject.o
cc1: warnings being treated as errors
gstobject.c: In function 'gst_object_sink':
gstobject.c:381: warning: implicit declaration of function 'GST_OBJECT_LOCK'