GhostPad

GhostPads are useful when organizing pipelines with GstBin like elements. The idea here is to create hierarchical element graphs. The bin element contains a sub-graph. Now one would like to treat the bin-element like any other GstElement. This is where GhostPads come into play. A GhostPad acts as a proxy for another pad. Thus the bin can have sink and source ghost-pads that are associated with sink and source pads of the child elements.

If the target pad is known at creation time, gst_ghost_pad_new() is the function to use to get a ghost-pad. Otherwise one can use gst_ghost_pad_new_no_target() to create the ghost-pad and use gst_ghost_pad_set_target() to establish the association later on.

Note that GhostPads add overhead to the data processing of a pipeline.

Last reviewed on 2005-11-18 (0.9.5)

Constructors

this
this(GstGhostPad* gstGhostPad)

Sets our main struct and passes it to the parent class

this
this(string name, Pad target)

Create a new ghostpad with target as the target. The direction will be taken from the target pad. target must be unlinked. Will ref the target.

this
this(string name, GstPadDirection dir)

Create a new ghostpad without a target with the given direction. A target can be set on the ghostpad later with the gst_ghost_pad_set_target() function. The created ghostpad will not have a padtemplate.

this
this(string name, Pad target, PadTemplate templ)

Create a new ghostpad with target as the target. The direction will be taken from the target pad. The template used on the ghostpad will be template. Will ref the target.

this
this(string name, PadTemplate templ)

Create a new ghostpad based on templ, without setting a target. The direction will be taken from the templ.

Members

Functions

construct
int construct()

Finish initialization of a newly allocated ghost pad. This function is most useful in language bindings and when subclassing GstGhostPad; plugin and application developers normally will not call this function. Call this function directly after a call to g_object_new (GST_TYPE_GHOST_PAD, "direction", dir, ..., NULL).

getGhostPadStruct
GstGhostPad* getGhostPadStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

getTarget
Pad getTarget()

Get the target pad of gpad. Unref target pad after usage.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
setTarget
int setTarget(Pad newtarget)

Set the new target of the ghostpad gpad. Any existing target is unlinked and links to the new target are established. if newtarget is NULL the target will be cleared.

Static functions

activateModeDefault
int activateModeDefault(Pad pad, ObjectGst parent, GstPadMode mode, int active)

Invoke the default activate mode function of a ghost pad.

internalActivateModeDefault
int internalActivateModeDefault(Pad pad, ObjectGst parent, GstPadMode mode, int active)

Invoke the default activate mode function of a proxy pad that is owned by a ghost pad.

Variables

gstGhostPad
GstGhostPad* gstGhostPad;

the main Gtk struct

Inherited Members

From ProxyPad

gstProxyPad
GstProxyPad* gstProxyPad;

the main Gtk struct

getProxyPadStruct
GstProxyPad* getProxyPadStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getInternal
ProxyPad getInternal()

Get the internal pad of pad. Unref target pad after usage. The internal pad of a GstGhostPad is the internally used pad of opposite direction, which is used to link to the target.

iterateInternalLinksDefault
Iterator iterateInternalLinksDefault(ObjectGst parent)

Invoke the default iterate internal links function of the proxy pad.

chainDefault
GstFlowReturn chainDefault(ObjectGst parent, Buffer buffer)

Invoke the default chain function of the proxy pad.

chainListDefault
GstFlowReturn chainListDefault(ObjectGst parent, BufferList list)

Invoke the default chain list function of the proxy pad.

getrangeDefault
GstFlowReturn getrangeDefault(ObjectGst parent, ulong offset, uint size, Buffer buffer)

returns GST_FLOW_ERROR if NULL. Invoke the default getrange function of the proxy pad.

Meta