GstPad

Name

GstPad -- The connection between Elements

Synopsis


#include <gst/gst.h>


#define     GST_PAD_NAME                    (pad)
#define     GST_PAD_ELEMENT_PRIVATE         (pad)
#define     GST_PAD_PARENT                  (pad)
#define     GST_PAD_PADTEMPLATE             (pad)
#define     GST_PAD_REALIZE                 (pad)
#define     GST_PAD_DIRECTION               (pad)
#define     GST_PAD_CAPS                    (pad)
#define     GST_PAD_PEER                    (pad)
#define     GST_PAD_CAN_PULL                (pad)
#define     GST_PAD_IS_SINK                 (pad)
#define     GST_PAD_IS_SRC                  (pad)
#define     GST_PAD_IS_CONNECTED            (pad)
struct      GstPad;
void        (*GstPadChainFunction)          (GstPad *pad,
                                             GstBuffer *buf);
GstBuffer*  (*GstPadGetFunction)            (GstPad *pad);
GstBuffer*  (*GstPadGetRegionFunction)      (GstPad *pad,
                                             GstRegionType type,
                                             guint64 offset,
                                             guint64 len);
GstBufferPool* (*GstPadBufferPoolFunction)  (GstPad *pad);
GstCaps*    (*GstPadGetCapsFunction)        (GstPad *pad,
                                             GstCaps *caps);
enum        GstRegionType;
GstBuffer*  (*GstPadPullRegionFunction)     (GstPad *pad,
                                             GstRegionType type,
                                             guint64 offset,
                                             guint64 len);
gboolean    (*GstPadEventFunction)          (GstPad *pad,
                                             GstEvent *event);
GstPadConnectReturn (*GstPadConnectFunction)
                                            (GstPad *pad,
                                             GstCaps *caps);
enum        GstPadConnectReturn;
enum        GstPadDirection;
enum        GstPadFlags;
GstPad*     gst_pad_new                     (gchar *name,
                                             GstPadDirection direction);
#define     gst_pad_destroy                 (pad)
GstPad*     gst_pad_new_from_template       (GstPadTemplate *templ,
                                             gchar *name);
GstPadDirection gst_pad_get_direction       (GstPad *pad);
void        gst_pad_set_chain_function      (GstPad *pad,
                                             GstPadChainFunction chain);
void        gst_pad_set_get_function        (GstPad *pad,
                                             GstPadGetFunction get);
void        gst_pad_set_getregion_function  (GstPad *pad,
                                             GstPadGetRegionFunction getregion);
void        gst_pad_set_bufferpool_function (GstPad *pad,
                                             GstPadBufferPoolFunction bufpool);
void        gst_pad_set_connect_function    (GstPad *pad,
                                             GstPadConnectFunction connect);
void        gst_pad_set_getcaps_function    (GstPad *pad,
                                             GstPadGetCapsFunction getcaps);
gboolean    gst_pad_try_set_caps            (GstPad *pad,
                                             GstCaps *caps);
GstCaps*    gst_pad_get_caps                (GstPad *pad);
gboolean    gst_pad_check_compatibility     (GstPad *srcpad,
                                             GstPad *sinkpad);
void        gst_pad_set_name                (GstPad *pad,
                                             const gchar *name);
const gchar* gst_pad_get_name               (GstPad *pad);
void        gst_pad_set_element_private     (GstPad *pad,
                                             gpointer priv);
gpointer    gst_pad_get_element_private     (GstPad *pad);
void        gst_pad_set_parent              (GstPad *pad,
                                             GstObject *parent);
GstElement* gst_pad_get_parent              (GstPad *pad);
GstScheduler* gst_pad_get_sched             (GstPad *pad);
void        gst_pad_set_sched               (GstPad *pad,
                                             GstScheduler *sched);
GstElement* gst_pad_get_real_parent         (GstPad *pad);
void        gst_pad_add_ghost_pad           (GstPad *pad,
                                             GstPad *ghostpad);
void        gst_pad_remove_ghost_pad        (GstPad *pad,
                                             GstPad *ghostpad);
GList*      gst_pad_get_ghost_pad_list      (GstPad *pad);
GstPad*     gst_pad_get_peer                (GstPad *pad);
gboolean    gst_pad_connect                 (GstPad *srcpad,
                                             GstPad *sinkpad);
