GstPad

A #GstElement is linked to other elements via "pads", which are extremely light-weight generic link points.

Pads have a #GstPadDirection, source pads produce data, sink pads consume data.

Pads are typically created from a #GstPadTemplate with gst.pad.Pad.newFromTemplate and are then added to a #GstElement. This usually happens when the element is created but it can also happen dynamically based on the data that the element is processing or based on the pads that the application requests.

Pads without pad templates can be created with gst.pad.Pad.new_, which takes a direction and a name as an argument. If the name is null, then a guaranteed unique name will be assigned to it.

A #GstElement creating a pad will typically use the various gst_pad_set_*_function\() calls to register callbacks for events, queries or dataflow on the pads.

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

After two pads are retrieved from an element by gst.element.Element.getStaticPad, the pads can be linked with gst.pad.Pad.link. (For quick links, you can also use gst.element.Element.link, which will make the obvious link for you if it's straightforward.). Pads can be unlinked again with gst.pad.Pad.unlink. gst.pad.Pad.getPeer can be used to check what the pad is linked to.

Before dataflow is possible on the pads, they need to be activated with gst.pad.Pad.setActive.

gst.pad.Pad.query and gst.pad.Pad.peerQuery can be used to query various properties of the pad and the stream.

To send a #GstEvent on a pad, use gst.pad.Pad.sendEvent and gst.pad.Pad.pushEvent. Some events will be sticky on the pad, meaning that after they pass on the pad they can be queried later with gst.pad.Pad.getStickyEvent and gst.pad.Pad.stickyEventsForeach. gst.pad.Pad.getCurrentCaps and gst.pad.Pad.hasCurrentCaps are convenience functions to query the current sticky CAPS event on a pad.

GstElements will use gst.pad.Pad.push and gst.pad.Pad.pullRange to push out or pull in a buffer.

The dataflow, events and queries that happen on a pad can be monitored with probes that can be installed with gst.pad.Pad.addProbe. gst.pad.Pad.isBlocked can be used to check if a block probe is installed on the pad. gst.pad.Pad.isBlocking checks if the blocking probe is currently blocking the pad. gst.pad.Pad.removeProbe is used to remove a previously installed probe and unblock blocking probes if any.

Pad have an offset that can be retrieved with gst.pad.Pad.getOffset. This offset will be applied to the running_time of all data passing over the pad. gst.pad.Pad.setOffset can be used to change the offset.

Convenience functions exist to start, pause and stop the task on a pad with gst.pad.Pad.startTask, gst.pad.Pad.pauseTask and gst.pad.Pad.stopTask respectively.

Members

Unions

ABIType
union ABIType

Variables

activatedata
void* activatedata;
activatefunc
GstPadActivateFunction activatefunc;
activatemodedata
void* activatemodedata;
activatemodefunc
GstPadActivateModeFunction activatemodefunc;
activatemodenotify
GDestroyNotify activatemodenotify;
activatenotify
GDestroyNotify activatenotify;
blockCond
GCond blockCond;
chaindata
void* chaindata;
chainfunc
GstPadChainFunction chainfunc;
chainlistdata
void* chainlistdata;
chainlistfunc
GstPadChainListFunction chainlistfunc;
chainlistnotify
GDestroyNotify chainlistnotify;
chainnotify
GDestroyNotify chainnotify;
direction
GstPadDirection direction;

the direction of the pad, cannot change after creating the pad.

elementPrivate
void* elementPrivate;

private data owned by the parent element

eventdata
void* eventdata;
eventfunc
GstPadEventFunction eventfunc;
eventnotify
GDestroyNotify eventnotify;
getrangedata
void* getrangedata;
getrangefunc
GstPadGetRangeFunction getrangefunc;
getrangenotify
GDestroyNotify getrangenotify;
iterintlinkdata
void* iterintlinkdata;
iterintlinkfunc
GstPadIterIntLinkFunction iterintlinkfunc;
iterintlinknotify
GDestroyNotify iterintlinknotify;
linkdata
void* linkdata;
linkfunc
GstPadLinkFunction linkfunc;
linknotify
GDestroyNotify linknotify;
mode
GstPadMode mode;
numBlocked
int numBlocked;
numProbes
int numProbes;
object
GstObject object;
offset
long offset;
padtemplate
GstPadTemplate* padtemplate;

padtemplate for this pad

peer
GstPad* peer;
priv
GstPadPrivate* priv;
probes
GHookList probes;
querydata
void* querydata;
queryfunc
GstPadQueryFunction queryfunc;
querynotify
GDestroyNotify querynotify;
streamRecLock
GRecMutex streamRecLock;
task
GstTask* task;
unlinkdata
void* unlinkdata;
unlinkfunc
GstPadUnlinkFunction unlinkfunc;
unlinknotify
GDestroyNotify unlinknotify;