docs, gst: typo fixes
[platform/upstream/gstreamer.git] / gst / gstpad.h
index 8079ee6..8990fdc 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <gst/gstobject.h>
 #include <gst/gstbuffer.h>
+#include <gst/gstbufferlist.h>
 #include <gst/gstcaps.h>
 #include <gst/gstevent.h>
 #include <gst/gstquery.h>
@@ -47,6 +48,7 @@ G_BEGIN_DECLS
 
 
 typedef struct _GstPad GstPad;
+typedef struct _GstPadPrivate GstPadPrivate;
 typedef struct _GstPadClass GstPadClass;
 
 /**
@@ -91,10 +93,8 @@ typedef enum {
 
 /**
  * GstFlowReturn:
- * @GST_FLOW_CUSTOM_SUCCESS:    Elements can use values starting from
- *                               this to define custom success codes. 
- *                               Since 0.10.7.
- * @GST_FLOW_RESEND:            Resend buffer, possibly with new caps.
+ * @GST_FLOW_RESEND:            Resend buffer, possibly with new caps (not
+ *                                 sent yet) (unused/unimplemented).
  * @GST_FLOW_OK:                Data passing was ok.
  * @GST_FLOW_NOT_LINKED:        Pad is not linked.
  * @GST_FLOW_WRONG_STATE:       Pad is in wrong state.
@@ -104,19 +104,34 @@ typedef enum {
  *                               this error should post an error message with more
  *                               details.
  * @GST_FLOW_NOT_SUPPORTED:     This operation is not supported.
+ * @GST_FLOW_CUSTOM_SUCCESS:    Elements can use values starting from
+ *                               this (and higher) to define custom success
+ *                               codes. Since 0.10.7.
+ * @GST_FLOW_CUSTOM_SUCCESS_1:  Pre-defined custom success code (define your
+ *                               custom success code to this to avoid compiler
+ *                               warnings). Since 0.10.29.
+ * @GST_FLOW_CUSTOM_SUCCESS_2:  Pre-defined custom success code. Since 0.10.29.
  * @GST_FLOW_CUSTOM_ERROR:      Elements can use values starting from
- *                               this to define custom error codes. Since 0.10.7.
+ *                               this (and lower) to define custom error codes.
+ *                               Since 0.10.7.
+ * @GST_FLOW_CUSTOM_ERROR_1:    Pre-defined custom error code (define your
+ *                               custom error code to this to avoid compiler
+ *                               warnings). Since 0.10.29.
+ * @GST_FLOW_CUSTOM_ERROR_2:    Pre-defined custom error code. Since 0.10.29.
  *
- * The result of passing data to a pad. 
+ * The result of passing data to a pad.
  *
- * Note that the custom return values should not be exposed outside of the 
+ * Note that the custom return values should not be exposed outside of the
  * element scope and are available since 0.10.7.
  */