gboolean    gst_pad_connect_filtered        (GstPad *srcpad,
                                             GstPad *sinkpad,
                                             GstCaps *filtercaps);
gboolean    gst_pad_reconnect_filtered      (GstPad *srcpad,
                                             GstPad *sinkpad,
                                             GstCaps *filtercaps);
gboolean    gst_pad_try_reconnect_filtered  (GstPad *srcpad,
                                             GstPad *sinkpad,
                                             GstCaps *filtercaps);
void        gst_pad_disconnect              (GstPad *srcpad,
                                             GstPad *sinkpad);
void        gst_pad_push                    (GstPad *pad,
                                             GstBuffer *buf);
GstBuffer*  gst_pad_pull                    (GstPad *pad);
GstBuffer*  gst_pad_pullregion              (GstPad *pad,
                                             GstRegionType type,
                                             guint64 offset,
                                             guint64 len);
GstBufferPool* gst_pad_get_bufferpool       (GstPad *pad);
void        gst_pad_load_and_connect        (xmlNodePtr self,
                                             GstObject *parent);
GstPadConnectReturn gst_pad_proxy_connect   (GstPad *pad,
                                             GstCaps *caps);
GstPadTemplate* gst_pad_get_padtemplate     (GstPad *pad);
GstCaps*    gst_pad_get_padtemplate_caps    (GstPad *pad);
GstCaps*    gst_pad_get_allowed_caps        (GstPad *pad);
gboolean    gst_pad_recalc_allowed_caps     (GstPad *pad);
xmlNodePtr  gst_pad_ghost_save_thyself      (GstPad *pad,
                                             GstElement *bin,
                                             xmlNodePtr parent);
GstBuffer*  gst_pad_peek                    (GstPad *pad);
GstPad*     gst_pad_select                  (GList *padlist);
GstPad*     gst_pad_selectv                 (GstPad *pad,
                                             ...);
gboolean    gst_pad_send_event              (GstPad *pad,
                                             GstEvent *event);
void        gst_pad_event_default           (GstPad *pad,
                                             GstEvent *event);
void        gst_pad_set_event_function      (GstPad *pad,
                                             GstPadEventFunction event);
struct      GstRealPad;
#define     GST_RPAD_LEN                    (pad)
#define     GST_RPAD_OFFSET                 (pad)
#define     GST_RPAD_SCHED                  (pad)
#define     GST_RPAD_REGIONTYPE             (pad)
#define     GST_RPAD_DIRECTION              (pad)
#define     GST_RPAD_CAPS                   (pad)
#define     GST_RPAD_PEER                   (pad)
#define     GST_RPAD_BUFPEN                 (pad)
#define     GST_RPAD_CHAINFUNC              (pad)
#define     GST_RPAD_FILTER                 (pad)
#define     GST_RPAD_APPFILTER              (pad)
#define     GST_RPAD_GETFUNC                (pad)
#define     GST_RPAD_GETREGIONFUNC          (pad)
#define     GST_RPAD_PULLREGIONFUNC         (pad)
#define     GST_RPAD_BUFFERPOOLFUNC         (pad)
#define     GST_RPAD_CHAINHANDLER           (pad)
#define     GST_RPAD_EVENTFUNC              (pad)
#define     GST_RPAD_EVENTHANDLER           (pad)
#define     GST_RPAD_GETHANDLER             (pad)
#define     GST_RPAD_CONNECTFUNC            (pad)
#define     GST_RPAD_GETCAPSFUNC            (pad)
#define     GST_GPAD_REALPAD                (pad)
struct      GstGhostPad;
GstPad*     gst_ghost_pad_new               (gchar *name,
                                             GstPad *pad);

Object Hierarchy


  GObject
   +----GstObject
         +----GstPad

Description

GstElement are connected to each other via "pads", which are extremely light-weight generic connections. After two pad are retrieved from an element with gst_element_get_pad(), the pads can be connected with gst_pad_connect().

Pads are typically created from a GstPadTemplate with gst_pad_new_from_template().

Pad have GstCaps attached to it to describe the media type they are capable of dealing with. gst_pad_get_caps() and gst_pad_set_caps() are used to manipulate the caps of the pads. Pads created from a padtemplate cannot set capabilities that are incompatible with the padtemplates capabilities.

