pad: remove GstPadFixateCapsFunction
[platform/upstream/gstreamer.git] / gst / gstpad.h
index 93fef63..9fcc91b 100644 (file)
@@ -114,7 +114,7 @@ typedef enum {
  * @GST_FLOW_OK:                Data passing was ok.
  * @GST_FLOW_NOT_LINKED:        Pad is not linked.
  * @GST_FLOW_WRONG_STATE:       Pad is in wrong state.
- * @GST_FLOW_UNEXPECTED:        Did not expect anything, like after EOS.
+ * @GST_FLOW_EOS:                Pad is EOS.
  * @GST_FLOW_NOT_NEGOTIATED:    Pad is not negotiated.
  * @GST_FLOW_ERROR:             Some (fatal) error occured. Element generating
  *                               this error should post an error message with more
@@ -154,7 +154,7 @@ typedef enum {
   GST_FLOW_NOT_LINKED     = -1,
   GST_FLOW_WRONG_STATE    = -2,
   /* error cases */
-  GST_FLOW_UNEXPECTED     = -3,
+  GST_FLOW_EOS            = -3,
   GST_FLOW_NOT_NEGOTIATED = -4,
   GST_FLOW_ERROR         = -5,
   GST_FLOW_NOT_SUPPORTED  = -6,
@@ -165,7 +165,7 @@ typedef enum {
   GST_FLOW_CUSTOM_ERROR_2 = -102
 } GstFlowReturn;
 
-G_CONST_RETURN gchar*  gst_flow_get_name       (GstFlowReturn ret);
+const gchar*           gst_flow_get_name       (GstFlowReturn ret);
 GQuark                 gst_flow_to_quark       (GstFlowReturn ret);
 
 /**
@@ -209,32 +209,23 @@ typedef enum {
  *
  * Since: 0.10.30
  */
-#define GST_PAD_LINK_CHECK_DEFAULT (GST_PAD_LINK_CHECK_HIERARCHY | GST_PAD_LINK_CHECK_CAPS)
+#define GST_PAD_LINK_CHECK_DEFAULT ((GstPadLinkCheck) (GST_PAD_LINK_CHECK_HIERARCHY | GST_PAD_LINK_CHECK_CAPS))
 
 /**
- * GstActivateMode:
- * @GST_ACTIVATE_NONE:          Pad will not handle dataflow
- * @GST_ACTIVATE_PUSH:          Pad handles dataflow in downstream push mode
- * @GST_ACTIVATE_PULL:          Pad handles dataflow in upstream pull mode
+ * GstPadActivateMode:
+ * @GST_PAD_ACTIVATE_NONE: Pad will not handle dataflow
+ * @GST_PAD_ACTIVATE_PUSH: Pad handles dataflow in downstream push mode
+ * @GST_PAD_ACTIVATE_PULL: Pad handles dataflow in upstream pull mode
  *
  * The status of a GstPad. After activating a pad, which usually happens when the
- * parent element goes from READY to PAUSED, the GstActivateMode defines if the
+ * parent element goes from READY to PAUSED, the GstPadActivateMode defines if the
  * pad operates in push or pull mode.
  */
 typedef enum {
-  GST_ACTIVATE_NONE,
-  GST_ACTIVATE_PUSH,
-  GST_ACTIVATE_PULL
-} GstActivateMode;
-
-/**
- * GST_PAD_MODE_ACTIVATE:
- * @mode: a #GstActivateMode
- *
- * Macro to test if the given #GstActivateMode value indicates that datapassing
- * is possible or not.
- */
-#define GST_PAD_MODE_ACTIVATE(mode) ((mode) != GST_ACTIVATE_NONE)
+  GST_PAD_ACTIVATE_NONE,
+  GST_PAD_ACTIVATE_PUSH,
+  GST_PAD_ACTIVATE_PULL
+} GstPadActivateMode;
 
 /* pad states */
 /**
@@ -376,16 +367,6 @@ typedef GstIterator*           (*GstPadIterIntLinkFunction)    (GstPad *pad);
 
 /* generic query function */
 /**
- * GstPadQueryTypeFunction:
- * @pad: a #GstPad to query
- *
- * The signature of the query types function.
- *
- * Returns: a constant array of query types
- */
-typedef const GstQueryType*    (*GstPadQueryTypeFunction)      (GstPad *pad);
-
-/**
  * GstPadQueryFunction:
  * @pad: the #GstPad to query.
  * @query: the #GstQuery object to execute
@@ -437,42 +418,6 @@ typedef void                       (*GstPadUnlinkFunction)         (GstPad *pad);
  */
 typedef GstCaps*               (*GstPadGetCapsFunction)        (GstPad *pad, GstCaps *filter);
 
-/**
- * GstPadSetCapsFunction:
- * @pad: the #GstPad to set the capabilities of.
- * @caps: the #GstCaps to set
- *
- * Set @caps on @pad. By default this function updates the caps of the
- * pad but the function can be overriden by elements to perform extra
- * actions or verifications.
- *
- * Returns: TRUE if the caps could be set on the pad.
- */
-typedef gboolean               (*GstPadSetCapsFunction)        (GstPad *pad, GstCaps *caps);
-/**
- * GstPadAcceptCapsFunction:
- * @pad: the #GstPad to check
- * @caps: the #GstCaps to check
- *
- * Check if @pad can accept @caps. By default this function will see if @caps
- * intersect with the result from gst_pad_get_caps() by can be overridden to
- * perform extra checks.
- *
- * Returns: TRUE if the caps can be accepted by the pad.
- */
-typedef gboolean               (*GstPadAcceptCapsFunction)     (GstPad *pad, GstCaps *caps);
-/**
- * GstPadFixateCapsFunction:
- * @pad: a #GstPad
- * @caps: the #GstCaps to fixate
- *
- * Given possibly unfixed caps @caps, let @pad use its default prefered
- * format to make a fixed caps. @caps should be writable. By default this
- * function will pick the first value of any ranges or lists in the caps but
- * elements can override this function to perform other behaviour.
- */
-typedef void                   (*GstPadFixateCapsFunction)     (GstPad *pad, GstCaps *caps);
-
 /* misc */
 /**
  * GstPadForwardFunction:
@@ -487,70 +432,120 @@ typedef void                     (*GstPadFixateCapsFunction)     (GstPad *pad, GstCaps *caps);
 typedef gboolean               (*GstPadForwardFunction)        (GstPad *pad, gpointer user_data);
 
 /**
- * GstProbeType:
- * @GST_PROBE_TYPE_INVALID: invalid probe type
- * @GST_PROBE_TYPE_IDLE: probe idle pads and block
- * @GST_PROBE_TYPE_BLOCK: probe and block pads
- * @GST_PROBE_TYPE_BUFFER: probe buffers
- * @GST_PROBE_TYPE_BUFFER_LIST: probe buffer lists
- * @GST_PROBE_TYPE_EVENT: probe events
- * @GST_PROBE_TYPE_PUSH: probe push
- * @GST_PROBE_TYPE_PULL: probe pull
+ * GstPadProbeType:
+ * @GST_PAD_PROBE_TYPE_INVALID: invalid probe type
+ * @GST_PAD_PROBE_TYPE_IDLE: probe idle pads and block
+ * @GST_PAD_PROBE_TYPE_BLOCK: probe and block pads
+ * @GST_PAD_PROBE_TYPE_BUFFER: probe buffers
+ * @GST_PAD_PROBE_TYPE_BUFFER_LIST: probe buffer lists
+ * @GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM: probe downstream events
+ * @GST_PAD_PROBE_TYPE_EVENT_UPSTREAM: probe upstream events
+ * @GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM: probe downstream queries
+ * @GST_PAD_PROBE_TYPE_QUERY_UPSTREAM: probe upstream queries
+ * @GST_PAD_PROBE_TYPE_PUSH: probe push
+ * @GST_PAD_PROBE_TYPE_PULL: probe pull
  *
  * The different probing types that can occur. When either one of
- * @GST_PROBE_TYPE_IDLE or @GST_PROBE_TYPE_BLOCK is used, the probe will be a
+ * @GST_PAD_PROBE_TYPE_IDLE or @GST_PAD_PROBE_TYPE_BLOCK is used, the probe will be a
  * blocking probe.
  */
 typedef enum
 {
-  GST_PROBE_TYPE_INVALID      = 0,
+  GST_PAD_PROBE_TYPE_INVALID          = 0,
   /* flags to control blocking */
-  GST_PROBE_TYPE_IDLE         = (1 << 0),
-  GST_PROBE_TYPE_BLOCK        = (1 << 1),
+  GST_PAD_PROBE_TYPE_IDLE             = (1 << 0),
+  GST_PAD_PROBE_TYPE_BLOCK            = (1 << 1),
   /* flags to select datatypes */
-  GST_PROBE_TYPE_BUFFER       = (1 << 2),
-  GST_PROBE_TYPE_BUFFER_LIST  = (1 << 3),
-  GST_PROBE_TYPE_EVENT        = (1 << 4),
+  GST_PAD_PROBE_TYPE_BUFFER           = (1 << 4),
+  GST_PAD_PROBE_TYPE_BUFFER_LIST      = (1 << 5),
+  GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM = (1 << 6),
+  GST_PAD_PROBE_TYPE_EVENT_UPSTREAM   = (1 << 7),
+  GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM = (1 << 8),
+  GST_PAD_PROBE_TYPE_QUERY_UPSTREAM   = (1 << 9),
   /* flags to select scheduling mode */
-  GST_PROBE_TYPE_PUSH         = (1 << 5),
-  GST_PROBE_TYPE_PULL         = (1 << 6),
-} GstProbeType;
-
-#define GST_PROBE_TYPE_BLOCKING   (GST_PROBE_TYPE_IDLE | GST_PROBE_TYPE_BLOCK)
-#define GST_PROBE_TYPE_DATA       (GST_PROBE_TYPE_BUFFER | GST_PROBE_TYPE_EVENT | \
-                                   GST_PROBE_TYPE_BUFFER_LIST)
-#define GST_PROBE_TYPE_SCHEDULING (GST_PROBE_TYPE_PUSH | GST_PROBE_TYPE_PULL)
-
-/**
- * GstProbeReturn:
- * @GST_PROBE_OK: normal probe return value
- * @GST_PROBE_DROP: drop data in data probes
- * @GST_PROBE_REMOVE: remove probe
- * @GST_PROBE_PASS: pass the data item in the block probe and block on
+  GST_PAD_PROBE_TYPE_PUSH             = (1 << 12),
+  GST_PAD_PROBE_TYPE_PULL             = (1 << 13),
+} GstPadProbeType;
+
+#define GST_PAD_PROBE_TYPE_BLOCKING         (GST_PAD_PROBE_TYPE_IDLE | GST_PAD_PROBE_TYPE_BLOCK)
+#define GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM (GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM)
+#define GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM   (GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_DATA_UPSTREAM)
+#define GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM  (GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_BUFFER_LIST | \
+                                             GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM)
+#define GST_PAD_PROBE_TYPE_DATA_UPSTREAM    (GST_PAD_PROBE_TYPE_EVENT_UPSTREAM)
+#define GST_PAD_PROBE_TYPE_DATA_BOTH        (GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM | \
+                                             GST_PAD_PROBE_TYPE_DATA_UPSTREAM)
+#define GST_PAD_PROBE_TYPE_EVENT_BOTH       (GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | \
+                                             GST_PAD_PROBE_TYPE_EVENT_UPSTREAM)
+#define GST_PAD_PROBE_TYPE_QUERY_BOTH       (GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM | \
+                                             GST_PAD_PROBE_TYPE_QUERY_UPSTREAM)
+#define GST_PAD_PROBE_TYPE_ALL_BOTH         (GST_PAD_PROBE_TYPE_DATA_BOTH | \
+                                             GST_PAD_PROBE_TYPE_QUERY_BOTH)
+#define GST_PAD_PROBE_TYPE_SCHEDULING       (GST_PAD_PROBE_TYPE_PUSH | GST_PAD_PROBE_TYPE_PULL)
+
+/**
+ * GstPadProbeReturn:
+ * @GST_PAD_PROBE_OK: normal probe return value
+ * @GST_PAD_PROBE_DROP: drop data in data probes
+ * @GST_PAD_PROBE_REMOVE: remove probe
+ * @GST_PAD_PROBE_PASS: pass the data item in the block probe and block on
  *                         the next item
  *
  * Different return values for the #GstPadProbeCallback.
  */
 typedef enum
 {
-  GST_PROBE_DROP,
-  GST_PROBE_OK,
-  GST_PROBE_REMOVE,
-  GST_PROBE_PASS,
-} GstProbeReturn;
+  GST_PAD_PROBE_DROP,
+  GST_PAD_PROBE_OK,
+  GST_PAD_PROBE_REMOVE,
+  GST_PAD_PROBE_PASS,
+} GstPadProbeReturn;
+
+
+/**
+ * GstPadProbeInfo:
+ * @type: the current probe type
+ * @data: type specific data, check the @type field to know the datatype.
+ *    This field can be NULL.
+ * @offset: offset of pull probe, this field is valid when @type contains
+ *    #GST_PAD_PROBE_TYPE_PULL
+ * @size: size of pull probe, this field is valid when @type contains
+ *    #GST_PAD_PROBE_TYPE_PULL
+ *
+ * Info passed in the #GstPadProbeCallback.
+ */
+typedef struct
+{
+  GstPadProbeType type;
+  gpointer data;
+  guint64 offset;
+  guint size;
+} GstPadProbeInfo;
+
+#define GST_PAD_PROBE_INFO_TYPE(d)         ((d)->type)
+#define GST_PAD_PROBE_INFO_DATA(d)         ((d)->data)
+
+#define GST_PAD_PROBE_INFO_BUFFER(d)       GST_BUFFER_CAST(GST_PAD_PROBE_INFO_DATA(d))
+#define GST_PAD_PROBE_INFO_BUFFER_LIST(d)  GST_BUFFER_LIST_CAST(GST_PAD_PROBE_INFO_DATA(d))
+#define GST_PAD_PROBE_INFO_EVENT(d)        GST_EVENT_CAST(GST_PAD_PROBE_INFO_DATA(d))
+#define GST_PAD_PROBE_INFO_QUERY(d)        GST_QUERY_CAST(GST_PAD_PROBE_INFO_DATA(d))
+
+#define GST_PAD_PROBE_INFO_OFFSET(d)       ((d)->offset)
+#define GST_PAD_PROBE_INFO_SIZE(d)         ((d)->size)
 
 /**
  * GstPadProbeCallback
  * @pad: the #GstPad that is blocked
- * @type: the current probe type
- * @type_data: type specific data
+ * @info: #GstPadProbeInfo
  * @user_data: the gpointer to optional user data.
  *
  * Callback used by gst_pad_add_probe(). Gets called to notify about the current
  * blocking type.
+ *
+ * The callback is allowed to modify the data pointer in @info.
  */
