Next: GstImplementsInterface, Previous: GstFormat, Up: Top
Pseudo link pads
GhostPads are useful when organizing pipelines with <gst-bin>
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
other <gst-elements>
. 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)
mchars
) (target <gst-pad>
) (ret <gst-pad>
)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.
- name
- the name of the new pad, or NULL to assign a default name.
- target
- the pad to ghost.
- ret
- a new
<gst-pad>
, or NULL in case of an error.
mchars
) (dir <gst-pad-direction>
) (ret <gst-pad>
)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.
- name
- the name of the new pad, or NULL to assign a default name.
- dir
- the direction of the ghostpad
- ret
- a new
<gst-pad>
, or NULL in case of an error.
mchars
) (target <gst-pad>
) (templ <gst-pad-template>
) (ret <gst-pad>
)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.
- name
- the name of the new pad, or NULL to assign a default name.
- target
- the pad to ghost.
- templ
- the
<gst-pad-template>
to use on the ghostpad.- ret
- a new
<gst-pad>
, or NULL in case of an error.Since 0.10.10
<gst-ghost-pad*>
) (newtarget <gst-pad>
) (ret bool
)Set the new target of the ghostpad gpad. Any existing target is unlinked and links to the new target are established.
- gpad
- the
<gst-ghostpad>
- newtarget
- the new pad target
- ret
- TRUE if the new target could be set. This function can return FALSE when the internal pads could not be linked.