+/* FIXME 0.11: remove custom flow returns */
 typedef enum {
-  /* custom success starts here */ 
+  /* custom success starts here */
+  GST_FLOW_CUSTOM_SUCCESS_2 = 102,
+  GST_FLOW_CUSTOM_SUCCESS_1 = 101,
   GST_FLOW_CUSTOM_SUCCESS = 100,
 
-  /* core predefined */ 
+  /* core predefined */
   GST_FLOW_RESEND        =  1,
   GST_FLOW_OK            =  0,
   /* expected failures */
@@ -128,8 +143,10 @@ typedef enum {
   GST_FLOW_ERROR         = -5,
   GST_FLOW_NOT_SUPPORTED  = -6,
 
-  /* custom error starts here */ 
-  GST_FLOW_CUSTOM_ERROR   = -100
+  /* custom error starts here */
+  GST_FLOW_CUSTOM_ERROR   = -100,
+  GST_FLOW_CUSTOM_ERROR_1 = -101,
+  GST_FLOW_CUSTOM_ERROR_2 = -102
 } GstFlowReturn;
 
 /**
@@ -137,28 +154,83 @@ typedef enum {
  * @ret: a #GstFlowReturn value
  *
  * Macro to test if the given #GstFlowReturn value indicates a fatal
- * error. This macro is mainly used in elements to decide when an error
- * message should be posted on the bus.
+ * error. This macro is mainly used in elements driving the pipeline to decide
+ * whether an error message should be posted on the bus. Note that such
+ * elements may also need to post an error message in the #GST_FLOW_NOT_LINKED
+ * case which is not caught by this macro.
+ *
+ * Deprecated: This macro is badly named and can't be used in any real
+ * scenarios without additional checks.
  */
+#ifndef GST_DISABLE_DEPRECATED
 #define GST_FLOW_IS_FATAL(ret) ((ret) <= GST_FLOW_UNEXPECTED)
+#endif
 
 /**
  * GST_FLOW_IS_SUCCESS:
  * @ret: a #GstFlowReturn value
  *
- * Macro to test if the given #GstFlowReturn value indicates a 
- * successfull result
+ * Macro to test if the given #GstFlowReturn value indicates a
+ * successful result
  * This macro is mainly used in elements to decide if the processing
- * of a buffer was successfull.
+ * of a buffer was successful.
  *
  * Since: 0.10.7
+ *
+ * Deprecated: This macro is badly named and can't be used in any real
+ * scenarios without additional checks.
  */
+#ifndef GST_DISABLE_DEPRECATED
 #define GST_FLOW_IS_SUCCESS(ret) ((ret) >= GST_FLOW_OK)
+#endif
 
-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);
 
 /**
+ * GstPadLinkCheck:
+ * @GST_PAD_LINK_CHECK_NOTHING: Don't check hierarchy or caps compatibility.
+ * @GST_PAD_LINK_CHECK_HIERARCHY: Check the pads have same parents/grandparents.
+ *   Could be omitted if it is already known that the two elements that own the
+ *   pads are in the same bin.
+ * @GST_PAD_LINK_CHECK_TEMPLATE_CAPS: Check if the pads are compatible by using
+ *   their template caps. This is much faster than @GST_PAD_LINK_CHECK_CAPS, but
+ *   would be unsafe e.g. if one pad has %GST_CAPS_ANY.
+ * @GST_PAD_LINK_CHECK_CAPS: Check if the pads are compatible by comparing the
+ *   caps returned by gst_pad_get_caps().
+ *
+ * The amount of checking to be done when linking pads. @GST_PAD_LINK_CHECK_CAPS
+ * and @GST_PAD_LINK_CHECK_TEMPLATE_CAPS are mutually exclusive. If both are
+ * specified, expensive but safe @GST_PAD_LINK_CHECK_CAPS are performed.
+ *
+ * <warning><para>
+ * Only disable some of the checks if you are 100% certain you know the link
+ * will not fail because of hierarchy/caps compatibility failures. If uncertain,
+ * use the default checks (%GST_PAD_LINK_CHECK_DEFAULT) or the regular methods
+ * for linking the pads.
+ * </para></warning>
+ *
+ * Since: 0.10.30
+ */
+
+typedef enum {
+  GST_PAD_LINK_CHECK_NOTHING       = 0,
+  GST_PAD_LINK_CHECK_HIERARCHY     = 1 << 0,
+  GST_PAD_LINK_CHECK_TEMPLATE_CAPS = 1 << 1,
+  GST_PAD_LINK_CHECK_CAPS          = 1 << 2
+} GstPadLinkCheck;
+
+/**
+ * GST_PAD_LINK_CHECK_DEFAULT:
+ *
+ * The default checks done when linking pads (i.e. the ones used by
+ * gst_pad_link()).
+ *
+ * Since: 0.10.30
+ */
+#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
@@ -201,7 +273,7 @@ typedef gboolean            (*GstPadActivateFunction)       (GstPad *pad);
  * @pad: a #GstPad
  * @active: activate or deactivate the pad.
  *
- * The prototype of the push and pull activate functions. 
+ * The prototype of the push and pull activate functions.
  *
  * Returns: TRUE if the pad could be activated or deactivated.
  */
@@ -215,18 +287,38 @@ typedef gboolean          (*GstPadActivateModeFunction)   (GstPad *pad, gboolean active);
  * @buffer: the #GstBuffer that is chained, not %NULL.
  *
  * A function that will be called on sinkpads when chaining buffers.
- * The function typically processes the data contained in the buffer and 
+ * The function typically processes the data contained in the buffer and
  * either consumes the data or passes it on to the internally linked pad(s).
  *
  * The implementer of this function receives a refcount to @buffer and should
  * gst_buffer_unref() when the buffer is no longer needed.
  *
  * When a chain function detects an error in the data stream, it must post an
