Mark as deprecated some macros which were presumably meant to be private API and...
authorTim-Philipp Müller <tim@centricular.net>
Sat, 11 Aug 2007 12:39:51 +0000 (12:39 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Sat, 11 Aug 2007 12:39:51 +0000 (12:39 +0000)
Original commit message from CVS:
* docs/libs/gst-plugins-base-libs-sections.txt:
* gst-libs/gst/rtp/gstbasertpdepayload.c:
* gst-libs/gst/rtp/gstbasertpdepayload.h:
Mark as deprecated some macros which were presumably meant to be
private API and accidentally exposed in the public header file.
Also actually _init() lock (only works at the moment because the
struct is zeroed out when created and the initial values in the
mutex struct are zeroes too). (#459585)

ChangeLog
docs/libs/gst-plugins-base-libs-sections.txt
gst-libs/gst/rtp/gstbasertpdepayload.c
gst-libs/gst/rtp/gstbasertpdepayload.h

index e1e4019..ee628ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-08-11  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * docs/libs/gst-plugins-base-libs-sections.txt:
+       * gst-libs/gst/rtp/gstbasertpdepayload.c:
+       * gst-libs/gst/rtp/gstbasertpdepayload.h:
+         Mark as deprecated some macros which were presumably meant to be
+         private API and accidentally exposed in the public header file.
+         Also actually _init() lock (only works at the moment because the
+         struct is zeroed out when created and the initial values in the
+         mutex struct are zeroes too). (#459585)
+
 2007-08-10  Stefan Kost  <ensonic@users.sf.net>
 
        * docs/libs/Makefile.am:
index 1bb5484..e9b8d31 100644 (file)
@@ -796,6 +796,12 @@ GST_BASE_RTP_DEPAYLOAD_GET_CLASS
 GST_IS_BASE_RTP_DEPAYLOAD
 GST_IS_BASE_RTP_DEPAYLOAD_CLASS
 gst_base_rtp_depayload_get_type
+
+<SUBSECTION Private>
+QUEUE_LOCK_INIT
+QUEUE_LOCK_FREE
+QUEUE_LOCK
+QUEUE_UNLOCK
 </SECTION>
 
 <SECTION>
index dae4a8f..9d1539a 100644 (file)
 
 #include "gstbasertpdepayload.h"
 
+#ifdef GST_DISABLE_DEPRECATED
+#define QUEUE_LOCK_INIT(base)   (g_static_rec_mutex_init(&base->queuelock))
+#define QUEUE_LOCK_FREE(base)   (g_static_rec_mutex_free(&base->queuelock))
+#define QUEUE_LOCK(base)        (g_static_rec_mutex_lock(&base->queuelock))
+#define QUEUE_UNLOCK(base)      (g_static_rec_mutex_unlock(&base->queuelock))
+#else
+/* otherwise it's already been defined in the header (FIXME 0.11)*/
+#endif
+
 GST_DEBUG_CATEGORY_STATIC (basertpdepayload_debug);
 #define GST_CAT_DEFAULT (basertpdepayload_debug)
 
@@ -62,7 +71,7 @@ enum
 enum
 {
   PROP_0,
-  PROP_QUEUE_DELAY,
+  PROP_QUEUE_DELAY
 };
 
 static void gst_base_rtp_depayload_finalize (GObject * object);
@@ -617,6 +626,7 @@ gst_base_rtp_depayload_start_thread (GstBaseRTPDepayload * filter)
   /* only launch the thread if processing is needed */
   if (filter->queue_delay) {
     GST_DEBUG_OBJECT (filter, "Starting queue release thread");
+    QUEUE_LOCK_INIT (filter);
     filter->thread_running = TRUE;
     filter->thread =
         g_thread_create ((GThreadFunc) gst_base_rtp_depayload_thread, filter,
index 6b35c95..dd561a9 100644 (file)
@@ -25,7 +25,6 @@
 
 G_BEGIN_DECLS
 
-/* #define's don't like whitespacey bits */
 #define GST_TYPE_BASE_RTP_DEPAYLOAD (gst_base_rtp_depayload_get_type())
 #define GST_BASE_RTP_DEPAYLOAD(obj) \
   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_RTP_DEPAYLOAD,GstBaseRTPDepayload))
@@ -41,10 +40,14 @@ G_BEGIN_DECLS
 #define GST_BASE_RTP_DEPAYLOAD_SINKPAD(depayload) (GST_BASE_RTP_DEPAYLOAD (depayload)->sinkpad)
 #define GST_BASE_RTP_DEPAYLOAD_SRCPAD(depayload)  (GST_BASE_RTP_DEPAYLOAD (depayload)->srcpad)
 
+#ifndef GST_DISABLE_DEPRECATED
+/* this was presumably never meant to be public API, or should at least
+ * have been prefixed if it was. Don't use. (FIXME: remove in 0.11) */
 #define QUEUE_LOCK_INIT(base)   (g_static_rec_mutex_init(&base->queuelock))
 #define QUEUE_LOCK_FREE(base)   (g_static_rec_mutex_free(&base->queuelock))
-#define QUEUE_LOCK(base)                (g_static_rec_mutex_lock(&base->queuelock))
-#define QUEUE_UNLOCK(base)              (g_static_rec_mutex_unlock(&base->queuelock))
+#define QUEUE_LOCK(base)        (g_static_rec_mutex_lock(&base->queuelock))
+#define QUEUE_UNLOCK(base)      (g_static_rec_mutex_unlock(&base->queuelock))
+#endif
 
 typedef struct _GstBaseRTPDepayload      GstBaseRTPDepayload;
 typedef struct _GstBaseRTPDepayloadClass GstBaseRTPDepayloadClass;