Pads without padtemplates can be created with gst_pad_new() which takes a direction and a name as an argument.

gst_pad_get_parent() will retrieve the GstElement that owns the pad.

GstElements creating a pad will typicilally use the various gst_pad_set_*_function() calls to register callbacks for various events on the pads.

GstElements will use gst_pad_push() and gst_pad_pull() to push out or pull a buffer in. The gst_pad_pullregion() function can be used to request for a buffer with a specific offset (in time or in bytes). gst_pad_select() and gst_pad_selectv() are use by plugins to wait on a set of pads for a new GstBuffer or GstEvent.

To send an event on a pad, use gst_pad_send_event().

Details

GST_PAD_NAME()

#define GST_PAD_NAME(pad)		(GST_OBJECT_NAME(pad))

Get the name of the pad.

pad :the pad to query


GST_PAD_ELEMENT_PRIVATE()

#define GST_PAD_ELEMENT_PRIVATE(pad)	(((GstPad *)(pad))->element_private)

Get the private data set by the element that owns the pad.

pad :the pad to query


GST_PAD_PARENT()

#define GST_PAD_PARENT(pad)		((GstElement *)(GST_OBJECT_PARENT(pad)))

Get the parent element of this pad.

pad :the pad to query


GST_PAD_PADTEMPLATE()

#define GST_PAD_PADTEMPLATE(pad)	(((GstPad *)(pad))->padtemplate)

Get the padtemplate that was used to create this pad. NULL if no padtemplate was used.

pad :the pad to query


GST_PAD_REALIZE()

#define GST_PAD_REALIZE(pad)		(GST_IS_REAL_PAD(pad) ? ((GstRealPad *)(pad)) : GST_GPAD_REALPAD(pad))

Return the real pad of this pad.

pad :the pad to query


GST_PAD_DIRECTION()

#define GST_PAD_DIRECTION(pad)		GST_RPAD_DIRECTION(GST_PAD_REALIZE(pad))

Get the pad direction.

pad :the pad to query


GST_PAD_CAPS()

#define GST_PAD_CAPS(pad)		GST_RPAD_CAPS(GST_PAD_REALIZE(pad))

Get the capabilities of a pad.

pad :the pad to query


GST_PAD_PEER()

#define GST_PAD_PEER(pad)		GST_PAD_CAST(GST_RPAD_PEER(GST_PAD_REALIZE(pad)))

Get the peerpad of this pad.

pad :the pad to query


GST_PAD_CAN_PULL()

#define GST_PAD_CAN_PULL(pad)		(GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->gethandler != NULL)

Can this pad be used to pull a buffer.

pad :the pad to check


GST_PAD_IS_SINK()

#define GST_PAD_IS_SINK(pad)		(GST_PAD_DIRECTION(pad) == GST_PAD_SINK)

pad : 


GST_PAD_IS_SRC()

#define GST_PAD_IS_SRC(pad)		(GST_PAD_DIRECTION(pad) == GST_PAD_SRC)

pad : 


GST_PAD_IS_CONNECTED()

#define GST_PAD_IS_CONNECTED(pad)	(GST_PAD_PEER(pad) != NULL)

pad : 


struct GstPad

struct GstPad;


GstPadChainFunction ()

void        (*GstPadChainFunction)          (GstPad *pad,
                                             GstBuffer *buf);

The function that will be called when chaining buffers.

pad :the pad that performed the chain
buf :the buffer that is chained


GstPadGetFunction ()

GstBuffer*  (*GstPadGetFunction)            (GstPad *pad);

The function that will be called when pulling a buffer.

pad :the pad to get a buffer from
Returns :a GstBuffer


GstPadGetRegionFunction ()

GstBuffer*  (*GstPadGetRegionFunction)      (GstPad *pad,
                                             GstRegionType type,
                                             guint64 offset,
                                             guint64 len);

The function that will be called when pulling a region buffer. You can specify which buffer to get using an offset/length pair or a start/stop timecode pair.

pad :the pad to get a buffer from
type :the type of region to get (time or offset based)
offset :the offset of the region to get
len :the length of the region to get
Returns :a GstBuffer


GstPadBufferPoolFunction ()