- * error on the buffer and return an appropriate #GstFlowReturn value.
+ * error on the bus and return an appropriate #GstFlowReturn value.
  *
  * Returns: #GST_FLOW_OK for success
  */
 typedef GstFlowReturn          (*GstPadChainFunction)          (GstPad *pad, GstBuffer *buffer);
+
+/**
+ * GstPadChainListFunction:
+ * @pad: the sink #GstPad that performed the chain.
+ * @list: the #GstBufferList that is chained, not %NULL.
+ *
+ * A function that will be called on sinkpads when chaining buffer lists.
+ * The function typically processes the data contained in the buffer list and
+ * either consumes the data or passes it on to the internally linked pad(s).
+ *
+ * The implementer of this function receives a refcount to @list and
+ * should gst_buffer_list_unref() when the list is no longer needed.
+ *
+ * When a chainlist function detects an error in the data stream, it must
+ * post an error on the bus and return an appropriate #GstFlowReturn value.
+ *
+ * Returns: #GST_FLOW_OK for success
+ */
+typedef GstFlowReturn          (*GstPadChainListFunction)      (GstPad *pad, GstBufferList *list);
+
 /**
  * GstPadGetRangeFunction:
  * @pad: the src #GstPad to perform the getrange on.
@@ -236,37 +328,39 @@ typedef GstFlowReturn             (*GstPadChainFunction)          (GstPad *pad, GstBuffer *buffer);
  *
  * This function will be called on source pads when a peer element
  * request a buffer at the specified @offset and @length. If this function
- * returns #GST_FLOW_OK, the result buffer will be stored in @buffer. The 
+ * returns #GST_FLOW_OK, the result buffer will be stored in @buffer. The
  * contents of @buffer is invalid for any other return value.
  *
  * This function is installed on a source pad with
- * gst_pad_set_getrange_function() and can only be called on source pads after 
+ * gst_pad_set_getrange_function() and can only be called on source pads after
  * they are successfully activated with gst_pad_activate_pull().
  *
  * @offset and @length are always given in byte units. @offset must normally be a value
  * between 0 and the length in bytes of the data available on @pad. The
  * length (duration in bytes) can be retrieved with a #GST_QUERY_DURATION or with a
- * #GST_QUERY_SEEKING. 
+ * #GST_QUERY_SEEKING.
  *
  * Any @offset larger or equal than the length will make the function return
  * #GST_FLOW_UNEXPECTED, which corresponds to EOS. In this case @buffer does not
  * contain a valid buffer.
  *
- * The buffer size of @buffer might be smaller than @length when @offset is near
- * the end of the stream.
+ * The buffer size of @buffer will only be smaller than @length when @offset is
+ * near the end of the stream. In all other cases, the size of @buffer must be
+ * exactly the requested size.
  *
- * It is allowed to call this function with a 0 @length and valid @offset, in 
+ * It is allowed to call this function with a 0 @length and valid @offset, in
  * which case @buffer will contain a 0-sized buffer and the function returns
  * #GST_FLOW_OK.
  *
  * When this function is called with a -1 @offset, the sequentially next buffer
- * of length @length in the stream is returned. 
+ * of length @length in the stream is returned.
  *
  * When this function is called with a -1 @length, a buffer with a default
  * optimal length is returned in @buffer. The length might depend on the value
  * of @offset.
  *
- * Returns: #GST_FLOW_OK for success
+ * Returns: #GST_FLOW_OK for success and a valid buffer in @buffer. Any other
+ * return value leaves @buffer undefined.
  */
 typedef GstFlowReturn          (*GstPadGetRangeFunction)       (GstPad *pad, guint64 offset,
                                                                 guint length, GstBuffer **buffer);
@@ -304,12 +398,32 @@ typedef gboolean          (*GstPadCheckGetRangeFunction)  (GstPad *pad);
  *
  * The signature of the internal pad link function.
  *
- * Returns: a newly allocated #GList of pads that are linked to the given pad on
- *  the inside of the parent element.
- *  The caller must call g_list_free() on it after use.
+ * Returns: (element-type Gst.Pad) (transfer container): a newly allocated #GList of pads that are linked to the given pad on
+ * the inside of the parent element.
+ *
+ * The caller must call g_list_free() on it after use.
+ *
+ * Deprecated: use the threadsafe #GstPadIterIntLinkFunction instead.
  */
+#ifndef GST_DISABLE_DEPRECATED
 typedef GList*                 (*GstPadIntLinkFunction)        (GstPad *pad);
+#endif
+
 
