| gstpad.h | gstpad.h | |||
|---|---|---|---|---|
| skipping to change at line 30 | skipping to change at line 30 | |||
| * Boston, MA 02111-1307, USA. | * Boston, MA 02111-1307, USA. | |||
| */ | */ | |||
| #ifndef __GST_PAD_H__ | #ifndef __GST_PAD_H__ | |||
| #define __GST_PAD_H__ | #define __GST_PAD_H__ | |||
| #include <gst/gstconfig.h> | #include <gst/gstconfig.h> | |||
| #include <gst/gstobject.h> | #include <gst/gstobject.h> | |||
| #include <gst/gstbuffer.h> | #include <gst/gstbuffer.h> | |||
| #include <gst/gstbufferlist.h> | ||||
| #include <gst/gstcaps.h> | #include <gst/gstcaps.h> | |||
| #include <gst/gstevent.h> | #include <gst/gstevent.h> | |||
| #include <gst/gstquery.h> | #include <gst/gstquery.h> | |||
| #include <gst/gsttask.h> | #include <gst/gsttask.h> | |||
| G_BEGIN_DECLS | G_BEGIN_DECLS | |||
| /* | /* | |||
| * Pad base class | * Pad base class | |||
| */ | */ | |||
| #define GST_TYPE_PAD (gst_pad_get_type ()) | #define GST_TYPE_PAD (gst_pad_get_type ()) | |||
| #define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD)) | #define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD)) | |||
| #define GST_IS_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((k lass), GST_TYPE_PAD)) | #define GST_IS_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((k lass), GST_TYPE_PAD)) | |||
| #define GST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD, GstPad)) | #define GST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD, GstPad)) | |||
| #define GST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G ST_TYPE_PAD, GstPadClass)) | #define GST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G ST_TYPE_PAD, GstPadClass)) | |||
| #define GST_PAD_CAST(obj) ((GstPad*)(obj)) | #define GST_PAD_CAST(obj) ((GstPad*)(obj)) | |||
| typedef struct _GstPad GstPad; | typedef struct _GstPad GstPad; | |||
| typedef struct _GstPadPrivate GstPadPrivate; | ||||
| typedef struct _GstPadClass GstPadClass; | typedef struct _GstPadClass GstPadClass; | |||
| /** | /** | |||
| * GstPadLinkReturn: | * GstPadLinkReturn: | |||
| * @GST_PAD_LINK_OK : link succeeded | * @GST_PAD_LINK_OK : link succeeded | |||
| * @GST_PAD_LINK_WRONG_HIERARCHY: pads have no common grandparent | * @GST_PAD_LINK_WRONG_HIERARCHY: pads have no common grandparent | |||
| * @GST_PAD_LINK_WAS_LINKED : pad was already linked | * @GST_PAD_LINK_WAS_LINKED : pad was already linked | |||
| * @GST_PAD_LINK_WRONG_DIRECTION: pads have wrong direction | * @GST_PAD_LINK_WRONG_DIRECTION: pads have wrong direction | |||
| * @GST_PAD_LINK_NOFORMAT : pads do not have common format | * @GST_PAD_LINK_NOFORMAT : pads do not have common format | |||
| * @GST_PAD_LINK_NOSCHED : pads cannot cooperate in scheduling | * @GST_PAD_LINK_NOSCHED : pads cannot cooperate in scheduling | |||
| skipping to change at line 92 | skipping to change at line 94 | |||
| * GST_PAD_LINK_SUCCESSFUL: | * GST_PAD_LINK_SUCCESSFUL: | |||
| * @ret: the #GstPadLinkReturn value | * @ret: the #GstPadLinkReturn value | |||
| * | * | |||
| * Macro to test if the given #GstPadLinkReturn value indicates a successfu l | * Macro to test if the given #GstPadLinkReturn value indicates a successfu l | |||
| * link step. | * link step. | |||
| */ | */ | |||
| #define GST_PAD_LINK_SUCCESSFUL(ret) ((ret) >= GST_PAD_LINK_OK) | #define GST_PAD_LINK_SUCCESSFUL(ret) ((ret) >= GST_PAD_LINK_OK) | |||
| /** | /** | |||
| * GstFlowReturn: | * 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 (not | * @GST_FLOW_RESEND: Resend buffer, possibly with new caps (not | |||
| * sent yet) (unused/unimplemented). | * sent yet) (unused/unimplemented). | |||
| * @GST_FLOW_OK: Data passing was ok. | * @GST_FLOW_OK: Data passing was ok. | |||
| * @GST_FLOW_NOT_LINKED: Pad is not linked. | * @GST_FLOW_NOT_LINKED: Pad is not linked. | |||
| * @GST_FLOW_WRONG_STATE: Pad is in wrong state. | * @GST_FLOW_WRONG_STATE: Pad is in wrong state. | |||
| * @GST_FLOW_UNEXPECTED: Did not expect anything, like after EOS. | * @GST_FLOW_UNEXPECTED: Did not expect anything, like after EOS. | |||
| * @GST_FLOW_NOT_NEGOTIATED: Pad is not negotiated. | * @GST_FLOW_NOT_NEGOTIATED: Pad is not negotiated. | |||
| * @GST_FLOW_ERROR: Some (fatal) error occured. Element generat ing | * @GST_FLOW_ERROR: Some (fatal) error occured. Element generat ing | |||
| * this error should post an error message wi th more | * this error should post an error message wi th more | |||
| * details. | * details. | |||
| * @GST_FLOW_NOT_SUPPORTED: This operation is not supported. | * @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 you | ||||
| r | ||||
| * custom success code to this to avoid compi | ||||
| ler | ||||
| * 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 | * @GST_FLOW_CUSTOM_ERROR: Elements can use values starting from | |||
| * this to define custom error codes. Since 0 | * this (and lower) to define custom error co | |||
| .10.7. | des. | |||
| * Since 0.10.7. | ||||
| * @GST_FLOW_CUSTOM_ERROR_1: Pre-defined custom error code (define your | ||||
| * custom error code to this to avoid compile | ||||
| r | ||||
| * warnings). Since 0.10.29. | ||||
| * @GST_FLOW_CUSTOM_ERROR_2: Pre-defined custom error code. Since 0.10.2 | ||||
| 9. | ||||
| * | * | |||
| * 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. | * element scope and are available since 0.10.7. | |||
| */ | */ | |||
| /* FIXME 0.11: remove custom flow returns */ | ||||
| typedef enum { | 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, | GST_FLOW_CUSTOM_SUCCESS = 100, | |||
| /* core predefined */ | /* core predefined */ | |||
| GST_FLOW_RESEND = 1, | GST_FLOW_RESEND = 1, | |||
| GST_FLOW_OK = 0, | GST_FLOW_OK = 0, | |||
| /* expected failures */ | /* expected failures */ | |||
| GST_FLOW_NOT_LINKED = -1, | GST_FLOW_NOT_LINKED = -1, | |||
| GST_FLOW_WRONG_STATE = -2, | GST_FLOW_WRONG_STATE = -2, | |||
| /* error cases */ | /* error cases */ | |||
| GST_FLOW_UNEXPECTED = -3, | GST_FLOW_UNEXPECTED = -3, | |||
| GST_FLOW_NOT_NEGOTIATED = -4, | GST_FLOW_NOT_NEGOTIATED = -4, | |||
| GST_FLOW_ERROR = -5, | GST_FLOW_ERROR = -5, | |||
| GST_FLOW_NOT_SUPPORTED = -6, | GST_FLOW_NOT_SUPPORTED = -6, | |||
| /* custom error starts here */ | /* custom error starts here */ | |||
| GST_FLOW_CUSTOM_ERROR = -100 | GST_FLOW_CUSTOM_ERROR = -100, | |||
| GST_FLOW_CUSTOM_ERROR_1 = -101, | ||||
| GST_FLOW_CUSTOM_ERROR_2 = -102 | ||||
| } GstFlowReturn; | } GstFlowReturn; | |||
| /** | /** | |||
| * GST_FLOW_IS_FATAL: | * GST_FLOW_IS_FATAL: | |||
| * @ret: a #GstFlowReturn value | * @ret: a #GstFlowReturn value | |||
| * | * | |||
| * Macro to test if the given #GstFlowReturn value indicates a fatal | * Macro to test if the given #GstFlowReturn value indicates a fatal | |||
| * error. This macro is mainly used in elements driving the pipeline to dec ide | * error. This macro is mainly used in elements driving the pipeline to dec ide | |||
| * whether an error message should be posted on the bus. Note that such | * 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_LIN KED | * elements may also need to post an error message in the #GST_FLOW_NOT_LIN KED | |||
| * case which is not caught by this macro. | * 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) | #define GST_FLOW_IS_FATAL(ret) ((ret) <= GST_FLOW_UNEXPECTED) | |||
| #endif | ||||
| /** | /** | |||
| * GST_FLOW_IS_SUCCESS: | * GST_FLOW_IS_SUCCESS: | |||
| * @ret: a #GstFlowReturn value | * @ret: a #GstFlowReturn value | |||
| * | * | |||
| * Macro to test if the given #GstFlowReturn value indicates a | * Macro to test if the given #GstFlowReturn value indicates a | |||
| * successfull result | * successfull result | |||
| * This macro is mainly used in elements to decide if the processing | * This macro is mainly used in elements to decide if the processing | |||
| * of a buffer was successfull. | * of a buffer was successfull. | |||
| * | * | |||
| * Since: 0.10.7 | * 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) | #define GST_FLOW_IS_SUCCESS(ret) ((ret) >= GST_FLOW_OK) | |||
| #endif | ||||
| G_CONST_RETURN gchar* gst_flow_get_name (GstFlowReturn ret); | G_CONST_RETURN gchar* gst_flow_get_name (GstFlowReturn ret); | |||
| GQuark gst_flow_to_quark (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/grandpar | ||||
| ents. | ||||
| * 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 u | ||||
| sing | ||||
| * 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 ar | ||||
| e | ||||
| * 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 lin | ||||
| k | ||||
| * will not fail because of hierarchy/caps compatibility failures. If uncer | ||||
| tain, | ||||
| * use the default checks (%GST_PAD_LINK_CHECK_DEFAULT) or the regular meth | ||||
| ods | ||||
| * 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 (GST_PAD_LINK_CHECK_HIERARCHY | GST_PAD_ | ||||
| LINK_CHECK_CAPS) | ||||
| /** | ||||
| * GstActivateMode: | * GstActivateMode: | |||
| * @GST_ACTIVATE_NONE: Pad will not handle dataflow | * @GST_ACTIVATE_NONE: Pad will not handle dataflow | |||
| * @GST_ACTIVATE_PUSH: Pad handles dataflow in downstream push mod e | * @GST_ACTIVATE_PUSH: Pad handles dataflow in downstream push mod e | |||
| * @GST_ACTIVATE_PULL: Pad handles dataflow in upstream pull mode | * @GST_ACTIVATE_PULL: Pad handles dataflow in upstream pull mode | |||
| * | * | |||
| * The status of a GstPad. After activating a pad, which usually happens wh en the | * The status of a GstPad. After activating a pad, which usually happens wh en the | |||
| * parent element goes from READY to PAUSED, the GstActivateMode defines if the | * parent element goes from READY to PAUSED, the GstActivateMode defines if the | |||
| * pad operates in push or pull mode. | * pad operates in push or pull mode. | |||
| */ | */ | |||
| typedef enum { | typedef enum { | |||
| skipping to change at line 230 | skipping to change at line 299 | |||
| * | * | |||
| * The implementer of this function receives a refcount to @buffer and shou ld | * The implementer of this function receives a refcount to @buffer and shou ld | |||
| * gst_buffer_unref() when the buffer is no longer needed. | * 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 | * When a chain function detects an error in the data stream, it must post an | |||
| * error on the bus and return an appropriate #GstFlowReturn value. | * error on the bus and return an appropriate #GstFlowReturn value. | |||
| * | * | |||
| * Returns: #GST_FLOW_OK for success | * Returns: #GST_FLOW_OK for success | |||
| */ | */ | |||
| typedef GstFlowReturn (*GstPadChainFunction) (GstPad *pad , GstBuffer *buffer); | 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 a | ||||
| nd | ||||
| * 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: | * GstPadGetRangeFunction: | |||
| * @pad: the src #GstPad to perform the getrange on. | * @pad: the src #GstPad to perform the getrange on. | |||
| * @offset: the offset of the range | * @offset: the offset of the range | |||
| * @length: the length of the range | * @length: the length of the range | |||
| * @buffer: a memory location to hold the result buffer, cannot be NULL. | * @buffer: a memory location to hold the result buffer, cannot be NULL. | |||
| * | * | |||
| * This function will be called on source pads when a peer element | * This function will be called on source pads when a peer element | |||
| * request a buffer at the specified @offset and @length. If this function | * 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 | |||
| skipping to change at line 255 | skipping to change at line 344 | |||
| * | * | |||
| * @offset and @length are always given in byte units. @offset must normall y be a value | * @offset and @length are always given in byte units. @offset must normall y be a value | |||
| * between 0 and the length in bytes of the data available on @pad. The | * 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 o r with a | * length (duration in bytes) can be retrieved with a #GST_QUERY_DURATION o r with a | |||
| * #GST_QUERY_SEEKING. | * #GST_QUERY_SEEKING. | |||
| * | * | |||
| * Any @offset larger or equal than the length will make the function retur n | * Any @offset larger or equal than the length will make the function retur n | |||
| * #GST_FLOW_UNEXPECTED, which corresponds to EOS. In this case @buffer doe s not | * #GST_FLOW_UNEXPECTED, which corresponds to EOS. In this case @buffer doe s not | |||
| * contain a valid buffer. | * contain a valid buffer. | |||
| * | * | |||
| * The buffer size of @buffer might be smaller than @length when @offset is | * The buffer size of @buffer will only be smaller than @length when @offse | |||
| near | t is | |||
| * the end of the stream. | * 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 return s | * which case @buffer will contain a 0-sized buffer and the function return s | |||
| * #GST_FLOW_OK. | * #GST_FLOW_OK. | |||
| * | * | |||
| * When this function is called with a -1 @offset, the sequentially next bu ffer | * When this function is called with a -1 @offset, the sequentially next bu ffer | |||
| * 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 | * 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 va lue | * optimal length is returned in @buffer. The length might depend on the va lue | |||
| * of @offset. | * of @offset. | |||
| * | * | |||
| * Returns: #GST_FLOW_OK for success | * Returns: #GST_FLOW_OK for success and a valid buffer in @buffer. Any oth | |||
| er | ||||
| * return value leaves @buffer undefined. | ||||
| */ | */ | |||
| typedef GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad , guint64 offset, | typedef GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad , guint64 offset, | |||
| guint lengt h, GstBuffer **buffer); | guint lengt h, GstBuffer **buffer); | |||
| /** | /** | |||
| * GstPadEventFunction: | * GstPadEventFunction: | |||
| * @pad: the #GstPad to handle the event. | * @pad: the #GstPad to handle the event. | |||
| * @event: the #GstEvent to handle. | * @event: the #GstEvent to handle. | |||
| * | * | |||
| * Function signature to handle an event for the pad. | * Function signature to handle an event for the pad. | |||
| skipping to change at line 306 | skipping to change at line 397 | |||
| */ | */ | |||
| typedef gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad ); | typedef gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad ); | |||
| /* internal links */ | /* internal links */ | |||
| /** | /** | |||
| * GstPadIntLinkFunction: | * GstPadIntLinkFunction: | |||
| * @pad: The #GstPad to query. | * @pad: The #GstPad to query. | |||
| * | * | |||
| * The signature of the internal pad link function. | * The signature of the internal pad link function. | |||
| * | * | |||
| * Returns: a newly allocated #GList of pads that are linked to the given p ad on | * 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 inside of the parent element. | |||
| * | * | |||
| * The caller must call g_list_free() on it after use. | * The caller must call g_list_free() on it after use. | |||
| * | * | |||
| * Deprecated: use the threadsafe #GstPadIterIntLinkFunction instead. | * Deprecated: use the threadsafe #GstPadIterIntLinkFunction instead. | |||
| */ | */ | |||
| typedef GList* (*GstPadIntLinkFunction) (GstPad *pad ); | typedef GList* (*GstPadIntLinkFunction) (GstPad *pad ); | |||
| /** | /** | |||
| * GstPadIterIntLinkFunction: | * GstPadIterIntLinkFunction: | |||
| skipping to change at line 543 | skipping to change at line 634 | |||
| * @setcapsfunc: function to set caps on the pad | * @setcapsfunc: function to set caps on the pad | |||
| * @acceptcapsfunc: function to check if pad can accept caps | * @acceptcapsfunc: function to check if pad can accept caps | |||
| * @fixatecapsfunc: function to fixate caps | * @fixatecapsfunc: function to fixate caps | |||
| * @activatefunc: pad activation function | * @activatefunc: pad activation function | |||
| * @activatepushfunc: function to activate/deactivate pad in push mode | * @activatepushfunc: function to activate/deactivate pad in push mode | |||
| * @activatepullfunc: function to activate/deactivate pad in pull mode | * @activatepullfunc: function to activate/deactivate pad in pull mode | |||
| * @linkfunc: function called when pad is linked | * @linkfunc: function called when pad is linked | |||
| * @unlinkfunc: function called when pad is unlinked | * @unlinkfunc: function called when pad is unlinked | |||
| * @peer: the pad this pad is linked to | * @peer: the pad this pad is linked to | |||
| * @sched_private: private storage for the scheduler | * @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 | * @checkgetrangefunc: function to check if pad can operate in pull mode | |||
| * @getrangefunc: function to get a range of data from a pad | * @getrangefunc: function to get a range of data from a pad | |||
| * @eventfunc: function to send an event to a pad | * @eventfunc: function to send an event to a pad | |||
| * @mode: current activation mode of the pad | * @mode: current activation mode of the pad | |||
| * @querytypefunc: get list of supported queries | * @querytypefunc: get list of supported queries | |||
| * @queryfunc: perform a query on the pad | * @queryfunc: perform a query on the pad | |||
| * @intlinkfunc: get the internal links of this pad | * @intlinkfunc: get the internal links of this pad | |||
| * @bufferallocfunc: function to allocate a buffer for this pad | * @bufferallocfunc: function to allocate a buffer for this pad | |||
| * @do_buffer_signals: counter counting installed buffer signals | * @do_buffer_signals: counter counting installed buffer signals | |||
| * @do_event_signals: counter counting installed event signals | * @do_event_signals: counter counting installed event signals | |||
| skipping to change at line 634 | skipping to change at line 725 | |||
| /* iterate internal links */ | /* iterate internal links */ | |||
| GstPadIterIntLinkFunction iterintlinkfunc; | GstPadIterIntLinkFunction iterintlinkfunc; | |||
| /* free block_data */ | /* free block_data */ | |||
| GDestroyNotify block_destroy_data; | GDestroyNotify block_destroy_data; | |||
| /*< private >*/ | /*< private >*/ | |||
| union { | union { | |||
| struct { | struct { | |||
| gboolean block_callback_called; | gboolean block_callback_called; | |||
| GstPadPrivate *priv; | ||||
| } ABI; | } ABI; | |||
| gpointer _gst_reserved[GST_PADDING - 2]; | gpointer _gst_reserved[GST_PADDING - 2]; | |||
| } abidata; | } abidata; | |||
| }; | }; | |||
| struct _GstPadClass { | struct _GstPadClass { | |||
| GstObjectClass parent_class; | GstObjectClass parent_class; | |||
| /* signal callbacks */ | /* signal callbacks */ | |||
| void (*linked) (GstPad *pad, GstPad *peer); | void (*linked) (GstPad *pad, GstPad *peer); | |||
| skipping to change at line 671 | skipping to change at line 763 | |||
| #define GST_PAD_ACTIVATEFUNC(pad) (GST_PAD_CAST(pad)->activatefunc) | #define GST_PAD_ACTIVATEFUNC(pad) (GST_PAD_CAST(pad)->activatefunc) | |||
| #define GST_PAD_ACTIVATEPUSHFUNC(pad) (GST_PAD_CAST(pad)->activatepushfunc ) | #define GST_PAD_ACTIVATEPUSHFUNC(pad) (GST_PAD_CAST(pad)->activatepushfunc ) | |||
| #define GST_PAD_ACTIVATEPULLFUNC(pad) (GST_PAD_CAST(pad)->activatepullfunc ) | #define GST_PAD_ACTIVATEPULLFUNC(pad) (GST_PAD_CAST(pad)->activatepullfunc ) | |||
| #define GST_PAD_CHAINFUNC(pad) (GST_PAD_CAST(pad)->chainfunc) | #define GST_PAD_CHAINFUNC(pad) (GST_PAD_CAST(pad)->chainfunc) | |||
| #define GST_PAD_CHECKGETRANGEFUNC(pad) (GST_PAD_CAST(pad)->checkgetrangefun c) | #define GST_PAD_CHECKGETRANGEFUNC(pad) (GST_PAD_CAST(pad)->checkgetrangefun c) | |||
| #define GST_PAD_GETRANGEFUNC(pad) (GST_PAD_CAST(pad)->getrangefunc) | #define GST_PAD_GETRANGEFUNC(pad) (GST_PAD_CAST(pad)->getrangefunc) | |||
| #define GST_PAD_EVENTFUNC(pad) (GST_PAD_CAST(pad)->eventfunc) | #define GST_PAD_EVENTFUNC(pad) (GST_PAD_CAST(pad)->eventfunc) | |||
| #define GST_PAD_QUERYTYPEFUNC(pad) (GST_PAD_CAST(pad)->querytypefunc) | #define GST_PAD_QUERYTYPEFUNC(pad) (GST_PAD_CAST(pad)->querytypefunc) | |||
| #define GST_PAD_QUERYFUNC(pad) (GST_PAD_CAST(pad)->queryfunc) | #define GST_PAD_QUERYFUNC(pad) (GST_PAD_CAST(pad)->queryfunc) | |||
| #ifndef GST_DISABLE_DEPRECATED | ||||
| #define GST_PAD_INTLINKFUNC(pad) (GST_PAD_CAST(pad)->intlinkfunc) | #define GST_PAD_INTLINKFUNC(pad) (GST_PAD_CAST(pad)->intlinkfunc) | |||
| #endif | ||||
| #define GST_PAD_ITERINTLINKFUNC(pad) (GST_PAD_CAST(pad)->iterintlinkfunc ) | #define GST_PAD_ITERINTLINKFUNC(pad) (GST_PAD_CAST(pad)->iterintlinkfunc ) | |||
| #define GST_PAD_PEER(pad) (GST_PAD_CAST(pad)->peer) | #define GST_PAD_PEER(pad) (GST_PAD_CAST(pad)->peer) | |||
| #define GST_PAD_LINKFUNC(pad) (GST_PAD_CAST(pad)->linkfunc) | #define GST_PAD_LINKFUNC(pad) (GST_PAD_CAST(pad)->linkfunc) | |||
| #define GST_PAD_UNLINKFUNC(pad) (GST_PAD_CAST(pad)->unlinkfu nc) | #define GST_PAD_UNLINKFUNC(pad) (GST_PAD_CAST(pad)->unlinkfu nc) | |||
| /** | /** | |||
| * GST_PAD_CAPS: | * GST_PAD_CAPS: | |||
| * @pad: a #GstPad. | * @pad: a #GstPad. | |||
| * | * | |||
| skipping to change at line 835 | skipping to change at line 929 | |||
| GstFlowReturn gst_pad_alloc_buffer (GstPad *pad , guint64 offset, gint size, | GstFlowReturn gst_pad_alloc_buffer (GstPad *pad , guint64 offset, gint size, | |||
| GstCaps *ca ps, GstBuffer **buf); | GstCaps *ca ps, GstBuffer **buf); | |||
| GstFlowReturn gst_pad_alloc_buffer_and_set_caps (GstPad *pad , guint64 offset, gint size, | GstFlowReturn gst_pad_alloc_buffer_and_set_caps (GstPad *pad , guint64 offset, gint size, | |||
| GstCaps *ca ps, GstBuffer **buf); | GstCaps *ca ps, GstBuffer **buf); | |||
| /* data passing setup functions */ | /* data passing setup functions */ | |||
| void gst_pad_set_activate_function (GstPad *pad , GstPadActivateFunction activate); | void gst_pad_set_activate_function (GstPad *pad , GstPadActivateFunction activate); | |||
| void gst_pad_set_activatepull_function (GstPad *pad , GstPadActivateModeFunction activatepull); | void gst_pad_set_activatepull_function (GstPad *pad , GstPadActivateModeFunction activatepull); | |||
| void gst_pad_set_activatepush_function (GstPad *pad , GstPadActivateModeFunction activatepush); | 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_function (GstPad *pad , GstPadChainFunction chain); | |||
| void gst_pad_set_chain_list_function (GstPad *pad, GstPad ChainListFunction chainlist); | ||||
| void gst_pad_set_getrange_function (GstPad *pad , GstPadGetRangeFunction get); | void gst_pad_set_getrange_function (GstPad *pad , GstPadGetRangeFunction get); | |||
| void gst_pad_set_checkgetrange_function (GstPad *pad , GstPadCheckGetRangeFunction check); | void gst_pad_set_checkgetrange_function (GstPad *pad , GstPadCheckGetRangeFunction check); | |||
| void gst_pad_set_event_function (GstPad *pad , GstPadEventFunction event); | void gst_pad_set_event_function (GstPad *pad , GstPadEventFunction event); | |||
| /* pad links */ | /* pad links */ | |||
| void gst_pad_set_link_function (GstPad *pad , GstPadLinkFunction link); | void gst_pad_set_link_function (GstPad *pad , GstPadLinkFunction link); | |||
| void gst_pad_set_unlink_function (GstPad *pad , GstPadUnlinkFunction unlink); | void gst_pad_set_unlink_function (GstPad *pad , GstPadUnlinkFunction unlink); | |||
| gboolean gst_pad_can_link (GstPad *sr cpad, GstPad *sinkpad); | gboolean gst_pad_can_link (GstPad *sr cpad, GstPad *sinkpad); | |||
| GstPadLinkReturn gst_pad_link (GstPad *src pad, GstPad *sinkpad); | GstPadLinkReturn gst_pad_link (GstPad *src pad, GstPad *sinkpad); | |||
| GstPadLinkReturn gst_pad_link_full (GstPad *src pad, GstPad *sinkpad, GstPadLinkCheck flags); | ||||
| gboolean gst_pad_unlink (GstPad *src pad, GstPad *sinkpad); | gboolean gst_pad_unlink (GstPad *src pad, GstPad *sinkpad); | |||
| gboolean gst_pad_is_linked (GstPad *pad ); | gboolean gst_pad_is_linked (GstPad *pad ); | |||
| GstPad* gst_pad_get_peer (Gst Pad *pad); | GstPad* gst_pad_get_peer (Gst Pad *pad); | |||
| /* capsnego functions */ | /* capsnego functions */ | |||
| void gst_pad_set_getcaps_function (GstPad *pad , GstPadGetCapsFunction getcaps); | void gst_pad_set_getcaps_function (GstPad *pad , GstPadGetCapsFunction getcaps); | |||
| void gst_pad_set_acceptcaps_function (GstPad *pad , GstPadAcceptCapsFunction acceptcaps); | void gst_pad_set_acceptcaps_function (GstPad *pad , GstPadAcceptCapsFunction acceptcaps); | |||
| void gst_pad_set_fixatecaps_function (GstPad *pad , GstPadFixateCapsFunction fixatecaps); | void gst_pad_set_fixatecaps_function (GstPad *pad , GstPadFixateCapsFunction fixatecaps); | |||
| void gst_pad_set_setcaps_function (GstPad *pad , GstPadSetCapsFunction setcaps); | void gst_pad_set_setcaps_function (GstPad *pad , GstPadSetCapsFunction setcaps); | |||
| G_CONST_RETURN GstCaps* gst_pad_get_pad_template_caps (Gst Pad *pad); | G_CONST_RETURN GstCaps* gst_pad_get_pad_template_caps (Gst Pad *pad); | |||
| /* capsnego function for linked/unlinked pads */ | /* capsnego function for linked/unlinked pads */ | |||
| GstCaps * gst_pad_get_caps_reffed (GstPad * pa d); | ||||
| GstCaps * gst_pad_get_caps (GstPad * pa d); | GstCaps * gst_pad_get_caps (GstPad * pa d); | |||
| void gst_pad_fixate_caps (GstPad * pa d, GstCaps *caps); | void gst_pad_fixate_caps (GstPad * pa d, GstCaps *caps); | |||
| gboolean gst_pad_accept_caps (GstPad * pa d, GstCaps *caps); | gboolean gst_pad_accept_caps (GstPad * pa d, GstCaps *caps); | |||
| gboolean gst_pad_set_caps (GstPad * pa d, GstCaps *caps); | gboolean gst_pad_set_caps (GstPad * pa d, GstCaps *caps); | |||
| GstCaps * gst_pad_peer_get_caps_reffed (GstPad * pa d); | ||||
| GstCaps * gst_pad_peer_get_caps (GstPad * pa d); | GstCaps * gst_pad_peer_get_caps (GstPad * pa d); | |||
| gboolean gst_pad_peer_accept_caps (GstPad * pa d, GstCaps *caps); | gboolean gst_pad_peer_accept_caps (GstPad * pa d, GstCaps *caps); | |||
| /* capsnego for linked pads */ | /* capsnego for linked pads */ | |||
| GstCaps * gst_pad_get_allowed_caps (GstPad * pa d); | GstCaps * gst_pad_get_allowed_caps (GstPad * pa d); | |||
| GstCaps * gst_pad_get_negotiated_caps (GstPad * pa d); | GstCaps * gst_pad_get_negotiated_caps (GstPad * pa d); | |||
| /* data passing functions to peer */ | /* data passing functions to peer */ | |||
| GstFlowReturn gst_pad_push (GstPad *pad , GstBuffer *buffer); | 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 ); | gboolean gst_pad_check_pull_range (GstPad *pad ); | |||
| GstFlowReturn gst_pad_pull_range (GstPad *pad , guint64 offset, guint size, | GstFlowReturn gst_pad_pull_range (GstPad *pad , guint64 offset, guint size, | |||
| GstBuffer * *buffer); | GstBuffer * *buffer); | |||
| gboolean gst_pad_push_event (GstPad *pad , GstEvent *event); | gboolean gst_pad_push_event (GstPad *pad , GstEvent *event); | |||
| gboolean gst_pad_event_default (GstPad *pad , GstEvent *event); | gboolean gst_pad_event_default (GstPad *pad , GstEvent *event); | |||
| /* data passing functions on pad */ | /* data passing functions on pad */ | |||
| GstFlowReturn gst_pad_chain (GstPad *pad , GstBuffer *buffer); | 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, | GstFlowReturn gst_pad_get_range (GstPad *pad , guint64 offset, guint size, | |||
| GstBuffer * *buffer); | GstBuffer * *buffer); | |||
| gboolean gst_pad_send_event (GstPad *pad , GstEvent *event); | gboolean gst_pad_send_event (GstPad *pad , GstEvent *event); | |||
| /* pad tasks */ | /* pad tasks */ | |||
| gboolean gst_pad_start_task (GstPad *pad , GstTaskFunction func, | gboolean gst_pad_start_task (GstPad *pad , GstTaskFunction func, | |||
| gpointer da ta); | gpointer da ta); | |||
| gboolean gst_pad_pause_task (GstPad *pad ); | gboolean gst_pad_pause_task (GstPad *pad ); | |||
| gboolean gst_pad_stop_task (GstPad *pad ); | gboolean gst_pad_stop_task (GstPad *pad ); | |||
| /* internal links */ | /* internal links */ | |||
| #ifndef GST_DISABLE_DEPRECATED | ||||
| void gst_pad_set_internal_link_function (GstPad *pad , GstPadIntLinkFunction intlink); | 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 (GstPad *pad ); | |||
| GList* gst_pad_get_internal_links_default (GstPad *pad ); | GList* gst_pad_get_internal_links_default (GstPad *pad ); | |||
| #endif | ||||
| void gst_pad_set_iterate_internal_links_function (GstPad * pad, | void gst_pad_set_iterate_internal_links_function (GstPad * pad, | |||
| GstPadIter IntLinkFunction iterintlink); | GstPadIter IntLinkFunction iterintlink); | |||
| GstIterator * gst_pad_iterate_internal_links (GstPad * p ad); | GstIterator * gst_pad_iterate_internal_links (GstPad * p ad); | |||
| GstIterator * gst_pad_iterate_internal_links_default (GstPad * p ad); | GstIterator * gst_pad_iterate_internal_links_default (GstPad * p ad); | |||
| /* generic query function */ | /* generic query function */ | |||
| void gst_pad_set_query_type_function (GstPad *pad , GstPadQueryTypeFunction type_func); | void gst_pad_set_query_type_function (GstPad *pad , GstPadQueryTypeFunction type_func); | |||
| G_CONST_RETURN GstQueryType* | G_CONST_RETURN GstQueryType* | |||
| gst_pad_get_query_types (GstPad *pad ); | gst_pad_get_query_types (GstPad *pad ); | |||
| skipping to change at line 917 | skipping to change at line 1019 | |||
| gboolean gst_pad_query (GstPad *pad , GstQuery *query); | gboolean gst_pad_query (GstPad *pad , GstQuery *query); | |||
| gboolean gst_pad_peer_query (GstPad *pad , GstQuery *query); | gboolean gst_pad_peer_query (GstPad *pad , GstQuery *query); | |||
| void gst_pad_set_query_function (GstPad *pad , GstPadQueryFunction query); | void gst_pad_set_query_function (GstPad *pad , GstPadQueryFunction query); | |||
| gboolean gst_pad_query_default (GstPad *pad , GstQuery *query); | gboolean gst_pad_query_default (GstPad *pad , GstQuery *query); | |||
| /* misc helper functions */ | /* misc helper functions */ | |||
| gboolean gst_pad_dispatcher (GstPad *pad , GstPadDispatcherFunction dispatch, | gboolean gst_pad_dispatcher (GstPad *pad , GstPadDispatcherFunction dispatch, | |||
| gpointer da ta); | gpointer da ta); | |||
| #ifndef GST_DISABLE_LOADSAVE | #if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_DISABLE_DEPRECATED) | |||
| void gst_pad_load_and_link (xmlNodePtr self, GstObject *parent); | void gst_pad_load_and_link (xmlNodePtr self, GstObject *parent); | |||
| #endif | #endif | |||
| G_END_DECLS | G_END_DECLS | |||
| #endif /* __GST_PAD_H__ */ | #endif /* __GST_PAD_H__ */ | |||
| End of changes. 32 change blocks. | ||||
| 13 lines changed or deleted | 137 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||