Bump version number, we're now 0.9.0
authorWim Taymans <wim.taymans@gmail.com>
Wed, 9 Mar 2005 11:08:18 +0000 (11:08 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Wed, 9 Mar 2005 11:08:18 +0000 (11:08 +0000)
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.

ChangeLog
configure.ac
gst/gst_private.h
gst/gstbin.c
gst/gstelement.h
gst/gstinfo.c
gst/gstobject.h
gst/gstpad.c
gst/gstpad.h

index 1efc2fa..ff081f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2005-03-09  Wim Taymans  <wim@fluendo.com>
+
+       * configure.ac:
+       * gst/gst_private.h:
+       * gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
+       (gst_bin_remove_func), (gst_bin_remove),
+       (gst_bin_get_by_name_recurse_up):
+       * gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
+       (gst_clock_id_compare_func), (gst_clock_id_wait),
+       (gst_clock_id_wait_async), (gst_clock_init),
+       (gst_clock_adjust_unlocked), (gst_clock_get_time):
+       * gst/gstelement.h:
+       * gst/gstinfo.c: (_gst_debug_init):
+       * gst/gstobject.h:
+       * gst/gstpad.c: (_gst_pad_default_fixate_foreach),
+       (gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
+       * gst/gstpad.h:
+       Bump version number, we're now 0.9.0
+       Add future debugging category.
+       Fix NULL _unref() in _get_by_name_recurse_up
+       Rearrange gstpad.h.
+       Update some docs.
+
 2005-03-08  Wim Taymans  <wim@fluendo.com>
 
        * gst/elements/gstaggregator.c: (gst_aggregator_class_init):
index 4e17be1..c19851a 100644 (file)
@@ -3,7 +3,7 @@ AC_CANONICAL_TARGET
 
 dnl when going to/from release please set the nano (fourth number) right !
 dnl releases only do Wall, cvs and prerelease does Werror too
-AS_VERSION(gstreamer, GST_VERSION, 0, 8, 90, 1, GST_CVS="no", GST_CVS="yes")
+AS_VERSION(gstreamer, GST_VERSION, 0, 9, 0, 1, GST_CVS="no", GST_CVS="yes")
 
 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
 AM_MAINTAINER_MODE
index 0d17db6..c1facbd 100644 (file)
@@ -69,6 +69,7 @@ extern GstDebugCategory *GST_CAT_NEGOTIATION;
 extern GstDebugCategory *GST_CAT_REFCOUNTING;
 extern GstDebugCategory *GST_CAT_ERROR_SYSTEM;
 extern GstDebugCategory *GST_CAT_EVENT;
+extern GstDebugCategory *GST_CAT_MESSAGE;
 extern GstDebugCategory *GST_CAT_PARAMS;
 extern GstDebugCategory *GST_CAT_CALL_TRACE;
 extern GstDebugCategory *GST_CAT_SIGNAL;
@@ -101,6 +102,7 @@ extern GstDebugCategory *GST_CAT_PROBE;
 #define GST_CAT_REFCOUNTING      NULL
 #define GST_CAT_ERROR_SYSTEM     NULL
 #define GST_CAT_EVENT            NULL
+#define GST_CAT_MESSAGE          NULL
 #define GST_CAT_PARAMS           NULL
 #define GST_CAT_CALL_TRACE       NULL
 #define GST_CAT_SIGNAL           NULL
index 9bd3301..80ab73d 100644 (file)
@@ -1114,11 +1114,12 @@ gst_bin_get_by_name_recurse_up (GstBin * bin, const gchar * name)
     GstObject *parent;
 
     parent = gst_object_get_parent (GST_OBJECT_CAST (bin));
-
-    if (parent && GST_IS_BIN (parent)) {
-      result = gst_bin_get_by_name_recurse_up (GST_BIN_CAST (parent), name);
+    if (parent) {
+      if (GST_IS_BIN (parent)) {
+        result = gst_bin_get_by_name_recurse_up (GST_BIN_CAST (parent), name);
+      }
+      gst_object_unref (parent);
     }
-    gst_object_unref (parent);
   }
 
   return result;
index be09bb0..464b831 100644 (file)
@@ -87,7 +87,6 @@ GST_EXPORT GType _gst_element_type;
 #define GST_ELEMENT_CAST(obj)          ((GstElement*)(obj))
 
 /* convenience functions */
-#ifndef GST_DISABLE_DEPRECATED
 #ifdef G_HAVE_ISO_VARARGS
 #define GST_ELEMENT_QUERY_TYPE_FUNCTION(functionname, ...) \
        GST_QUERY_TYPE_FUNCTION (GstElement*, functionname, __VA_ARGS__);
@@ -103,7 +102,6 @@ GST_EXPORT GType _gst_element_type;
 #define GST_ELEMENT_EVENT_MASK_FUNCTION(functionname, a...) \
        GST_EVENT_MASK_FUNCTION (GstElement*, functionname, a);
 #endif
-#endif
 
 typedef enum
 {
@@ -135,6 +133,7 @@ typedef enum
 #define GST_ELEMENT_IS_THREAD_SUGGESTED(obj)   (GST_FLAG_IS_SET(obj,GST_ELEMENT_THREAD_SUGGESTED))
 #define GST_ELEMENT_IS_EVENT_AWARE(obj)                (GST_FLAG_IS_SET(obj,GST_ELEMENT_EVENT_AWARE))
 #define GST_ELEMENT_IS_DECOUPLED(obj)          (GST_FLAG_IS_SET(obj,GST_ELEMENT_DECOUPLED))
+#define GST_ELEMENT_IS_LOCKED_STATE(obj)        (GST_FLAG_IS_SET(obj,GST_ELEMENT_LOCKED_STATE))
 
 #define GST_ELEMENT_NAME(obj)                  (GST_OBJECT_NAME(obj))
 #define GST_ELEMENT_PARENT(obj)                        (GST_OBJECT_PARENT(obj))
index 4d95390..c693d5c 100644 (file)
@@ -156,6 +156,7 @@ GstDebugCategory *GST_CAT_NEGOTIATION = NULL;
 GstDebugCategory *GST_CAT_REFCOUNTING = NULL;
 GstDebugCategory *GST_CAT_ERROR_SYSTEM = NULL;
 GstDebugCategory *GST_CAT_EVENT = NULL;
+GstDebugCategory *GST_CAT_MESSAGE = NULL;
 GstDebugCategory *GST_CAT_PARAMS = NULL;
 GstDebugCategory *GST_CAT_CALL_TRACE = NULL;
 GstDebugCategory *GST_CAT_SEEK = NULL;
@@ -283,6 +284,8 @@ _gst_debug_init (void)
 
   GST_CAT_EVENT = _gst_debug_category_new ("GST_EVENT",
       GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE, NULL);
+  GST_CAT_MESSAGE = _gst_debug_category_new ("GST_MESSAGE",
+      GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL);
   GST_CAT_PARAMS = _gst_debug_category_new ("GST_PARAMS",
       GST_DEBUG_BOLD | GST_DEBUG_FG_BLACK | GST_DEBUG_BG_YELLOW, NULL);
   GST_CAT_CALL_TRACE = _gst_debug_category_new ("GST_CALL_TRACE",
index 034a02e..f0e2364 100644 (file)
@@ -132,9 +132,9 @@ GType               gst_object_get_type             (void);
 
 /* name routines */
 gboolean       gst_object_set_name             (GstObject *object, const gchar *name);
-gchar*                 gst_object_get_name             (GstObject *object);
-void            gst_object_set_name_prefix      (GstObject *object, const gchar *name_prefix);
-gchar*          gst_object_get_name_prefix      (GstObject *object);
+gchar*         gst_object_get_name             (GstObject *object);
+void           gst_object_set_name_prefix      (GstObject *object, const gchar *name_prefix);
+gchar*         gst_object_get_name_prefix      (GstObject *object);
 
 /* parentage routines */
 gboolean       gst_object_set_parent           (GstObject *object, GstObject *parent);
@@ -142,7 +142,7 @@ GstObject*  gst_object_get_parent           (GstObject *object);
 void           gst_object_unparent             (GstObject *object);
 
 void            gst_object_default_deep_notify         (GObject *object, GstObject *orig, 
-                                                GParamSpec *pspec, gchar **excluded_props);
+                                                 GParamSpec *pspec, gchar **excluded_props);
 
 /* refcounting + life cycle */
 GstObject *    gst_object_ref                  (GstObject *object);
index c247a9b..bdd26f0 100644 (file)
@@ -965,14 +965,14 @@ gst_pad_set_fixate_function (GstPad * pad, GstPadFixateFunction fixate)
  * but this is discouraged.
  *
  * You do not need to call this function if @pad's allowed caps are always the
- * same as the pad template caps.
+ * same as the pad template caps. This can only be true if the padtemplate 
+ * has fixed simple caps.
  *
  * For most filters, the caps returned by @getcaps is directly affected by the
  * allowed caps on other pads. For demuxers and decoders, the caps returned by
  * the srcpad's getcaps function is directly related to the stream data. Again,
  * @getcaps should return the most specific caps it reasonably can, since this
- * helps with autoplugging. However, the returned caps should not depend on the
- * stream type currently negotiated for @pad.
+ * helps with autoplugging. 
  *
  * Note that the return value from @getcaps is owned by the caller.
  */
@@ -1972,22 +1972,6 @@ gst_pad_remove_ghost_pad (GstPad * pad, GstPad * ghostpad)
   GST_GPAD_REALPAD (ghostpad) = NULL;
 }
 
-/**
- * gst_pad_get_ghost_pad_list:
- * @pad: a #GstPad to get the ghost pads of.
- *
- * Gets the ghost pads of this pad.
- *
- * Returns: a #GList of ghost pads.
- */
-GList *
-gst_pad_get_ghost_pad_list (GstPad * pad)
-{
-  g_return_val_if_fail (GST_IS_PAD (pad), NULL);
-
-  return GST_PAD_REALIZE (pad)->ghostpads;
-}
-
 static gboolean
 _gst_pad_default_fixate_value (const GValue * value, GValue * dest)
 {
@@ -4227,7 +4211,7 @@ gst_pad_query (GstPad * pad, GstQueryType type,
   g_return_val_if_fail (rpad, FALSE);
 
   if (GST_RPAD_QUERYFUNC (rpad))
-    return GST_RPAD_QUERYFUNC (rpad) (GST_PAD (rpad), type, format, value);
+    return GST_RPAD_QUERYFUNC (rpad) (GST_PAD_CAST (rpad), type, format, value);
 
   return FALSE;
 }
index edd273f..7ccf5f8 100644 (file)
@@ -134,6 +134,8 @@ typedef gboolean            (*GstPadActivateFunction)       (GstPad *pad, GstActivateMode mode)
 typedef void                   (*GstPadChainFunction)          (GstPad *pad,GstData *data);
 typedef GstData*               (*GstPadGetFunction)            (GstPad *pad);
 typedef gboolean               (*GstPadEventFunction)          (GstPad *pad, GstEvent *event);
+
+/* convert/query/format functions */
 typedef gboolean               (*GstPadConvertFunction)        (GstPad *pad,
                                                                 GstFormat src_format,  gint64  src_value,
                                                                 GstFormat *dest_format, gint64 *dest_value);
@@ -144,12 +146,16 @@ typedef const GstFormat*  (*GstPadFormatsFunction)        (GstPad *pad);
 typedef const GstEventMask*    (*GstPadEventMaskFunction)      (GstPad *pad);
 typedef const GstQueryType*    (*GstPadQueryTypeFunction)      (GstPad *pad);
 
+/* linking */
 typedef GstPadLinkReturn       (*GstPadLinkFunction)           (GstPad *pad, const GstCaps *caps);
 typedef void                   (*GstPadUnlinkFunction)         (GstPad *pad);
+
+/* caps nego */
 typedef GstCaps*               (*GstPadGetCapsFunction)        (GstPad *pad);
 typedef GstCaps*               (*GstPadFixateFunction)         (GstPad *pad, const GstCaps *caps);
 typedef GstBuffer*             (*GstPadBufferAllocFunction)    (GstPad *pad, guint64 offset, guint size);
 
+/* misc */
 typedef gboolean               (*GstPadDispatcherFunction)     (GstPad *pad, gpointer data);
 
 typedef enum {
@@ -163,7 +169,7 @@ typedef enum {
   GST_PAD_NEGOTIATING,
   GST_PAD_DISPATCHING,
 
-  GST_PAD_FLAG_LAST            = GST_OBJECT_FLAG_LAST + 4
+  GST_PAD_FLAG_LAST            = GST_OBJECT_FLAG_LAST + 8
 } GstPadFlags;
 
 struct _GstPad {
@@ -191,15 +197,17 @@ typedef enum {
 struct _GstRealPad {
   GstPad                        pad;
 
+  /* direction cannot change after creating the pad */
+  GstPadDirection               direction;
+
   /* the pad capabilities */
   GstCaps                      *caps;
-  GstPadFixateFunction          appfixatefunc;
   GstCaps                      *appfilter;
   GstPadGetCapsFunction                getcapsfunc;
+  GstPadFixateFunction          appfixatefunc;
   GstPadFixateFunction          fixatefunc;
 
-  GstPadDirection               direction;
-
+  /* pad link */
   GstPadLinkFunction            linkfunc;
   GstPadUnlinkFunction          unlinkfunc;
   GstRealPad                   *peer;
@@ -213,6 +221,7 @@ struct _GstRealPad {
   GstPadGetFunction             gethandler;
   GstPadEventFunction           eventfunc;
   GstPadEventFunction           eventhandler;
+
   GstPadEventMaskFunction       eventmaskfunc;
 
   /* ghostpads */
@@ -226,13 +235,14 @@ struct _GstRealPad {
   GstPadQueryTypeFunction       querytypefunc;
   GstPadIntLinkFunction                 intlinkfunc;
 
-  GstPadBufferAllocFunction        bufferallocfunc;
+  GstPadBufferAllocFunction      bufferallocfunc;
 
   GstProbeDispatcher            probedisp;
 
   GstPadLink                    *link;
   GstCaps                      *explicit_caps;
 
+  /*< private >*/
   gpointer _gst_reserved[GST_PADDING];
 };
 
@@ -240,12 +250,13 @@ struct _GstRealPadClass {
   GstPadClass  parent_class;
 
   /* signal callbacks */
-  void         (*caps_nego_failed)     (GstPad *pad, GstCaps *caps);
-
   void         (*linked)               (GstPad *pad, GstPad *peer);
   void         (*unlinked)             (GstPad *pad, GstPad *peer);
   GstPadFixateFunction          appfixatefunc;
 
+  void         (*caps_nego_failed)     (GstPad *pad, GstCaps *caps);
+
+  /*< private >*/
   gpointer _gst_reserved[GST_PADDING];
 };
 
@@ -267,35 +278,44 @@ struct _GstGhostPadClass {
 /***** helper macros *****/
 /* GstPad */
 #define GST_PAD_NAME(pad)              (GST_OBJECT_NAME(pad))
-#define GST_PAD_PARENT(pad)            ((GstElement *)(GST_OBJECT_PARENT(pad)))
-#define GST_PAD_ELEMENT_PRIVATE(pad)   (((GstPad *)(pad))->element_private)
-#define GST_PAD_PAD_TEMPLATE(pad)      (((GstPad *)(pad))->padtemplate)
+#define GST_PAD_PARENT(pad)            (GST_ELEMENT_CAST(GST_OBJECT_PARENT(pad)))
+#define GST_PAD_ELEMENT_PRIVATE(pad)   (GST_PAD_CAST(pad)->element_private)
+#define GST_PAD_PAD_TEMPLATE(pad)      (GST_PAD_CAST(pad)->padtemplate)
 
 /* GstRealPad */
-#define GST_RPAD_DIRECTION(pad)                (((GstRealPad *)(pad))->direction)
-#define GST_RPAD_CAPS(pad)             (((GstRealPad *)(pad))->caps)
-#define GST_RPAD_APPFILTER(pad)                (((GstRealPad *)(pad))->appfilter)
-#define GST_RPAD_PEER(pad)             (((GstRealPad *)(pad))->peer)
-#define GST_RPAD_CHAINFUNC(pad)                (((GstRealPad *)(pad))->chainfunc)
-#define GST_RPAD_CHAINHANDLER(pad)     (((GstRealPad *)(pad))->chainhandler)
-#define GST_RPAD_GETFUNC(pad)          (((GstRealPad *)(pad))->getfunc)
-#define GST_RPAD_GETHANDLER(pad)       (((GstRealPad *)(pad))->gethandler)
-#define GST_RPAD_EVENTFUNC(pad)                (((GstRealPad *)(pad))->eventfunc)
-#define GST_RPAD_EVENTHANDLER(pad)     (((GstRealPad *)(pad))->eventhandler)
-#define GST_RPAD_CONVERTFUNC(pad)      (((GstRealPad *)(pad))->convertfunc)
-#define GST_RPAD_QUERYFUNC(pad)                (((GstRealPad *)(pad))->queryfunc)
-#define GST_RPAD_INTLINKFUNC(pad)      (((GstRealPad *)(pad))->intlinkfunc)
-#define GST_RPAD_FORMATSFUNC(pad)      (((GstRealPad *)(pad))->formatsfunc)
-#define GST_RPAD_QUERYTYPEFUNC(pad)    (((GstRealPad *)(pad))->querytypefunc)
-#define GST_RPAD_EVENTMASKFUNC(pad)    (((GstRealPad *)(pad))->eventmaskfunc)
-
-#define GST_RPAD_LINKFUNC(pad)         (((GstRealPad *)(pad))->linkfunc)
-#define GST_RPAD_UNLINKFUNC(pad)       (((GstRealPad *)(pad))->unlinkfunc)
-#define GST_RPAD_GETCAPSFUNC(pad)      (((GstRealPad *)(pad))->getcapsfunc)
-#define GST_RPAD_FIXATEFUNC(pad)       (((GstRealPad *)(pad))->fixatefunc)
-#define GST_RPAD_BUFFERALLOCFUNC(pad)  (((GstRealPad *)(pad))->bufferallocfunc)
-#define GST_RPAD_LINK(pad)             (((GstRealPad *)(pad))->link)
-#define GST_RPAD_EXPLICIT_CAPS(pad)    (((GstRealPad *)(pad))->explicit_caps)
+#define GST_RPAD_DIRECTION(pad)                (GST_REAL_PAD_CAST(pad)->direction)
+#define GST_RPAD_CHAINFUNC(pad)                (GST_REAL_PAD_CAST(pad)->chainfunc)
+#define GST_RPAD_CHAINHANDLER(pad)     (GST_REAL_PAD_CAST(pad)->chainhandler)
+#define GST_RPAD_GETFUNC(pad)          (GST_REAL_PAD_CAST(pad)->getfunc)
+#define GST_RPAD_GETHANDLER(pad)       (GST_REAL_PAD_CAST(pad)->gethandler)
+#define GST_RPAD_EVENTFUNC(pad)                (GST_REAL_PAD_CAST(pad)->eventfunc)
+#define GST_RPAD_EVENTHANDLER(pad)     (GST_REAL_PAD_CAST(pad)->eventhandler)
+#define GST_RPAD_CONVERTFUNC(pad)      (GST_REAL_PAD_CAST(pad)->convertfunc)
+#define GST_RPAD_QUERYFUNC(pad)                (GST_REAL_PAD_CAST(pad)->queryfunc)
+#define GST_RPAD_INTLINKFUNC(pad)      (GST_REAL_PAD_CAST(pad)->intlinkfunc)
+#define GST_RPAD_FORMATSFUNC(pad)      (GST_REAL_PAD_CAST(pad)->formatsfunc)
+#define GST_RPAD_QUERYTYPEFUNC(pad)    (GST_REAL_PAD_CAST(pad)->querytypefunc)
+#define GST_RPAD_EVENTMASKFUNC(pad)    (GST_REAL_PAD_CAST(pad)->eventmaskfunc)
+
+#define GST_RPAD_PEER(pad)             (GST_REAL_PAD_CAST(pad)->peer)
+#define GST_RPAD_LINKFUNC(pad)         (GST_REAL_PAD_CAST(pad)->linkfunc)
+#define GST_RPAD_UNLINKFUNC(pad)       (GST_REAL_PAD_CAST(pad)->unlinkfunc)
+
+#define GST_RPAD_CAPS(pad)             (GST_REAL_PAD_CAST(pad)->caps)
+#define GST_RPAD_APPFILTER(pad)                (GST_REAL_PAD_CAST(pad)->appfilter)
+#define GST_RPAD_GETCAPSFUNC(pad)      (GST_REAL_PAD_CAST(pad)->getcapsfunc)
+#define GST_RPAD_FIXATEFUNC(pad)       (GST_REAL_PAD_CAST(pad)->fixatefunc)
+#define GST_RPAD_LINK(pad)             (GST_REAL_PAD_CAST(pad)->link)
+#define GST_RPAD_EXPLICIT_CAPS(pad)    (GST_REAL_PAD_CAST(pad)->explicit_caps)
+
+#define GST_RPAD_BUFFERALLOCFUNC(pad)  (GST_REAL_PAD_CAST(pad)->bufferallocfunc)
+
+#define GST_RPAD_IS_LINKED(pad)                (GST_RPAD_PEER(pad) != NULL)
+#define GST_RPAD_IS_ACTIVE(pad)                (GST_FLAG_IS_SET (pad, GST_PAD_ACTIVE))
+#define GST_RPAD_IS_USABLE(pad)                (GST_RPAD_IS_LINKED (pad) && \
+                                        GST_RPAD_IS_ACTIVE(pad) && GST_RPAD_IS_ACTIVE(GST_RPAD_PEER (pad)))
+#define GST_RPAD_IS_SRC(pad)           (GST_RPAD_DIRECTION(pad) == GST_PAD_SRC)
+#define GST_RPAD_IS_SINK(pad)          (GST_RPAD_DIRECTION(pad) == GST_PAD_SINK)
 
 /* GstGhostPad */
 #define GST_GPAD_REALPAD(pad)          (((GstGhostPad *)(pad))->realpad)
@@ -304,18 +324,17 @@ struct _GstGhostPadClass {
 #define GST_PAD_REALIZE(pad)           (GST_IS_REAL_PAD(pad) ? ((GstRealPad *)(pad)) : GST_GPAD_REALPAD(pad))
 #define GST_PAD_DIRECTION(pad)         GST_RPAD_DIRECTION(GST_PAD_REALIZE(pad))
 #define GST_PAD_CAPS(pad)              (gst_pad_get_negotiated_caps(GST_PAD (pad)))
-#define GST_PAD_PEER(pad)              GST_PAD(GST_RPAD_PEER(GST_PAD_REALIZE(pad)))
+#define GST_PAD_PEER(pad)              GST_PAD_CAST(GST_RPAD_PEER(GST_PAD_REALIZE(pad)))
 
 /* Some check functions (unused?) */
-#define GST_PAD_IS_LINKED(pad)         (GST_PAD_PEER(pad) != NULL)
-#define GST_PAD_IS_ACTIVE(pad)         (GST_FLAG_IS_SET(GST_PAD_REALIZE(pad), GST_PAD_ACTIVE))
+#define GST_PAD_IS_LINKED(pad)         (GST_RPAD_IS_LINKED(GST_PAD_REALIZE(pad)))
+#define GST_PAD_IS_ACTIVE(pad)         (GST_RPAD_IS_ACTIVE(GST_PAD_REALIZE(pad)))
 #define GST_PAD_IS_NEGOTIATING(pad)    (GST_FLAG_IS_SET (pad, GST_PAD_NEGOTIATING))
 #define GST_PAD_IS_DISPATCHING(pad)    (GST_FLAG_IS_SET (pad, GST_PAD_DISPATCHING))
-#define GST_PAD_IS_USABLE(pad)         (GST_PAD_IS_LINKED (pad) && \
-                                        GST_PAD_IS_ACTIVE(pad) && GST_PAD_IS_ACTIVE(GST_PAD_PEER (pad)))
+#define GST_PAD_IS_USABLE(pad)         (GST_RPAD_IS_USABLE(GST_PAD_REALIZE(pad)))
 #define GST_PAD_CAN_PULL(pad)          (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->gethandler != NULL)
-#define GST_PAD_IS_SRC(pad)            (GST_PAD_DIRECTION(pad) == GST_PAD_SRC)
-#define GST_PAD_IS_SINK(pad)           (GST_PAD_DIRECTION(pad) == GST_PAD_SINK)
+#define GST_PAD_IS_SRC(pad)            (GST_RPAD_IS_SRC(GST_PAD_REALIZE(pad)))
+#define GST_PAD_IS_SINK(pad)           (GST_RPAD_IS_SINK(GST_PAD_REALIZE(pad)))
 
 /***** PadTemplate *****/
 #define GST_TYPE_PAD_TEMPLATE          (gst_pad_template_get_type ())
@@ -406,8 +425,6 @@ gpointer            gst_pad_get_element_private             (GstPad *pad);
 
 GstScheduler*          gst_pad_get_scheduler                   (GstPad *pad);
 
-GList*                 gst_pad_get_ghost_pad_list              (GstPad *pad);
-
 GstPadTemplate*                gst_pad_get_pad_template                (GstPad *pad);
 
 void                   gst_pad_set_bufferalloc_function                (GstPad *pad, GstPadBufferAllocFunction bufalloc);
@@ -438,15 +455,6 @@ GstPad*                    gst_pad_get_peer                        (GstPad *pad);
 GstPad*                        gst_pad_realize                         (GstPad *pad);
 
 /* capsnego functions */
-G_CONST_RETURN GstCaps*        gst_pad_get_negotiated_caps             (GstPad *pad);
-gboolean               gst_pad_is_negotiated                   (GstPad *pad);
-GstCaps*               gst_pad_get_caps                        (GstPad *pad);
-gboolean               gst_pad_set_caps                        (GstPad *pad, GstCaps *caps);
-G_CONST_RETURN GstCaps*        gst_pad_get_pad_template_caps           (GstPad *pad);
-GstPadLinkReturn       gst_pad_try_set_caps                    (GstPad *pad, const GstCaps *caps);
-GstPadLinkReturn       gst_pad_try_set_caps_nonfixed           (GstPad *pad, const GstCaps *caps);
-gboolean               gst_pad_check_compatibility             (GstPad *srcpad, GstPad *sinkpad);
-
 void                   gst_pad_set_getcaps_function            (GstPad *pad, GstPadGetCapsFunction getcaps);
 void                   gst_pad_set_fixate_function             (GstPad *pad, GstPadFixateFunction fixate);
 GstCaps *              gst_pad_proxy_getcaps                   (GstPad *pad);
@@ -457,13 +465,26 @@ gboolean          gst_pad_relink_filtered                 (GstPad *srcpad, GstPad *sinkpad, const GstC
 GstPadLinkReturn       gst_pad_renegotiate                     (GstPad *pad);
 void                   gst_pad_unnegotiate                     (GstPad *pad);
 gboolean               gst_pad_try_relink_filtered             (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
-GstCaps*               gst_pad_get_allowed_caps                (GstPad *pad);
 void                    gst_pad_caps_change_notify              (GstPad *pad);
 
 gboolean               gst_pad_recover_caps_error              (GstPad *pad, const GstCaps *allowed);
 
+G_CONST_RETURN GstCaps*        gst_pad_get_pad_template_caps           (GstPad *pad);
+
+/* capsnego function for connected/unconnected pads */
+GstCaps*               gst_pad_get_caps                        (GstPad *pad);
+gboolean               gst_pad_set_caps                        (GstPad *pad, GstCaps *caps);
+GstPadLinkReturn       gst_pad_try_set_caps                    (GstPad *pad, const GstCaps *caps);
+GstPadLinkReturn       gst_pad_try_set_caps_nonfixed           (GstPad *pad, const GstCaps *caps);
+gboolean               gst_pad_check_compatibility             (GstPad *srcpad, GstPad *sinkpad);
+
 GstCaps *              gst_pad_peer_get_caps                   (GstPad * pad);
 
+/* capsnego for connected pads */
+GstCaps*               gst_pad_get_allowed_caps                (GstPad *pad);
+G_CONST_RETURN GstCaps*        gst_pad_get_negotiated_caps             (GstPad *pad);
+gboolean               gst_pad_is_negotiated                   (GstPad *pad);
+
 
 /* data passing functions */
 void                   gst_pad_push                            (GstPad *pad, GstData *data);