+/**
+ * GstPadIterIntLinkFunction:
+ * @pad: The #GstPad to query.
+ *
+ * The signature of the internal pad link iterator function.
+ *
+ * Returns: a new #GstIterator that will iterate over all pads that are
+ * linked to the given pad on the inside of the parent element.
+ *
+ * the caller must call gst_iterator_free() after usage.
+ *
+ * Since 0.10.21
+ */
+typedef GstIterator*           (*GstPadIterIntLinkFunction)    (GstPad *pad);
 
 /* generic query function */
 /**
@@ -373,7 +487,7 @@ typedef GstCaps*            (*GstPadGetCapsFunction)        (GstPad *pad);
  * @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 
+ * 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.
@@ -393,10 +507,10 @@ typedef gboolean          (*GstPadSetCapsFunction)        (GstPad *pad, GstCaps *caps);
 typedef gboolean               (*GstPadAcceptCapsFunction)     (GstPad *pad, GstCaps *caps);
 /**
  * GstPadFixateCapsFunction:
- * @pad: a #GstPad  
+ * @pad: a #GstPad
  * @caps: the #GstCaps to fixate
  *
- * Given possibly unfixed caps @caps, let @pad use its default prefered 
+ * Given possibly unfixed caps @caps, let @pad use its default preferred
  * 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.
@@ -404,7 +518,7 @@ typedef gboolean            (*GstPadAcceptCapsFunction)     (GstPad *pad, GstCaps *caps);
 typedef void                   (*GstPadFixateCapsFunction)     (GstPad *pad, GstCaps *caps);
 /**
  * GstPadBufferAllocFunction:
- * @pad: a sink #GstPad  
+ * @pad: a sink #GstPad
  * @offset: the desired offset of the buffer
  * @size: the desired size of the buffer
  * @caps: the desired caps of the buffer
@@ -417,13 +531,16 @@ typedef void                      (*GstPadFixateCapsFunction)     (GstPad *pad, GstCaps *caps);
  * be processed by @pad. The function is mostly overridden by elements that can
  * provide a hardware buffer in order to avoid additional memcpy operations.
  *
- * The function can return a buffer that does not have @caps, in which case the
- * upstream element requests a format change. If a format change was requested,
- * the returned buffer will be one to hold the data of said new caps, so its
- * size might be different from @size.
+ * The function can return a buffer that has caps different from the requested
+ * @caps, in which case the upstream element requests a format change to this
+ * new caps.
+ * If a format change was requested, the returned buffer will be one to hold
+ * the data of said new caps, so its size might be different from the requested
+ * @size.
  *
  * When this function returns anything else than #GST_FLOW_OK, the buffer allocation
- * failed and @buf does not contain valid data.
+ * failed and @buf does not contain valid data. If the function returns #GST_FLOW_OK and
+ * the @buf is NULL, a #GstBuffer will be created with @caps, @offset and @size.
  *
  * By default this function returns a new buffer of @size and with @caps containing
  * purely malloced data. The buffer should be freed with gst_buffer_unref()
@@ -479,6 +596,7 @@ typedef enum {
  * @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_FLAG_LAST: offset to define more flags
  *
  * Pad state flags
@@ -488,6 +606,7 @@ typedef enum {
   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),
   /* padding */
   GST_PAD_FLAG_LAST     = (GST_OBJECT_FLAG_LAST << 8)
 } GstPadFlags;
@@ -521,7 +640,7 @@ typedef struct _GstPadTemplate GstPadTemplate;
  * @unlinkfunc: function called when pad is unlinked
  * @peer: the pad this pad is linked to
  * @sched_private: private storage for the scheduler
- * @chainfunc: function to chain data to pad
+ * @chainfunc: function to chain buffer to pad
  * @checkgetrangefunc: function to check if pad can operate in pull mode
  * @getrangefunc: function to get a range of data from a pad
  * @eventfunc: function to send an event to a pad
@@ -532,7 +651,9 @@ typedef struct _GstPadTemplate GstPadTemplate;
  * @bufferallocfunc: function to allocate a buffer for this pad
  * @do_buffer_signals: counter counting installed buffer signals
  * @do_event_signals: counter counting installed event signals