GstBufferPool* (*GstPadBufferPoolFunction)  (GstPad *pad);

The function that will be called when a bufferpool is requested from this pad.

pad :the pad with the bufferpool
Returns :the GstBufferPool associated with this pad.


GstPadGetCapsFunction ()

GstCaps*    (*GstPadGetCapsFunction)        (GstPad *pad,
                                             GstCaps *caps);

pad : 
caps : 
Returns : 


enum GstRegionType

typedef enum {
  GST_REGION_VOID,
  GST_REGION_OFFSET_LEN,
  GST_REGION_TIME_LEN,
} GstRegionType;

the region types for gst_pad_pullregion.

GST_REGION_VOID 
GST_REGION_OFFSET_LENan offet/length pair
GST_REGION_TIME_LENa time start/length pair


GstPadPullRegionFunction ()

GstBuffer*  (*GstPadPullRegionFunction)     (GstPad *pad,
                                             GstRegionType type,
                                             guint64 offset,
                                             guint64 len);

The function that will be called when pulling a region buffer. You can specify which buffer to get using an offset/length pair or a start/stop timecode pair.

pad :the pad to get a buffer from
type :the type of region to get (time or offset based)
offset :the offset of the region to get
len :the length of the region to get
Returns :a GstBuffer


GstPadEventFunction ()

gboolean    (*GstPadEventFunction)          (GstPad *pad,
                                             GstEvent *event);

pad : 
event : 
Returns : 


GstPadConnectFunction ()

GstPadConnectReturn (*GstPadConnectFunction)
                                            (GstPad *pad,
                                             GstCaps *caps);

pad : 
caps : 
Returns : 


enum GstPadConnectReturn

typedef enum {
  GST_PAD_CONNECT_REFUSED = 0,
  GST_PAD_CONNECT_OK      = 1,
  GST_PAD_CONNECT_DONE    = 2,
  GST_PAD_CONNECT_DELAYED = 3,
} GstPadConnectReturn;


enum GstPadDirection

typedef enum {
  GST_PAD_UNKNOWN,
  GST_PAD_SRC,
  GST_PAD_SINK,
} GstPadDirection;

The direction this pad is.

GST_PAD_UNKNOWNdirection is unknown
GST_PAD_SRCthis is a source pad
GST_PAD_SINKthis is a sink pad


enum GstPadFlags

typedef enum {
  GST_PAD_DISABLED		= GST_OBJECT_FLAG_LAST,
  GST_PAD_EOS,

  GST_PAD_FLAG_LAST		= GST_OBJECT_FLAG_LAST + 4,
} GstPadFlags;

Flags for the pad.

GST_PAD_DISABLEDthe pad is disabled
GST_PAD_EOSthe pad is in end of stream state
GST_PAD_FLAG_LASTsubclasses can use this number to enumerate their flags


gst_pad_new ()

GstPad*     gst_pad_new                     (gchar *name,
                                             GstPadDirection direction);

Create a new pad with given name.

name : name of new pad
direction : either GST_PAD_SRC or GST_PAD_SINK
Returns : new pad


gst_pad_destroy()

#define			gst_pad_destroy(pad)			gst_object_destroy (GST_OBJECT (pad))

Destroy the pad.

pad :the pad to destroy


gst_pad_new_from_template ()

GstPad*     gst_pad_new_from_template       (GstPadTemplate *templ,
                                             gchar *name);

Create a new pad with given name from the given template.

templ : the pad template to use
name : the name of the element
Returns : new pad


gst_pad_get_direction ()

GstPadDirection gst_pad_get_direction       (GstPad *pad);

Get the direction of the pad.

pad : the Pad to get the direction from
Returns : the direction of the pad


gst_pad_set_chain_function ()

void        gst_pad_set_chain_function      (GstPad *pad,
                                             GstPadChainFunction chain);

Set the given chain function for the pad.

pad : the pad to set the chain function for
chain : the chain function


gst_pad_set_get_function ()

void        gst_pad_set_get_function        (GstPad *pad,
                                             GstPadGetFunction get);

Set the given get function for the pad.

pad : the pad to set the get function for
get : the get function


gst_pad_set_getregion_function ()

void        gst_pad_set_getregion_function  (GstPad *pad,
                                             GstPadGetRegionFunction getregion);

