is linked to other elements via pads
. Pads are the element’s interface to the outside world. Data streams from one element’s source pad to another element’s sink pad. The specific type of media that the element can handle will be exposed by the pad’s capabilities.
A pad is defined by two properties: its direction and its availability. A pad direction can be a source pad or a sink pad. Elements receive data on their sink pads and generate data on their source pads.
A pad can have three availabilities: always, sometimes, and on request.
Gets the direction of a-pad.
Gets the parent element of a-pad.
Gets the template for a-pad.
(send a-pad link sinkpad)
| → (one-of/c 'ok 'wrong-hierarchy 'was-linked 'wrong-direction 'noformat 'nosched 'refused)|
| sinkpad : (is-a?/c pad%)|
Links a-pad and the sinkpad. Returns a result code indicating if the connection worked or what went wrong.
, creating any ghost pads
in between as necessary. Returns #t
if the link succeeded, #f
Unlinks a-pad from the sinkpad. Returns #t if the pads were unlinked and #f if the pads were not linked together.
Returns #t if a-pad is linked to another pad, #f otherwise.
Checks if a-pad and sinkpad are compatible so they can be linked. Returns #t if they can be linked, #f otherwise.
Gets the capabilities
of the allowed media types that can flow through a-pad
and its peer. Returns #f
has no peer.
Gets the capabilities
currently configured on a-pad
, or #f
has no caps.
Gets the peer of a-pad or #f if there is none.
set on it, #f
Returns #t if a-pad is active, #f otherwise.
Returns #t if a-pad is blocked, #f otherwise.
Returns #t if a-pad is blocking downstream links, #f otherwise.
A ghost pad
acts as a proxy for another pad, and are used when working with bins
. They allow the bin to have sink and/or source pads that link to the sink/source pads of the child elements.
Get the target pad of a-ghost-pad or #f if no target is set.
Sets the new target of a-ghost-pad to target. Returns #t on success or #f if pads could not be linked.
Create a new ghost pad with "target" as the target, or #f if there is an error.
Create a new ghost pad without a target with the given direction, or #f if there is an error.
3.5.2 Pad Templates
A pad template
describes the possible media types a pad can handle. Returns #t
is a pad template, #f
Creates a new pad template with a name and with the given arguments.
Creates a new pad from template with the given name, generating a unique name if name is #f. Returns #f in case of error.