- * 
+ * @iterintlinkfunc: get the internal links iterator of this pad
+ * @block_destroy_data: notify function for gst_pad_set_blocked_async_full()
+ *
  * The #GstPad structure. Use the functions to update the variables.
  */
 struct _GstPad {
@@ -590,7 +711,13 @@ struct _GstPad {
   GstPadQueryFunction           queryfunc;
 
   /* internal links */
+#ifndef GST_DISABLE_DEPRECATED
   GstPadIntLinkFunction                 intlinkfunc;
+#else
+#ifndef __GTK_DOC_IGNORE__
+  gpointer intlinkfunc;
+#endif
+#endif
 
   GstPadBufferAllocFunction      bufferallocfunc;
 
@@ -599,8 +726,21 @@ struct _GstPad {
   gint                          do_buffer_signals;
   gint                          do_event_signals;
 
+  /* ABI added */
+  /* iterate internal links */
+  GstPadIterIntLinkFunction     iterintlinkfunc;
+
+  /* free block_data */
+  GDestroyNotify block_destroy_data;
+
   /*< private >*/
-  gpointer _gst_reserved[GST_PADDING];
+  union {
+    struct {
+      gboolean                      block_callback_called;
+      GstPadPrivate                *priv;
+    } ABI;
+    gpointer _gst_reserved[GST_PADDING - 2];
+  } abidata;
 };
 
 struct _GstPadClass {
@@ -636,12 +776,21 @@ struct _GstPadClass {
 #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)
+#ifndef GST_DISABLE_DEPRECATED
 #define GST_PAD_INTLINKFUNC(pad)       (GST_PAD_CAST(pad)->intlinkfunc)
+#endif
+#define GST_PAD_ITERINTLINKFUNC(pad)    (GST_PAD_CAST(pad)->iterintlinkfunc)
 
 #define GST_PAD_PEER(pad)              (GST_PAD_CAST(pad)->peer)
 #define GST_PAD_LINKFUNC(pad)          (GST_PAD_CAST(pad)->linkfunc)
 #define GST_PAD_UNLINKFUNC(pad)                (GST_PAD_CAST(pad)->unlinkfunc)
 
+/**
+ * GST_PAD_CAPS:
+ * @pad: a #GstPad.
+ *
+ * The caps for this pad.
+ */
 #define GST_PAD_CAPS(pad)              (GST_PAD_CAST(pad)->caps)
 #define GST_PAD_GETCAPSFUNC(pad)       (GST_PAD_CAST(pad)->getcapsfunc)
 #define GST_PAD_SETCAPSFUNC(pad)       (GST_PAD_CAST(pad)->setcapsfunc)
@@ -655,6 +804,7 @@ struct _GstPadClass {
 
 #define GST_PAD_IS_LINKED(pad)         (GST_PAD_PEER(pad) != NULL)
 #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))
@@ -727,6 +877,7 @@ struct _GstPadClass {
 #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>
@@ -770,7 +921,11 @@ gboolean           gst_pad_activate_push                   (GstPad *pad, gboolean active);
 gboolean               gst_pad_set_blocked                     (GstPad *pad, gboolean blocked);
 gboolean               gst_pad_set_blocked_async               (GstPad *pad, gboolean blocked,
                                                                 GstPadBlockCallback callback, gpointer user_data);
+gboolean               gst_pad_set_blocked_async_full          (GstPad *pad, gboolean blocked,
+                                                                GstPadBlockCallback callback, gpointer user_data,
+                                                                 GDestroyNotify destroy_data);
 gboolean               gst_pad_is_blocked                      (GstPad *pad);
+gboolean               gst_pad_is_blocking                     (GstPad *pad);
 
 void                   gst_pad_set_element_private             (GstPad *pad, gpointer priv);
 gpointer               gst_pad_get_element_private             (GstPad *pad);
@@ -788,6 +943,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_getrange_function           (GstPad *pad, GstPadGetRangeFunction get);
 void                   gst_pad_set_checkgetrange_function      (GstPad *pad, GstPadCheckGetRangeFunction check);
 void                   gst_pad_set_event_function              (GstPad *pad, GstPadEventFunction event);
@@ -796,7 +952,9 @@ void                        gst_pad_set_event_function              (GstPad *pad, GstPadEventFunction event);
 void                   gst_pad_set_link_function               (GstPad *pad, GstPadLinkFunction link);
 void                   gst_pad_set_unlink_function             (GstPad *pad, GstPadUnlinkFunction unlink);
 
+gboolean                gst_pad_can_link                        (GstPad *srcpad, GstPad *sinkpad);
 GstPadLinkReturn        gst_pad_link                           (GstPad *srcpad, GstPad *sinkpad);
+GstPadLinkReturn        gst_pad_link_full                      (GstPad *srcpad, GstPad *sinkpad, GstPadLinkCheck flags);
 gboolean               gst_pad_unlink                          (GstPad *srcpad, GstPad *sinkpad);
 gboolean               gst_pad_is_linked                       (GstPad *pad);
 
@@ -808,23 +966,26 @@ void                      gst_pad_set_acceptcaps_function         (GstPad *pad, GstPadAcceptCapsFunction a
 void                   gst_pad_set_fixatecaps_function         (GstPad *pad, GstPadFixateCapsFunction fixatecaps);
 void                   gst_pad_set_setcaps_function            (GstPad *pad, GstPadSetCapsFunction setcaps);
 
-G_CONST_RETURN GstCaps*        gst_pad_get_pad_template_caps           (GstPad *pad);
+const GstCaps*         gst_pad_get_pad_template_caps           (GstPad *pad);
 
-/* capsnego function for connected/unconnected pads */
+/* capsnego function for linked/unlinked pads */
+GstCaps *              gst_pad_get_caps_reffed                 (GstPad * pad);
 GstCaps *              gst_pad_get_caps                        (GstPad * pad);
 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);
 
+GstCaps *              gst_pad_peer_get_caps_reffed            (GstPad * pad);
 GstCaps *              gst_pad_peer_get_caps                   (GstPad * pad);
 gboolean               gst_pad_peer_accept_caps                (GstPad * pad, GstCaps *caps);
 
-/* capsnego for connected pads */
-GstCaps *              gst_pad_get_allowed_caps                (GstPad * srcpad);
+/* capsnego for linked pads */
+GstCaps *              gst_pad_get_allowed_caps                (GstPad * pad);
 GstCaps *              gst_pad_get_negotiated_caps             (GstPad * pad);
 
 /* data passing functions to peer */
 GstFlowReturn          gst_pad_push                            (GstPad *pad, GstBuffer *buffer);
+GstFlowReturn          gst_pad_push_list                       (GstPad *pad, GstBufferList *list);
 gboolean               gst_pad_check_pull_range                (GstPad *pad);
 GstFlowReturn          gst_pad_pull_range                      (GstPad *pad, guint64 offset, guint size,
                                                                 GstBuffer **buffer);
@@ -833,6 +994,7 @@ gboolean            gst_pad_event_default                   (GstPad *pad, GstEvent *event);
 
 /* data passing functions on pad */
 GstFlowReturn          gst_pad_chain                           (GstPad *pad, GstBuffer *buffer);
+GstFlowReturn          gst_pad_chain_list                      (GstPad *pad, GstBufferList *list);
 GstFlowReturn          gst_pad_get_range                       (GstPad *pad, guint64 offset, guint size,
                                                                 GstBuffer **buffer);
 gboolean               gst_pad_send_event                      (GstPad *pad, GstEvent *event);
@@ -844,18 +1006,25 @@ gboolean         gst_pad_pause_task                      (GstPad *pad);
 gboolean               gst_pad_stop_task                       (GstPad *pad);
 
 /* internal links */
+#ifndef GST_DISABLE_DEPRECATED
 void                   gst_pad_set_internal_link_function      (GstPad *pad, GstPadIntLinkFunction intlink);
 GList*                 gst_pad_get_internal_links              (GstPad *pad);
 GList*                 gst_pad_get_internal_links_default      (GstPad *pad);
+#endif
+
+void                    gst_pad_set_iterate_internal_links_function (GstPad * pad,
+                                                                 GstPadIterIntLinkFunction iterintlink);
+GstIterator *           gst_pad_iterate_internal_links          (GstPad * pad);
+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);
+const GstQueryType*    gst_pad_get_query_types                 (GstPad *pad);
+const 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);
 gboolean               gst_pad_query_default                   (GstPad *pad, GstQuery *query);
 
@@ -863,7 +1032,7 @@ gboolean           gst_pad_query_default                   (GstPad *pad, GstQuery *query);
 gboolean               gst_pad_dispatcher                      (GstPad *pad, GstPadDispatcherFunction dispatch,
                                                                 gpointer data);
 
-#ifndef GST_DISABLE_LOADSAVE
+#if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_DISABLE_DEPRECATED)
 void                   gst_pad_load_and_link                   (xmlNodePtr self, GstObject *parent);
 #endif