Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
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
- noGhostPad :: Maybe 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
GObject GhostPad Source # | |
Defined in GI.Gst.Objects.GhostPad gobjectType :: IO GType # | |
HasParentTypes GhostPad Source # | |
Defined in GI.Gst.Objects.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
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: |
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.