gi-gst-1.0.21: GStreamer bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gst.Objects.GhostPad

Contents

Description

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

Exported types

newtype GhostPad Source #

Memory-managed wrapper type.

Constructors

GhostPad (ManagedPtr GhostPad) 
Instances
GObject GhostPad Source # 
Instance details

Defined in GI.Gst.Objects.GhostPad

Methods

gobjectType :: IO GType #

HasParentTypes GhostPad Source # 
Instance details

Defined in GI.Gst.Objects.GhostPad

type ParentTypes GhostPad Source # 
Instance details

Defined in GI.Gst.Objects.GhostPad

type ParentTypes GhostPad = ProxyPad ': (Pad ': (Object ': (Object ': ([] :: [Type]))))

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 # 
Instance details

Defined in GI.Gst.Objects.GhostPad

toGhostPad :: (MonadIO m, IsGhostPad o) => o -> m GhostPad Source #

Cast to GhostPad, for types for which this is known to be safe. For general casts, use castTo.

noGhostPad :: Maybe GhostPad Source #

A convenience alias for Nothing :: Maybe GhostPad.

Methods

activateModeDefault

ghostPadActivateModeDefault Source #

Arguments

:: (HasCallStack, MonadIO m, IsPad a, IsObject b) 
=> a

pad: the Pad to activate or deactivate.

-> Maybe b

parent: the parent of pad or Nothing

-> PadMode

mode: the requested activation mode

-> Bool

active: whether the pad should be active or not.

-> m Bool

Returns: True if the operation was successful.

Invoke the default activate mode function of a ghost pad.

construct

ghostPadConstruct Source #

Arguments

:: (HasCallStack, MonadIO m, IsGhostPad a) 
=> a

gpad: the newly allocated ghost pad

-> m Bool

Returns: True if the construction succeeds, False otherwise.

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

ghostPadGetTarget Source #

Arguments

:: (HasCallStack, MonadIO m, IsGhostPad a) 
=> a

gpad: the GhostPad

-> m (Maybe Pad)

Returns: the target Pad, can be Nothing if the ghostpad has no target set. Unref target pad after usage.

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

internalActivateModeDefault

ghostPadInternalActivateModeDefault Source #

Arguments

:: (HasCallStack, MonadIO m, IsPad a, IsObject b) 
=> a

pad: the Pad to activate or deactivate.

-> Maybe b

parent: the parent of pad or Nothing

-> PadMode

mode: the requested activation mode

-> Bool

active: whether the pad should be active or not.

-> m Bool

Returns: True if the operation was successful.

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

new

ghostPadNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsPad a) 
=> Maybe Text

name: the name of the new pad, or Nothing to assign a default name

-> a

target: the pad to ghost.

-> m (Maybe GhostPad)

Returns: a new Pad, or Nothing in case of an error.

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 #

Arguments

:: (HasCallStack, MonadIO m, IsPad a, IsPadTemplate b) 
=> Maybe Text

name: the name of the new pad, or Nothing to assign a default name.

-> a

target: the pad to ghost.

-> b

templ: the PadTemplate to use on the ghostpad.

-> m (Maybe GhostPad)

Returns: a new Pad, or Nothing in case of an error.

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

ghostPadNewNoTarget Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

name: the name of the new pad, or Nothing to assign a default name.

-> PadDirection

dir: the direction of the ghostpad

-> m (Maybe GhostPad)

Returns: a new Pad, or Nothing in case of an error.

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 #

Arguments

:: (HasCallStack, MonadIO m, IsPadTemplate a) 
=> Maybe Text

name: the name of the new pad, or Nothing to assign a default name

-> a

templ: the PadTemplate to create the ghostpad from.

-> m (Maybe GhostPad)

Returns: a new Pad, or Nothing in case of an error.

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

setTarget

ghostPadSetTarget Source #

Arguments

:: (HasCallStack, MonadIO m, IsGhostPad a, IsPad b) 
=> a

gpad: the GhostPad

-> Maybe b

newtarget: the new pad target

-> m Bool

Returns: True if the new target could be set. This function can return False when the internal pads could not be linked.

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.