Set the given getregion function for the pad.

pad : the pad to set the getregion function for
getregion : the getregion function


gst_pad_set_bufferpool_function ()

void        gst_pad_set_bufferpool_function (GstPad *pad,
                                             GstPadBufferPoolFunction bufpool);

Set the given bufferpool function for the pad.

pad : the pad to set the bufferpool function for
bufpool : the bufferpool function


gst_pad_set_connect_function ()

void        gst_pad_set_connect_function    (GstPad *pad,
                                             GstPadConnectFunction connect);

Set the given connect function for the pad. It will be called when the pad is connected or reconnected with caps.

pad : the pad to set the connect function for
connect : the connect function


gst_pad_set_getcaps_function ()

void        gst_pad_set_getcaps_function    (GstPad *pad,
                                             GstPadGetCapsFunction getcaps);

Set the given getcaps function for the pad.

pad : the pad to set the getcaps function for
getcaps : the getcaps function


gst_pad_try_set_caps ()

gboolean    gst_pad_try_set_caps            (GstPad *pad,
                                             GstCaps *caps);

Try to set the caps on the given pad.

pad : the pad to try to set the caps on
caps : the caps to set
Returns : TRUE if the caps could be set


gst_pad_get_caps ()

GstCaps*    gst_pad_get_caps                (GstPad *pad);

Get the capabilities of this pad.

pad : the pad to get the capabilities from
Returns : the capabilities of this pad


gst_pad_check_compatibility ()

gboolean    gst_pad_check_compatibility     (GstPad *srcpad,
                                             GstPad *sinkpad);

Check if two pads have compatible capabilities.

srcpad : the srcpad to check
sinkpad : the sinkpad to check against
Returns : TRUE if they are compatible or the capabilities could not be checked


gst_pad_set_name ()

void        gst_pad_set_name                (GstPad *pad,
                                             const gchar *name);

Set the name of a pad.

pad : the pad to set the name of
name : the name of the pad


gst_pad_get_name ()

const gchar* gst_pad_get_name               (GstPad *pad);

Get the name of a pad.

pad : the pad to get the name of
Returns : the name of the pad, don't free.


gst_pad_set_element_private ()

void        gst_pad_set_element_private     (GstPad *pad,
                                             gpointer priv);

Set the given private data pointer to the pad. This function can only be used by the element that own the pad.

pad : the pad to set the private data to
priv : The private data to attach to the pad


gst_pad_get_element_private ()

gpointer    gst_pad_get_element_private     (GstPad *pad);

Get the private data of a pad. The private data can only be set by the parent element of this pad.

pad : the pad to get the private data of
Returns : a pointer to the private data.


gst_pad_set_parent ()

void        gst_pad_set_parent              (GstPad *pad,
                                             GstObject *parent);

Sets the parent object of a pad.

pad : the pad to set the parent
parent : the object to set the parent to


gst_pad_get_parent ()

GstElement* gst_pad_get_parent              (GstPad *pad);

Get the parent object of this pad.

pad : the pad to get the parent from
Returns : the parent object


gst_pad_get_sched ()

GstScheduler* gst_pad_get_sched             (GstPad *pad);

Get the scheduler of the pad

pad : the pad to get the scheduler from
Returns : the scheduler of the pad.


gst_pad_set_sched ()

void        gst_pad_set_sched               (GstPad *pad,
                                             GstScheduler *sched);

Set the scheduler for the pad

pad : the pad to set the scheduler for
sched : The scheduler to set


gst_pad_get_real_parent ()

GstElement* gst_pad_get_real_parent         (GstPad *pad);

Get the real parent object of this pad. If the pad is a ghostpad, the actual owner of the real pad is returned, as opposed to the gst_pad_get_parent().

pad : the pad to get the parent from
Returns : the parent object


gst_pad_add_ghost_pad ()

void        gst_pad_add_ghost_pad           (GstPad *pad,
                                             GstPad *ghostpad);

Add a ghost pad to a pad.

pad : the pad to set the ghost parent
ghostpad : the ghost pad to add


gst_pad_remove_ghost_pad ()

void        gst_pad_remove_ghost_pad        (GstPad *pad,
                                             GstPad *ghostpad);

Remove a ghost pad from a pad.

pad : the pad to remove the ghost parent
ghostpad : the ghost pad to remove from the pad