-typedef GstProbeReturn      (*GstPadProbeCallback)              (GstPad *pad, GstProbeType type,
-                                                                 gpointer type_data, gpointer user_data);
+typedef GstPadProbeReturn   (*GstPadProbeCallback)   (GstPad *pad, GstPadProbeInfo *info,
+                                                      gpointer user_data);
 
 /**
  * GstPadStickyEventsForeachFunction:
@@ -562,14 +557,14 @@ typedef GstProbeReturn      (*GstPadProbeCallback)              (GstPad *pad, Gs
  *
  * Returns: GST_FLOW_OK if the iteration should continue
  */
-typedef GstFlowReturn           (*GstPadStickyEventsForeachFunction) (GstPad *pad, GstEvent *event, gpointer user_data);
+typedef GstFlowReturn       (*GstPadStickyEventsForeachFunction) (GstPad *pad, GstEvent *event,
+                                                                  gpointer user_data);
 
 /**
  * GstPadFlags:
  * @GST_PAD_BLOCKED: is dataflow on a pad blocked
  * @GST_PAD_FLUSHING: is pad refusing buffers
  * @GST_PAD_IN_GETCAPS: GstPadGetCapsFunction() is running now
- * @GST_PAD_IN_SETCAPS: GstPadSetCapsFunction() is running now
  * @GST_PAD_BLOCKING: is pad currently blocking on a buffer or event
  * @GST_PAD_NEED_RECONFIGURE: the pad should be reconfigured/renegotiated.
  *                            The flag has to be unset manually after
@@ -587,7 +582,6 @@ typedef enum {
   GST_PAD_BLOCKED          = (GST_OBJECT_FLAG_LAST << 0),
   GST_PAD_FLUSHING         = (GST_OBJECT_FLAG_LAST << 1),
   GST_PAD_IN_GETCAPS       = (GST_OBJECT_FLAG_LAST << 2),
-  GST_PAD_IN_SETCAPS       = (GST_OBJECT_FLAG_LAST << 3),
   GST_PAD_BLOCKING         = (GST_OBJECT_FLAG_LAST << 4),
   GST_PAD_NEED_RECONFIGURE = (GST_OBJECT_FLAG_LAST << 5),
   GST_PAD_NEED_EVENTS      = (GST_OBJECT_FLAG_LAST << 6),
@@ -606,20 +600,20 @@ typedef enum {
  *                   the data used in streaming.
  * @task: task for this pad if the pad is actively driving dataflow.
  * @block_cond: conditional to signal pad block
+ * @probes: installed probes
  * @getcapsfunc: function to get caps of the pad
- * @setcapsfunc: function to set caps on the pad
- * @acceptcapsfunc: function to check if pad can accept caps
- * @fixatecapsfunc: function to fixate caps
+ * @mode: current activation mode of the pad
  * @activatefunc: pad activation function
  * @activatepushfunc: function to activate/deactivate pad in push mode
  * @activatepullfunc: function to activate/deactivate pad in pull mode
+ * @peer: the pad this pad is linked to
  * @linkfunc: function called when pad is linked
  * @unlinkfunc: function called when pad is unlinked
- * @peer: the pad this pad is linked to
  * @chainfunc: function to chain buffer to pad
+ * @chainlistfunc: function to chain a list of buffers to pad
  * @getrangefunc: function to get a range of data from a pad
  * @eventfunc: function to send an event to a pad
- * @mode: current activation mode of the pad
+ * @offset: the pad offset
  * @querytypefunc: get list of supported queries
  * @queryfunc: perform a query on the pad
  * @iterintlinkfunc: get the internal links iterator of this pad
@@ -648,11 +642,8 @@ struct _GstPad {
 
   /* the pad capabilities */
   GstPadGetCapsFunction                getcapsfunc;
