Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GhostPads are useful when organizing pipelines with 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 any
other Element
. 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, ghostPadNew
is the
function to use to get a ghost-pad. Otherwise one can use ghostPadNewNoTarget
to create the ghost-pad and use ghostPadSetTarget
to establish the
association later on.
Note that GhostPads add overhead to the data processing of a pipeline.
Synopsis
- newtype GhostPad = GhostPad (ManagedPtr GhostPad)
- class (GObject o, IsDescendantOf GhostPad o) => IsGhostPad o
- toGhostPad :: (MonadIO m, IsGhostPad o) => o -> m GhostPad
- ghostPadActivateModeDefault :: (HasCallStack, MonadIO m, IsPad a, IsObject b) => a -> Maybe b -> PadMode -> Bool -> m Bool
- ghostPadConstruct :: (HasCallStack, MonadIO m, IsGhostPad a) => a -> m Bool
- ghostPadGetTarget :: (HasCallStack, MonadIO m, IsGhostPad a) => a -> m (Maybe Pad)
- ghostPadInternalActivateModeDefault :: (HasCallStack, MonadIO m, IsPad a, IsObject b) => a -> Maybe b -> PadMode -> Bool -> m Bool
- ghostPadNew :: (HasCallStack, MonadIO m, IsPad a) => Maybe Text -> a -> m (Maybe GhostPad)
- ghostPadNewFromTemplate :: (HasCallStack, MonadIO m, IsPad a, IsPadTemplate b) => Maybe Text -> a -> b -> m (Maybe GhostPad)
- ghostPadNewNoTarget :: (HasCallStack, MonadIO m) => Maybe Text -> PadDirection -> m (Maybe GhostPad)
- ghostPadNewNoTargetFromTemplate :: (HasCallStack, MonadIO m, IsPadTemplate a) => Maybe Text -> a -> m (Maybe GhostPad)
- ghostPadSetTarget :: (HasCallStack, MonadIO m, IsGhostPad a, IsPad b) => a -> Maybe b -> m Bool
Exported types
Memory-managed wrapper type.
Instances
Eq GhostPad Source # | |
GObject GhostPad Source # | |
Defined in GI.Gst.Objects.GhostPad | |
ManagedPtrNewtype GhostPad Source # | |
Defined in GI.Gst.Objects.GhostPad toManagedPtr :: GhostPad -> ManagedPtr GhostPad | |
TypedObject GhostPad Source # | |
Defined in GI.Gst.Objects.GhostPad | |
HasParentTypes GhostPad Source # | |
Defined in GI.Gst.Objects.GhostPad | |
IsGValue (Maybe GhostPad) Source # | Convert |
Defined in GI.Gst.Objects.GhostPad gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe GhostPad -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe GhostPad) | |
type ParentTypes GhostPad Source # | |
Defined in GI.Gst.Objects.GhostPad |
class (GObject o, IsDescendantOf GhostPad o) => IsGhostPad o Source #
Type class for types which can be safely cast to GhostPad
, for instance with toGhostPad
.
Instances
(GObject o, IsDescendantOf GhostPad o) => IsGhostPad o Source # | |
Defined in GI.Gst.Objects.GhostPad |
toGhostPad :: (MonadIO m, IsGhostPad o) => o -> m GhostPad Source #
Methods
Click to display all available methods, including inherited ones
Methods
activateMode, addControlBinding, addProbe, bindProperty, bindPropertyFull, canLink, chain, chainList, checkReconfigure, construct, createStreamId, defaultError, eventDefault, forceFloating, forward, freezeNotify, getv, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, hasCurrentCaps, isActive, isBlocked, isBlocking, isFloating, isLinked, iterateInternalLinks, link, linkFull, linkMaybeGhosting, linkMaybeGhostingFull, markReconfigure, needsReconfigure, notify, notifyByPspec, pauseTask, peerQuery, peerQueryAcceptCaps, peerQueryCaps, peerQueryConvert, peerQueryDuration, peerQueryPosition, proxyQueryAcceptCaps, proxyQueryCaps, pullRange, push, pushEvent, pushList, query, queryAcceptCaps, queryCaps, queryConvert, queryDefault, queryDuration, queryPosition, ref, refSink, removeControlBinding, removeProbe, runDispose, sendEvent, startTask, stealData, stealQdata, stickyEventsForeach, stopTask, storeStickyEvent, suggestNextSync, syncValues, thawNotify, unlink, unparent, unref, useFixedCaps, watchClosure.
Getters
getAllowedCaps, getControlBinding, getControlRate, getCurrentCaps, getData, getDirection, getElementPrivate, getGValueArray, getInternal, getLastFlowReturn, getName, getOffset, getPadTemplate, getPadTemplateCaps, getParent, getParentElement, getPathString, getPeer, getProperty, getQdata, getRange, getSingleInternalLink, getStickyEvent, getStream, getStreamId, getTarget, getTaskState, getValue.
Setters
setActivateFunctionFull, setActivatemodeFunctionFull, setActive, setChainFunctionFull, setChainListFunctionFull, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setData, setDataFull, setElementPrivate, setEventFullFunctionFull, setEventFunctionFull, setGetrangeFunctionFull, setIterateInternalLinksFunctionFull, setLinkFunctionFull, setName, setOffset, setParent, setProperty, setQueryFunctionFull, setTarget, setUnlinkFunctionFull.
activateModeDefault
ghostPadActivateModeDefault Source #
:: (HasCallStack, MonadIO m, IsPad a, IsObject b) | |
=> a |
|
-> Maybe b |
|
-> PadMode |
|
-> Bool |
|
-> m Bool | Returns: |
Invoke the default activate mode function of a ghost pad.
construct
:: (HasCallStack, MonadIO m, IsGhostPad a) | |
=> a |
|
-> m Bool | Returns: |
Deprecated: This function is deprecated since 1.18 and does nothinganymore.
Finish initialization of a newly allocated ghost pad.
This function is most useful in language bindings and when subclassing
GhostPad
; 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).
getTarget
:: (HasCallStack, MonadIO m, IsGhostPad a) | |
=> a |
|
-> m (Maybe Pad) | Returns: the target |
Get the target pad of gpad
. Unref target pad after usage.
internalActivateModeDefault
ghostPadInternalActivateModeDefault Source #
:: (HasCallStack, MonadIO m, IsPad a, IsObject b) | |
=> a |
|
-> Maybe b |
|
-> PadMode |
|
-> Bool |
|
-> m Bool | Returns: |
Invoke the default activate mode function of a proxy pad that is owned by a ghost pad.
new
:: (HasCallStack, MonadIO m, IsPad a) | |
=> Maybe Text |
|
-> a |
|
-> m (Maybe GhostPad) |
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.
newFromTemplate
ghostPadNewFromTemplate Source #
:: (HasCallStack, MonadIO m, IsPad a, IsPadTemplate b) | |
=> Maybe Text |
|
-> a |
|
-> b |
|
-> m (Maybe GhostPad) |
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.
newNoTarget
:: (HasCallStack, MonadIO m) | |
=> Maybe Text |
|
-> PadDirection |
|
-> m (Maybe GhostPad) |
Create a new ghostpad without a target with the given direction.
A target can be set on the ghostpad later with the
ghostPadSetTarget
function.
The created ghostpad will not have a padtemplate.
newNoTargetFromTemplate
ghostPadNewNoTargetFromTemplate Source #
:: (HasCallStack, MonadIO m, IsPadTemplate a) | |
=> Maybe Text |
|
-> a |
|
-> m (Maybe GhostPad) |
Create a new ghostpad based on templ
, without setting a target. The
direction will be taken from the templ
.
setTarget
:: (HasCallStack, MonadIO m, IsGhostPad a, IsPad b) | |
=> a |
|
-> Maybe b |
|
-> m Bool | Returns: |
Set the new target of the ghostpad gpad
. Any existing target
is unlinked and links to the new target are established. if newtarget
is
Nothing
the target will be cleared.