gst_pad_get_ghost_pad_list ()

GList*      gst_pad_get_ghost_pad_list      (GstPad *pad);

Get the ghost parents of this pad.

pad : the pad to get the ghost parents from
Returns : a GList of ghost pads


gst_pad_get_peer ()

GstPad*     gst_pad_get_peer                (GstPad *pad);

Get the peer pad of this pad.

pad : the pad to get the peer from
Returns : the peer pad


gst_pad_connect ()

gboolean    gst_pad_connect                 (GstPad *srcpad,
                                             GstPad *sinkpad);

Connects the source pad to the sink pad.

srcpad : the source pad to connect
sinkpad : the sink pad to connect
Returns : TRUE if the pad could be connected, FALSE otherwise


gst_pad_connect_filtered ()

gboolean    gst_pad_connect_filtered        (GstPad *srcpad,
                                             GstPad *sinkpad,
                                             GstCaps *filtercaps);

Connects the source pad to the sink pad. The filter indicates the media type that should flow trought this connection.

srcpad : the source pad to connect
sinkpad : the sink pad to connect
filtercaps : the filter caps.
Returns : TRUE if the pad could be connected, FALSE otherwise


gst_pad_reconnect_filtered ()

gboolean    gst_pad_reconnect_filtered      (GstPad *srcpad,
                                             GstPad *sinkpad,
                                             GstCaps *filtercaps);

Try to reconnect this pad and its peer with the specified caps.

srcpad : 
sinkpad : 
filtercaps : 
Returns : a boolean indicating the peer pad could accept the caps. if FALSE is returned, the pads are disconnected.


gst_pad_try_reconnect_filtered ()

gboolean    gst_pad_try_reconnect_filtered  (GstPad *srcpad,
                                             GstPad *sinkpad,
                                             GstCaps *filtercaps);

Try to reconnect this pad and its peer with the specified caps

srcpad : 
sinkpad : 
filtercaps : 
Returns : a boolean indicating the peer pad could accept the caps.


gst_pad_disconnect ()

void        gst_pad_disconnect              (GstPad *srcpad,
                                             GstPad *sinkpad);

Disconnects the source pad from the sink pad.

srcpad : the source pad to disconnect
sinkpad : the sink pad to disconnect


gst_pad_push ()

void        gst_pad_push                    (GstPad *pad,
                                             GstBuffer *buf);

Push a buffer to the peer of the pad.

pad : the pad to push
buf : the buffer to push


gst_pad_pull ()

GstBuffer*  gst_pad_pull                    (GstPad *pad);

Pull a buffer from the peer pad.

pad : the pad to pull
Returns : a new buffer from the peer pad.


gst_pad_pullregion ()

GstBuffer*  gst_pad_pullregion              (GstPad *pad,
                                             GstRegionType type,
                                             guint64 offset,
                                             guint64 len);

Pull a buffer region from the peer pad. The region to pull can be specified with a offset/lenght pair or with a start/legnth time indicator as specified by the type parameter.

pad : the pad to pull the region from
type : the regiontype
offset : the offset/start of the buffer to pull
len : the length of the buffer to pull
Returns : a new buffer from the peer pad with data in the specified region.


gst_pad_get_bufferpool ()

GstBufferPool* gst_pad_get_bufferpool       (GstPad *pad);

Get the bufferpool of the peer pad of the given pad.

pad : the pad to get the bufferpool from
Returns : The GstBufferPool or NULL.


gst_pad_load_and_connect ()

void        gst_pad_load_and_connect        (xmlNodePtr self,
                                             GstObject *parent);

Read the pad definition from the XML node and connect the given pad in element to a pad of an element up in the hierarchy.

self : the XML node to read the description from
parent : the element that has the pad


gst_pad_proxy_connect ()

GstPadConnectReturn gst_pad_proxy_connect   (GstPad *pad,
                                             GstCaps *caps);

Proxy the connect function to the specified pad.

pad : the pad to proxy to
caps : the capabilities to use in the proxying
Returns : a boolean indicating the peer pad could accept the caps.


gst_pad_get_padtemplate ()

GstPadTemplate* gst_pad_get_padtemplate     (GstPad *pad);

Get the padtemplate object of this pad.