-  GstPadSetCapsFunction                setcapsfunc;
-  GstPadAcceptCapsFunction      acceptcapsfunc;
-  GstPadFixateCapsFunction      fixatecapsfunc;
 
-  GstActivateMode               mode;
+  GstPadActivateMode            mode;
   GstPadActivateFunction        activatefunc;
   GstPadActivateModeFunction    activatepushfunc;
   GstPadActivateModeFunction    activatepullfunc;
@@ -672,17 +663,16 @@ struct _GstPad {
   gint64                         offset;
 
   /* generic query method */
-  GstPadQueryTypeFunction       querytypefunc;
   GstPadQueryFunction           queryfunc;
 
   /* internal links */
   GstPadIterIntLinkFunction      iterintlinkfunc;
 
+  /*< private >*/
   /* counts number of probes attached. */
   gint                          num_probes;
   gint                          num_blocked;
 
-  /*< private >*/
   GstPadPrivate                 *priv;
 
   gpointer _gst_reserved[GST_PADDING];
@@ -717,7 +707,6 @@ struct _GstPadClass {
 #define GST_PAD_CHAINLISTFUNC(pad)      (GST_PAD_CAST(pad)->chainlistfunc)
 #define GST_PAD_GETRANGEFUNC(pad)      (GST_PAD_CAST(pad)->getrangefunc)
 #define GST_PAD_EVENTFUNC(pad)         (GST_PAD_CAST(pad)->eventfunc)
-#define GST_PAD_QUERYTYPEFUNC(pad)     (GST_PAD_CAST(pad)->querytypefunc)
 #define GST_PAD_QUERYFUNC(pad)         (GST_PAD_CAST(pad)->queryfunc)
 #define GST_PAD_ITERINTLINKFUNC(pad)    (GST_PAD_CAST(pad)->iterintlinkfunc)
 
@@ -726,20 +715,18 @@ struct _GstPadClass {
 #define GST_PAD_UNLINKFUNC(pad)                (GST_PAD_CAST(pad)->unlinkfunc)
 
 #define GST_PAD_GETCAPSFUNC(pad)       (GST_PAD_CAST(pad)->getcapsfunc)
-#define GST_PAD_SETCAPSFUNC(pad)       (GST_PAD_CAST(pad)->setcapsfunc)
-#define GST_PAD_ACCEPTCAPSFUNC(pad)    (GST_PAD_CAST(pad)->acceptcapsfunc)
-#define GST_PAD_FIXATECAPSFUNC(pad)    (GST_PAD_CAST(pad)->fixatecapsfunc)
 
 #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_LINKED(pad)         (GST_PAD_PEER(pad) != NULL)
 
+#define GST_PAD_IS_ACTIVE(pad)          (GST_PAD_ACTIVATE_MODE(pad) != GST_PAD_ACTIVATE_NONE)
+
 #define GST_PAD_IS_BLOCKED(pad)                (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_BLOCKED))
 #define GST_PAD_IS_BLOCKING(pad)       (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_BLOCKING))
 #define GST_PAD_IS_FLUSHING(pad)       (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLUSHING))
 #define GST_PAD_IS_IN_GETCAPS(pad)     (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_IN_GETCAPS))
-#define GST_PAD_IS_IN_SETCAPS(pad)     (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_IN_SETCAPS))
 #define GST_PAD_NEEDS_RECONFIGURE(pad)  (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_NEED_RECONFIGURE))
 #define GST_PAD_NEEDS_EVENTS(pad)       (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_NEED_EVENTS))
 #define GST_PAD_IS_FIXED_CAPS(pad)     (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FIXED_CAPS))
@@ -763,14 +750,6 @@ struct _GstPadClass {
  */
 #define GST_PAD_STREAM_LOCK(pad)        (g_static_rec_mutex_lock(GST_PAD_GET_STREAM_LOCK(pad)))
 /**
- * GST_PAD_STREAM_LOCK_FULL:
- * @pad: a #GstPad
- * @t: the number of times to recursively lock
- *
- * Lock the stream lock of @pad @t times.
- */
-#define GST_PAD_STREAM_LOCK_FULL(pad,t) (g_static_rec_mutex_lock_full(GST_PAD_GET_STREAM_LOCK(pad), t))
-/**
  * GST_PAD_STREAM_TRYLOCK:
  * @pad: a #GstPad
  *
@@ -785,23 +764,12 @@ struct _GstPadClass {
  * Unlock the stream lock of @pad.
  */
 #define GST_PAD_STREAM_UNLOCK(pad)      (g_static_rec_mutex_unlock(GST_PAD_GET_STREAM_LOCK(pad)))
-/**
- * GST_PAD_STREAM_UNLOCK_FULL:
- * @pad: a #GstPad
- *
- * Fully unlock the recursive stream lock of @pad, return the number of times
- * @pad was locked.
- */
-#define GST_PAD_STREAM_UNLOCK_FULL(pad) (g_static_rec_mutex_unlock_full(GST_PAD_GET_STREAM_LOCK(pad)))
 
 #define GST_PAD_BLOCK_GET_COND(pad)     (GST_PAD_CAST(pad)->block_cond)
 #define GST_PAD_BLOCK_WAIT(pad)         (g_cond_wait(GST_PAD_BLOCK_GET_COND (pad), GST_OBJECT_GET_LOCK (pad)))
 #define GST_PAD_BLOCK_SIGNAL(pad)       (g_cond_signal(GST_PAD_BLOCK_GET_COND (pad)))
 #define GST_PAD_BLOCK_BROADCAST(pad)    (g_cond_broadcast(GST_PAD_BLOCK_GET_COND (pad)))
 
-/* FIXME: this awful circular dependency need to be resolved properly (see padtemplate.h) */
-#include <gst/gstpadtemplate.h>
-
 GType                  gst_pad_get_type                        (void);
 
 /* creating pads */
@@ -839,7 +807,7 @@ gboolean            gst_pad_activate_pull                   (GstPad *pad, gboolean active);
 gboolean               gst_pad_activate_push                   (GstPad *pad, gboolean active);
 
 gulong                  gst_pad_add_probe                       (GstPad *pad,
-                                                                GstProbeType mask,
+                                                                GstPadProbeType mask,
                                                                 GstPadProbeCallback callback,
                                                                  gpointer user_data,
                                                                  GDestroyNotify destroy_data);
@@ -848,6 +816,9 @@ void                    gst_pad_remove_probe                    (GstPad *pad, gu
 gboolean               gst_pad_is_blocked                      (GstPad *pad);
 gboolean               gst_pad_is_blocking                     (GstPad *pad);
 
+void                    gst_pad_mark_reconfigure                (GstPad *pad);
+gboolean               gst_pad_check_reconfigure               (GstPad *pad);
+
 void                   gst_pad_set_element_private             (GstPad *pad, gpointer priv);
 gpointer               gst_pad_get_element_private             (GstPad *pad);
 
@@ -861,7 +832,7 @@ void                        gst_pad_set_activate_function           (GstPad *pad, GstPadActivateFunction activ
 void                   gst_pad_set_activatepull_function       (GstPad *pad, GstPadActivateModeFunction activatepull);
 void                   gst_pad_set_activatepush_function       (GstPad *pad, GstPadActivateModeFunction activatepush);
 void                   gst_pad_set_chain_function              (GstPad *pad, GstPadChainFunction chain);
-void                   gst_pad_set_chain_list_function (GstPad *pad, GstPadChainListFunction chainlist);
+void                   gst_pad_set_chain_list_function         (GstPad *pad, GstPadChainListFunction chainlist);
 void                   gst_pad_set_getrange_function           (GstPad *pad, GstPadGetRangeFunction get);
 void                   gst_pad_set_event_function              (GstPad *pad, GstPadEventFunction event);
 
@@ -879,9 +850,6 @@ GstPad*                     gst_pad_get_peer                        (GstPad *pad);
 
 /* capsnego functions */
 void                   gst_pad_set_getcaps_function            (GstPad *pad, GstPadGetCapsFunction getcaps);
-void                   gst_pad_set_acceptcaps_function         (GstPad *pad, GstPadAcceptCapsFunction acceptcaps);
-void                   gst_pad_set_fixatecaps_function         (GstPad *pad, GstPadFixateCapsFunction fixatecaps);
-void                   gst_pad_set_setcaps_function            (GstPad *pad, GstPadSetCapsFunction setcaps);
 
 GstCaps*                gst_pad_get_pad_template_caps          (GstPad *pad);
 
@@ -889,7 +857,6 @@ GstCaps*                gst_pad_get_pad_template_caps               (GstPad *pad);
 GstCaps *              gst_pad_get_current_caps                (GstPad * pad);
 gboolean               gst_pad_has_current_caps                (GstPad * pad);
 GstCaps *              gst_pad_get_caps                        (GstPad * pad, GstCaps *filter);
-void                   gst_pad_fixate_caps                     (GstPad * pad, GstCaps *caps);
 gboolean               gst_pad_accept_caps                     (GstPad * pad, GstCaps *caps);
 gboolean               gst_pad_set_caps                        (GstPad * pad, GstCaps *caps);
 
@@ -898,7 +865,6 @@ gboolean            gst_pad_peer_accept_caps                (GstPad * pad, GstCaps *caps);
 
 /* capsnego for linked pads */
 GstCaps *              gst_pad_get_allowed_caps                (GstPad * pad);
-GstCaps *               gst_pad_get_negotiated_caps             (GstPad * pad);
 
 /* pad offsets */
 gint64                  gst_pad_get_offset                      (GstPad *pad);
@@ -911,7 +877,6 @@ GstFlowReturn               gst_pad_pull_range                      (GstPad *pad, guint64 offset, guint size,
                                                                 GstBuffer **buffer);
 gboolean               gst_pad_push_event                      (GstPad *pad, GstEvent *event);
 gboolean               gst_pad_event_default                   (GstPad *pad, GstEvent *event);
-gboolean               gst_pad_event_forward                   (GstPad *pad, GstEvent *event);
 
 /* data passing functions on pad */
 GstFlowReturn          gst_pad_chain                           (GstPad *pad, GstBuffer *buffer);
@@ -934,12 +899,6 @@ GstIterator *           gst_pad_iterate_internal_links_default  (GstPad * pad);
 
 
 /* generic query function */
-void                   gst_pad_set_query_type_function         (GstPad *pad, GstPadQueryTypeFunction type_func);
-G_CONST_RETURN GstQueryType*
-                       gst_pad_get_query_types                 (GstPad *pad);
-G_CONST_RETURN GstQueryType*
-                       gst_pad_get_query_types_default         (GstPad *pad);
-
 gboolean               gst_pad_query                           (GstPad *pad, GstQuery *query);
 gboolean               gst_pad_peer_query                      (GstPad *pad, GstQuery *query);
 void                   gst_pad_set_query_function              (GstPad *pad, GstPadQueryFunction query);