pad : the pad to get the padtemplate from
Returns : the padtemplate object


gst_pad_get_padtemplate_caps ()

GstCaps*    gst_pad_get_padtemplate_caps    (GstPad *pad);

Get the capabilities of this pad.

pad : the pad to get the capabilities from
Returns : a list of the capabilities of this pad


gst_pad_get_allowed_caps ()

GstCaps*    gst_pad_get_allowed_caps        (GstPad *pad);

Get the caps of the allowed media types that can go through this pad.

pad : the pad to get the allowed caps from
Returns : the allowed caps, newly allocated


gst_pad_recalc_allowed_caps ()

gboolean    gst_pad_recalc_allowed_caps     (GstPad *pad);

pad : 
Returns : 


gst_pad_ghost_save_thyself ()

xmlNodePtr  gst_pad_ghost_save_thyself      (GstPad *pad,
                                             GstElement *bin,
                                             xmlNodePtr parent);

Saves the ghost pad into an xml representation.

pad : the pad to save
bin : the bin
parent : the parent XML node to save the description in
Returns : the xml representation of the pad


gst_pad_peek ()

GstBuffer*  gst_pad_peek                    (GstPad *pad);

Peek for a buffer from the peer pad.

pad : the pad to peek
Returns : a from the peer pad or NULL if the peer has no buffer.


gst_pad_select ()

GstPad*     gst_pad_select                  (GList *padlist);

Wait for a buffer on the list of pads.

padlist : A list of pads
Returns : The pad that has a buffer available, use gst_pad_pull to get the buffer.


gst_pad_selectv ()

GstPad*     gst_pad_selectv                 (GstPad *pad,
                                             ...);

Wait for a buffer on the given of pads.

pad : The first pad to perform the select on
... : More pads
Returns : The pad that has a buffer available, use gst_pad_pull to get the buffer.


gst_pad_send_event ()

gboolean    gst_pad_send_event              (GstPad *pad,
                                             GstEvent *event);

Send the event to the pad.

pad : the pad to send the event to
event : the event to send to the pad.
Returns : TRUE if the event was handled.


gst_pad_event_default ()

void        gst_pad_event_default           (GstPad *pad,
                                             GstEvent *event);

Invoke the default event handler for the given pad.

pad : the pad to operate on
event : the event to handle


gst_pad_set_event_function ()

void        gst_pad_set_event_function      (GstPad *pad,
                                             GstPadEventFunction event);

Set the given event handler for the pad.

pad : the pad to set the event handler for
event : the event handler


struct GstRealPad

struct GstRealPad {
  GstPad 			pad;

  GstCaps 			*caps;
  GstCaps 			*filter;
  GstCaps 			*appfilter;
  GstPadDirection 		direction;

  GstScheduler			*sched;
  gpointer			sched_private;

  GstRealPad 			*peer;

  GstBuffer 			*bufpen;
  GstRegionType 		regiontype;
  guint64 			offset;
  guint64 			len;

  GstPadChainFunction 		chainfunc;
  GstPadChainFunction 		chainhandler;
  GstPadGetFunction 		getfunc;
  GstPadGetFunction		gethandler;

  GstPadEventFunction		eventfunc;
  GstPadEventFunction		eventhandler;

  GstPadGetRegionFunction 	getregionfunc;
  GstPadPullRegionFunction 	pullregionfunc;

  GstPadGetCapsFunction 	getcapsfunc;
  GstPadConnectFunction 	connectfunc;
  GstPadBufferPoolFunction 	bufferpoolfunc;

  GList *ghostpads;
};


GST_RPAD_LEN()

#define GST_RPAD_LEN(pad)		(((GstRealPad *)(pad))->len)

Get the length of the region that is being pulled.

pad :the real pad to query.


GST_RPAD_OFFSET()

#define GST_RPAD_OFFSET(pad)		(((GstRealPad *)(pad))->offset)

Get the offset of the region that is being pulled.

pad :the real pad to query.


GST_RPAD_SCHED()

#define GST_RPAD_SCHED(pad)		(((GstRealPad *)(pad))->sched)

Get the scheduler of this real pad.

pad :the real pad to query.


GST_RPAD_REGIONTYPE()

#define GST_RPAD_REGIONTYPE(pad)	(((GstRealPad *)(pad))->regiontype)

Get the type of the region that is being pulled.

pad :the real pad to query.


GST_RPAD_DIRECTION()

#define GST_RPAD_DIRECTION(pad)		(((GstRealPad *)(pad))->direction)

Get the direction of the real pad.

pad :the realpad to query.


GST_RPAD_CAPS()

#define GST_RPAD_CAPS(pad)		(((GstRealPad *)(pad))->caps)

Get the caps of the real pad.

pad :the real pad to query.


GST_RPAD_PEER()

#define GST_RPAD_PEER(pad)		(((GstRealPad *)(pad))->peer)

Get the peer element of the real pad.

pad :the real pad to query.


GST_RPAD_BUFPEN()

#define GST_RPAD_BUFPEN(pad)		(((GstRealPad *)(pad))->bufpen)

Get the bufpen of the real pad.

pad :the real pad to query.


GST_RPAD_CHAINFUNC()

#define GST_RPAD_CHAINFUNC(pad)		(((GstRealPad *)(pad))->chainfunc)

Get the chain function of the real pad.

pad :the real pad to query.


GST_RPAD_FILTER()

#define GST_RPAD_FILTER(pad)		(((GstRealPad *)(pad))->filter)

pad : 


GST_RPAD_APPFILTER()

#define GST_RPAD_APPFILTER(pad)		(((GstRealPad *)(pad))->appfilter)

pad : 


GST_RPAD_GETFUNC()

#define GST_RPAD_GETFUNC(pad)		(((GstRealPad *)(pad))->getfunc)

Get get getfunction of the real pad.

pad :the real pad to query.


GST_RPAD_GETREGIONFUNC()

#define GST_RPAD_GETREGIONFUNC(pad)	(((GstRealPad *)(pad))->getregionfunc)

Get the getregion function of the real pad.

pad :the real pad to query.


GST_RPAD_PULLREGIONFUNC()

#define GST_RPAD_PULLREGIONFUNC(pad)	(((GstRealPad *)(pad))->pullregionfunc)

Get the pullregion function of the real pad.

pad :the real pad to query.


GST_RPAD_BUFFERPOOLFUNC()

#define GST_RPAD_BUFFERPOOLFUNC(pad)	(((GstRealPad *)(pad))->bufferpoolfunc)

Get the bufferpoolfunction from the real pad.

pad :the real pad to query.


GST_RPAD_CHAINHANDLER()

#define GST_RPAD_CHAINHANDLER(pad)	(((GstRealPad *)(pad))->chainhandler)

Get the eventhandler function from the real pad.

pad :the real pad to query.


GST_RPAD_EVENTFUNC()

#define GST_RPAD_EVENTFUNC(pad)		(((GstRealPad *)(pad))->eventfunc)

Get the event function of this real pad.

pad :the real pad to query.


GST_RPAD_EVENTHANDLER()

#define GST_RPAD_EVENTHANDLER(pad)	(((GstRealPad *)(pad))->eventhandler)

Get the eventhandler function of this real pad.

pad :the real pad to query.


GST_RPAD_GETHANDLER()

#define GST_RPAD_GETHANDLER(pad)	(((GstRealPad *)(pad))->gethandler)

Get the gethandler function of this real pad.

pad :the real pad to query.


GST_RPAD_CONNECTFUNC()

#define GST_RPAD_CONNECTFUNC(pad)	(((GstRealPad *)(pad))->connectfunc)

pad : 


GST_RPAD_GETCAPSFUNC()

#define GST_RPAD_GETCAPSFUNC(pad)	(((GstRealPad *)(pad))->getcapsfunc)

pad : 


GST_GPAD_REALPAD()

#define GST_GPAD_REALPAD(pad)		(((GstGhostPad *)(pad))->realpad)

Get the real pad of this ghost pad.

pad :the real pad to query.


struct GstGhostPad

struct GstGhostPad {
  GstPad pad;

  GstRealPad *realpad;
};


gst_ghost_pad_new ()

GstPad*     gst_ghost_pad_new               (gchar *name,
                                             GstPad *pad);

Create a new ghost pad associated with the given pad.

name : name of the new ghost pad
pad : the pad to create a ghost pad of
Returns : new ghost pad

See Also

GstPadTemplate, GstElement, GstEvent