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 |
- Exported types
- Methods
- activateMode
- addProbe
- canLink
- chain
- chainList
- checkReconfigure
- createStreamId
- eventDefault
- forward
- getAllowedCaps
- getCurrentCaps
- getDirection
- getElementPrivate
- getLastFlowReturn
- getOffset
- getPadTemplate
- getPadTemplateCaps
- getParentElement
- getPeer
- getRange
- getSingleInternalLink
- getStickyEvent
- getStream
- getStreamId
- getTaskState
- hasCurrentCaps
- isActive
- isBlocked
- isBlocking
- isLinked
- iterateInternalLinks
- iterateInternalLinksDefault
- link
- linkFull
- linkGetName
- linkMaybeGhosting
- linkMaybeGhostingFull
- markReconfigure
- needsReconfigure
- new
- newFromStaticTemplate
- newFromTemplate
- pauseTask
- peerQuery
- peerQueryAcceptCaps
- peerQueryCaps
- peerQueryConvert
- peerQueryDuration
- peerQueryPosition
- proxyQueryAcceptCaps
- proxyQueryCaps
- pullRange
- push
- pushEvent
- pushList
- query
- queryAcceptCaps
- queryCaps
- queryConvert
- queryDefault
- queryDuration
- queryPosition
- removeProbe
- sendEvent
- setActivateFunctionFull
- setActivatemodeFunctionFull
- setActive
- setChainFunctionFull
- setChainListFunctionFull
- setElementPrivate
- setEventFullFunctionFull
- setEventFunctionFull
- setGetrangeFunctionFull
- setIterateInternalLinksFunctionFull
- setLinkFunctionFull
- setOffset
- setQueryFunctionFull
- setUnlinkFunctionFull
- startTask
- stickyEventsForeach
- stopTask
- storeStickyEvent
- unlink
- useFixedCaps
- Properties
- Signals
A Element
is linked to other elements via "pads", which are extremely
light-weight generic link points.
Pads have a PadDirection
, source pads produce data, sink pads consume
data.
Pads are typically created from a PadTemplate
with
padNewFromTemplate
and are then added to a Element
. This usually
happens when the element is created but it can also happen dynamically based
on the data that the element is processing or based on the pads that the
application requests.
Pads without pad templates can be created with padNew
,
which takes a direction and a name as an argument. If the name is Nothing
,
then a guaranteed unique name will be assigned to it.
A Element
creating a pad will typically use the various
gst_pad_set_*_function\() calls to register callbacks for events, queries or
dataflow on the pads.
gst_pad_get_parent()
will retrieve the Element
that owns the pad.
After two pads are retrieved from an element by elementGetStaticPad
,
the pads can be linked with padLink
. (For quick links,
you can also use elementLink
, which will make the obvious
link for you if it's straightforward.). Pads can be unlinked again with
padUnlink
. padGetPeer
can be used to check what the pad is
linked to.
Before dataflow is possible on the pads, they need to be activated with
padSetActive
.
padQuery
and padPeerQuery
can be used to query various
properties of the pad and the stream.
To send a Event
on a pad, use padSendEvent
and
padPushEvent
. Some events will be sticky on the pad, meaning that
after they pass on the pad they can be queried later with
padGetStickyEvent
and padStickyEventsForeach
.
padGetCurrentCaps
and padHasCurrentCaps
are convenience
functions to query the current sticky CAPS event on a pad.
GstElements will use padPush
and padPullRange
to push out
or pull in a buffer.
The dataflow, events and queries that happen on a pad can be monitored with
probes that can be installed with padAddProbe
. padIsBlocked
can be used to check if a block probe is installed on the pad.
padIsBlocking
checks if the blocking probe is currently blocking the
pad. padRemoveProbe
is used to remove a previously installed probe
and unblock blocking probes if any.
Pad have an offset that can be retrieved with padGetOffset
. This
offset will be applied to the running_time of all data passing over the pad.
padSetOffset
can be used to change the offset.
Convenience functions exist to start, pause and stop the task on a pad with
padStartTask
, padPauseTask
and padStopTask
respectively.
Synopsis
- newtype Pad = Pad (ManagedPtr Pad)
- class (GObject o, IsDescendantOf Pad o) => IsPad o
- toPad :: (MonadIO m, IsPad o) => o -> m Pad
- padActivateMode :: (HasCallStack, MonadIO m, IsPad a) => a -> PadMode -> Bool -> m Bool
- padAddProbe :: (HasCallStack, MonadIO m, IsPad a) => a -> [PadProbeType] -> PadProbeCallback -> m CULong
- padCanLink :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> m Bool
- padChain :: (HasCallStack, MonadIO m, IsPad a) => a -> Buffer -> m FlowReturn
- padChainList :: (HasCallStack, MonadIO m, IsPad a) => a -> BufferList -> m FlowReturn
- padCheckReconfigure :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- padCreateStreamId :: (HasCallStack, MonadIO m, IsPad a, IsElement b) => a -> b -> Maybe Text -> m Text
- padEventDefault :: (HasCallStack, MonadIO m, IsPad a, IsObject b) => a -> Maybe b -> Event -> m Bool
- padForward :: (HasCallStack, MonadIO m, IsPad a) => a -> PadForwardFunction -> m Bool
- padGetAllowedCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Caps)
- padGetCurrentCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Caps)
- padGetDirection :: (HasCallStack, MonadIO m, IsPad a) => a -> m PadDirection
- padGetElementPrivate :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Ptr ())
- padGetLastFlowReturn :: (HasCallStack, MonadIO m, IsPad a) => a -> m FlowReturn
- padGetOffset :: (HasCallStack, MonadIO m, IsPad a) => a -> m Int64
- padGetPadTemplate :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe PadTemplate)
- padGetPadTemplateCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> m Caps
- padGetParentElement :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Element)
- padGetPeer :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Pad)
- padGetRange :: (HasCallStack, MonadIO m, IsPad a) => a -> Word64 -> Word32 -> m (FlowReturn, Buffer)
- padGetSingleInternalLink :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Pad)
- padGetStickyEvent :: (HasCallStack, MonadIO m, IsPad a) => a -> EventType -> Word32 -> m (Maybe Event)
- padGetStream :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Stream)
- padGetStreamId :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Text)
- padGetTaskState :: (HasCallStack, MonadIO m, IsPad a) => a -> m TaskState
- padHasCurrentCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- padIsActive :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- padIsBlocked :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- padIsBlocking :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- padIsLinked :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- padIterateInternalLinks :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Iterator)
- padIterateInternalLinksDefault :: (HasCallStack, MonadIO m, IsPad a, IsObject b) => a -> Maybe b -> m (Maybe Iterator)
- padLink :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> m PadLinkReturn
- padLinkFull :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> [PadLinkCheck] -> m PadLinkReturn
- padLinkGetName :: (HasCallStack, MonadIO m) => PadLinkReturn -> m Text
- padLinkMaybeGhosting :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> m Bool
- padLinkMaybeGhostingFull :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> [PadLinkCheck] -> m Bool
- padMarkReconfigure :: (HasCallStack, MonadIO m, IsPad a) => a -> m ()
- padNeedsReconfigure :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- padNew :: (HasCallStack, MonadIO m) => Maybe Text -> PadDirection -> m (Maybe Pad)
- padNewFromStaticTemplate :: (HasCallStack, MonadIO m) => StaticPadTemplate -> Text -> m (Maybe Pad)
- padNewFromTemplate :: (HasCallStack, MonadIO m, IsPadTemplate a) => a -> Maybe Text -> m (Maybe Pad)
- padPauseTask :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- padPeerQuery :: (HasCallStack, MonadIO m, IsPad a) => a -> Query -> m Bool
- padPeerQueryAcceptCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Caps -> m Bool
- padPeerQueryCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Maybe Caps -> m Caps
- padPeerQueryConvert :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> Int64 -> Format -> m (Bool, Int64)
- padPeerQueryDuration :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> m (Bool, Int64)
- padPeerQueryPosition :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> m (Bool, Int64)
- padProxyQueryAcceptCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Query -> m Bool
- padProxyQueryCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Query -> m Bool
- padPullRange :: (HasCallStack, MonadIO m, IsPad a) => a -> Word64 -> Word32 -> m (FlowReturn, Buffer)
- padPush :: (HasCallStack, MonadIO m, IsPad a) => a -> Buffer -> m FlowReturn
- padPushEvent :: (HasCallStack, MonadIO m, IsPad a) => a -> Event -> m Bool
- padPushList :: (HasCallStack, MonadIO m, IsPad a) => a -> BufferList -> m FlowReturn
- padQuery :: (HasCallStack, MonadIO m, IsPad a) => a -> Query -> m Bool
- padQueryAcceptCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Caps -> m Bool
- padQueryCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Maybe Caps -> m Caps
- padQueryConvert :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> Int64 -> Format -> m (Bool, Int64)
- padQueryDefault :: (HasCallStack, MonadIO m, IsPad a, IsObject b) => a -> Maybe b -> Query -> m Bool
- padQueryDuration :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> m (Bool, Int64)
- padQueryPosition :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> m (Bool, Int64)
- padRemoveProbe :: (HasCallStack, MonadIO m, IsPad a) => a -> CULong -> m ()
- padSendEvent :: (HasCallStack, MonadIO m, IsPad a) => a -> Event -> m Bool
- padSetActivateFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadActivateFunction -> m ()
- padSetActivatemodeFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadActivateModeFunction -> m ()
- padSetActive :: (HasCallStack, MonadIO m, IsPad a) => a -> Bool -> m Bool
- padSetChainFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadChainFunction -> m ()
- padSetChainListFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadChainListFunction -> m ()
- padSetElementPrivate :: (HasCallStack, MonadIO m, IsPad a) => a -> Ptr () -> m ()
- padSetEventFullFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadEventFullFunction -> m ()
- padSetEventFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadEventFunction -> m ()
- padSetGetrangeFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadGetRangeFunction -> m ()
- padSetIterateInternalLinksFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadIterIntLinkFunction -> m ()
- padSetLinkFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadLinkFunction -> m ()
- padSetOffset :: (HasCallStack, MonadIO m, IsPad a) => a -> Int64 -> m ()
- padSetQueryFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadQueryFunction -> m ()
- padSetUnlinkFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadUnlinkFunction -> m ()
- padStartTask :: (HasCallStack, MonadIO m, IsPad a) => a -> TaskFunction -> m Bool
- padStickyEventsForeach :: (HasCallStack, MonadIO m, IsPad a) => a -> PadStickyEventsForeachFunction -> m ()
- padStopTask :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- padStoreStickyEvent :: (HasCallStack, MonadIO m, IsPad a) => a -> Event -> m FlowReturn
- padUnlink :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> m Bool
- padUseFixedCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> m ()
- getPadCaps :: (MonadIO m, IsPad o) => o -> m (Maybe Caps)
- constructPadDirection :: (IsPad o, MonadIO m) => PadDirection -> m (GValueConstruct o)
- getPadDirection :: (MonadIO m, IsPad o) => o -> m PadDirection
- constructPadOffset :: (IsPad o, MonadIO m) => Int64 -> m (GValueConstruct o)
- getPadOffset :: (MonadIO m, IsPad o) => o -> m Int64
- setPadOffset :: (MonadIO m, IsPad o) => o -> Int64 -> m ()
- clearPadTemplate :: (MonadIO m, IsPad o) => o -> m ()
- constructPadTemplate :: (IsPad o, MonadIO m, IsPadTemplate a) => a -> m (GValueConstruct o)
- getPadTemplate :: (MonadIO m, IsPad o) => o -> m (Maybe PadTemplate)
- setPadTemplate :: (MonadIO m, IsPad o, IsPadTemplate a) => o -> a -> m ()
- type PadLinkedCallback = Pad -> IO ()
- afterPadLinked :: (IsPad a, MonadIO m) => a -> ((?self :: a) => PadLinkedCallback) -> m SignalHandlerId
- onPadLinked :: (IsPad a, MonadIO m) => a -> ((?self :: a) => PadLinkedCallback) -> m SignalHandlerId
- type PadUnlinkedCallback = Pad -> IO ()
- afterPadUnlinked :: (IsPad a, MonadIO m) => a -> ((?self :: a) => PadUnlinkedCallback) -> m SignalHandlerId
- onPadUnlinked :: (IsPad a, MonadIO m) => a -> ((?self :: a) => PadUnlinkedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Pad (ManagedPtr Pad) |
Instances
Eq Pad Source # | |
GObject Pad Source # | |
Defined in GI.Gst.Objects.Pad | |
ManagedPtrNewtype Pad Source # | |
Defined in GI.Gst.Objects.Pad toManagedPtr :: Pad -> ManagedPtr Pad # | |
TypedObject Pad Source # | |
Defined in GI.Gst.Objects.Pad | |
HasParentTypes Pad Source # | |
Defined in GI.Gst.Objects.Pad | |
IsGValue (Maybe Pad) Source # | Convert |
Defined in GI.Gst.Objects.Pad | |
type ParentTypes Pad Source # | |
Defined in GI.Gst.Objects.Pad |
class (GObject o, IsDescendantOf Pad o) => IsPad o Source #
Instances
(GObject o, IsDescendantOf Pad o) => IsPad o Source # | |
Defined in GI.Gst.Objects.Pad |
Methods
Click to display all available methods, including inherited ones
Methods
activateMode, addControlBinding, addProbe, bindProperty, bindPropertyFull, canLink, chain, chainList, checkReconfigure, createStreamId, defaultError, eventDefault, forceFloating, forward, freezeNotify, getv, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, hasCurrentCaps, isActive, isBlocked, isBlocking, isFloating, isLinked, iterateInternalLinks, iterateInternalLinksDefault, 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, getLastFlowReturn, getName, getOffset, getPadTemplate, getPadTemplateCaps, getParent, getParentElement, getPathString, getPeer, getProperty, getQdata, getRange, getSingleInternalLink, getStickyEvent, getStream, getStreamId, getTaskState, getValue.
Setters
setActivateFunctionFull, setActivatemodeFunctionFull, setActive, setChainFunctionFull, setChainListFunctionFull, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setData, setDataFull, setElementPrivate, setEventFullFunctionFull, setEventFunctionFull, setGetrangeFunctionFull, setIterateInternalLinksFunctionFull, setLinkFunctionFull, setName, setOffset, setParent, setProperty, setQueryFunctionFull, setUnlinkFunctionFull.
activateMode
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadMode |
|
-> Bool |
|
-> m Bool | Returns: MT safe. |
Activates or deactivates the given pad in mode
via dispatching to the
pad's activatemodefunc. For use from within pad activation functions only.
If you don't know what this is, you probably don't want to call it.
addProbe
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> [PadProbeType] |
|
-> PadProbeCallback |
|
-> m CULong | Returns: an id or 0 if no probe is pending. The id can be used to remove the
probe with MT safe. |
Be notified of different states of pads. The provided callback is called for
every state that matches mask
.
Probes are called in groups: First GST_PAD_PROBE_TYPE_BLOCK probes are
called, then others, then finally GST_PAD_PROBE_TYPE_IDLE. The only
exception here are GST_PAD_PROBE_TYPE_IDLE probes that are called
immediately if the pad is already idle while calling padAddProbe
.
In each of the groups, probes are called in the order in which they were
added.
canLink
:: (HasCallStack, MonadIO m, IsPad a, IsPad b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Checks if the source pad and the sink pad are compatible so they can be linked.
chain
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Buffer |
|
-> m FlowReturn | Returns: a MT safe. |
Chain a buffer to pad
.
The function returns GST_FLOW_FLUSHING
if the pad was flushing.
If the buffer type is not acceptable for pad
(as negotiated with a
preceding GST_EVENT_CAPS event), this function returns
GST_FLOW_NOT_NEGOTIATED
.
The function proceeds calling the chain function installed on pad
(see
gst_pad_set_chain_function()
) and the return value of that function is
returned to the caller. GST_FLOW_NOT_SUPPORTED
is returned if pad
has no
chain function.
In all cases, success or failure, the caller loses its reference to buffer
after calling this function.
chainList
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> BufferList |
|
-> m FlowReturn | Returns: a |
Chain a bufferlist to pad
.
The function returns GST_FLOW_FLUSHING
if the pad was flushing.
If pad
was not negotiated properly with a CAPS event, this function
returns GST_FLOW_NOT_NEGOTIATED
.
The function proceeds calling the chainlist function installed on pad
(see
gst_pad_set_chain_list_function()
) and the return value of that function is
returned to the caller. GST_FLOW_NOT_SUPPORTED
is returned if pad
has no
chainlist function.
In all cases, success or failure, the caller loses its reference to list
after calling this function.
MT safe.
checkReconfigure
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: |
Check and clear the GST_PAD_FLAG_NEED_RECONFIGURE
flag on pad
and return True
if the flag was set.
createStreamId
:: (HasCallStack, MonadIO m, IsPad a, IsElement b) | |
=> a |
|
-> b |
|
-> Maybe Text |
|
-> m Text | Returns: A stream-id for |
Creates a stream-id for the source Pad
pad
by combining the
upstream information with the optional streamId
of the stream
of pad
. pad
must have a parent Element
and which must have zero
or one sinkpad. streamId
can only be Nothing
if the parent element
of pad
has only a single source pad.
This function generates an unique stream-id by getting the upstream
stream-start event stream ID and appending streamId
to it. If the
element has no sinkpad it will generate an upstream stream-id by
doing an URI query on the element and in the worst case just uses
a random number. Source elements that don't implement the URI
handler interface should ideally generate a unique, deterministic
stream-id manually instead.
Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format %03u instead of %u.
eventDefault
:: (HasCallStack, MonadIO m, IsPad a, IsObject b) | |
=> a |
|
-> Maybe b |
|
-> Event |
|
-> m Bool | Returns: |
Invokes the default event handler for the given pad.
The EOS event will pause the task associated with pad
before it is forwarded
to all internally linked pads,
The event is sent to all pads internally linked to pad
. This function
takes ownership of event
.
forward
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadForwardFunction |
|
-> m Bool | Returns: |
Calls forward
for all internally linked pads of pad
. This function deals with
dynamically changing internal pads and will make sure that the forward
function is only called once for each pad.
When forward
returns True
, no further pads will be processed.
getAllowedCaps
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Maybe Caps) | Returns: the allowed MT safe. |
Gets the capabilities of the allowed media types that can flow through
pad
and its peer.
The allowed capabilities is calculated as the intersection of the results of
calling padQueryCaps
on pad
and its peer. The caller owns a reference
on the resulting caps.
getCurrentCaps
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Maybe Caps) | Returns: the current caps of the pad with
incremented ref-count or |
Gets the capabilities currently configured on pad
with the last
GST_EVENT_CAPS
event.
getDirection
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m PadDirection | Returns: the MT safe. |
Gets the direction of the pad. The direction of the pad is decided at construction time so this function does not take the LOCK.
getElementPrivate
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Ptr ()) | Returns: a |
Gets the private data of a pad. No locking is performed in this function.
getLastFlowReturn
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m FlowReturn |
Gets the FlowReturn
return from the last data passed by this pad.
Since: 1.4
getOffset
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Int64 | Returns: the offset. |
Get the offset applied to the running time of pad
. pad
has to be a source
pad.
getPadTemplate
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Maybe PadTemplate) | Returns: the |
Gets the template for pad
.
getPadTemplateCaps
padGetPadTemplateCaps Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Caps | Returns: the |
Gets the capabilities for pad
's template.
getParentElement
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Maybe Element) | Returns: the parent of the pad. The caller has a reference on the parent, so unref when you're finished with it. MT safe. |
getPeer
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Maybe Pad) | Returns: the peer MT safe. |
Gets the peer of pad
. This function refs the peer pad so
you need to unref it after use.
getRange
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Word64 |
|
-> Word32 |
|
-> m (FlowReturn, Buffer) | Returns: a MT safe. |
When pad
is flushing this function returns GST_FLOW_FLUSHING
immediately and buffer
is Nothing
.
Calls the getrange function of pad
, see PadGetRangeFunction
for a
description of a getrange function. If pad
has no getrange function
installed (see gst_pad_set_getrange_function()
) this function returns
GST_FLOW_NOT_SUPPORTED
.
If buffer
points to a variable holding Nothing
, a valid new Buffer
will be
placed in buffer
when this function returns GST_FLOW_OK
. The new buffer
must be freed with gst_buffer_unref()
after usage.
When buffer
points to a variable that points to a valid Buffer
, the
buffer will be filled with the result data when this function returns
GST_FLOW_OK
. If the provided buffer is larger than size
, only
size
bytes will be filled in the result buffer and its size will be updated
accordingly.
Note that less than size
bytes can be returned in buffer
when, for example,
an EOS condition is near or when buffer
is not large enough to hold size
bytes. The caller should check the result buffer size to get the result size.
When this function returns any other result value than GST_FLOW_OK
, buffer
will be unchanged.
This is a lowlevel function. Usually padPullRange
is used.
getSingleInternalLink
padGetSingleInternalLink Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Maybe Pad) | Returns: a |
If there is a single internal link of the given pad, this function will return it. Otherwise, it will return NULL.
Since: 1.18
getStickyEvent
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> EventType |
|
-> Word32 |
|
-> m (Maybe Event) | Returns: a |
Returns a new reference of the sticky event of type eventType
from the event.
getStream
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Maybe Stream) | Returns: the current |
Returns the current Stream
for the pad
, or Nothing
if none has been
set yet, i.e. the pad has not received a stream-start event yet.
This is a convenience wrapper around padGetStickyEvent
and
eventParseStream
.
Since: 1.10
getStreamId
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Maybe Text) | Returns: a newly-allocated copy of the stream-id for
|
Returns the current stream-id for the pad
, or Nothing
if none has been
set yet, i.e. the pad has not received a stream-start event yet.
This is a convenience wrapper around padGetStickyEvent
and
eventParseStreamStart
.
The returned stream-id string should be treated as an opaque string, its contents should not be interpreted.
Since: 1.2
getTaskState
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m TaskState | Returns: The current state of |
Get pad
task state. If no task is currently
set, GST_TASK_STOPPED
is returned.
Since: 1.12
hasCurrentCaps
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: |
Check if pad
has caps set on it with a GST_EVENT_CAPS
event.
isActive
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: MT safe. |
Query if a pad is active
isBlocked
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: MT safe. |
Checks if the pad is blocked or not. This function returns the
last requested state of the pad. It is not certain that the pad
is actually blocking at this point (see padIsBlocking
).
isBlocking
isLinked
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: MT safe. |
Checks if a pad
is linked to another pad or not.
iterateInternalLinks
padIterateInternalLinks Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Maybe Iterator) | Returns: a new |
Gets an iterator for the pads to which the given pad is linked to inside of the parent element.
Each Pad
element yielded by the iterator will have its refcount increased,
so unref after use.
Free-function: gst_iterator_free
iterateInternalLinksDefault
padIterateInternalLinksDefault Source #
:: (HasCallStack, MonadIO m, IsPad a, IsObject b) | |
=> a |
|
-> Maybe b |
|
-> m (Maybe Iterator) | Returns: a |
Iterate the list of pads to which the given pad is linked to inside of the parent element. This is the default handler, and thus returns an iterator of all of the pads inside the parent element with opposite direction.
The caller must free this iterator after use with iteratorFree
.
link
:: (HasCallStack, MonadIO m, IsPad a, IsPad b) | |
=> a |
|
-> b |
|
-> m PadLinkReturn | Returns: A result code indicating if the connection worked or what went wrong. MT Safe. |
Links the source pad and the sink pad.
linkFull
:: (HasCallStack, MonadIO m, IsPad a, IsPad b) | |
=> a |
|
-> b |
|
-> [PadLinkCheck] |
|
-> m PadLinkReturn | Returns: A result code indicating if the connection worked or what went wrong. |
Links the source pad and the sink pad.
This variant of gst_pad_link
provides a more granular control on the
checks being done when linking. While providing some considerable speedups
the caller of this method must be aware that wrong usage of those flags
can cause severe issues. Refer to the documentation of PadLinkCheck
for more information.
MT Safe.
linkGetName
:: (HasCallStack, MonadIO m) | |
=> PadLinkReturn |
|
-> m Text | Returns: a static string with the name of the pad-link return. |
Gets a string representing the given pad-link return.
Since: 1.4
linkMaybeGhosting
:: (HasCallStack, MonadIO m, IsPad a, IsPad b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: whether the link succeeded. |
Links src
to sink
, creating any GhostPad
's in between as necessary.
This is a convenience function to save having to create and add intermediate
GhostPad
's as required for linking across Bin
boundaries.
If src
or sink
pads don't have parent elements or do not share a common
ancestor, the link will fail.
Since: 1.10
linkMaybeGhostingFull
padLinkMaybeGhostingFull Source #
:: (HasCallStack, MonadIO m, IsPad a, IsPad b) | |
=> a |
|
-> b |
|
-> [PadLinkCheck] |
|
-> m Bool | Returns: whether the link succeeded. |
Links src
to sink
, creating any GhostPad
's in between as necessary.
This is a convenience function to save having to create and add intermediate
GhostPad
's as required for linking across Bin
boundaries.
If src
or sink
pads don't have parent elements or do not share a common
ancestor, the link will fail.
Calling padLinkMaybeGhostingFull
with
flags
== PadLinkCheckDefault
is the recommended way of linking
pads with safety checks applied.
Since: 1.10
markReconfigure
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m () |
Mark a pad for needing reconfiguration. The next call to
padCheckReconfigure
will return True
after this call.
needsReconfigure
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: |
Check the GST_PAD_FLAG_NEED_RECONFIGURE
flag on pad
and return True
if the flag was set.
new
:: (HasCallStack, MonadIO m) | |
=> Maybe Text |
|
-> PadDirection |
|
-> m (Maybe Pad) | Returns: a new MT safe. |
Creates a new pad with the given name in the given direction.
If name is Nothing
, a guaranteed unique name (across all pads)
will be assigned.
This function makes a copy of the name so you can safely free the name.
newFromStaticTemplate
padNewFromStaticTemplate Source #
:: (HasCallStack, MonadIO m) | |
=> StaticPadTemplate |
|
-> Text |
|
-> m (Maybe Pad) | Returns: a new |
Creates a new pad with the given name from the given static template.
If name is Nothing
, a guaranteed unique name (across all pads)
will be assigned.
This function makes a copy of the name so you can safely free the name.
newFromTemplate
:: (HasCallStack, MonadIO m, IsPadTemplate a) | |
=> a |
|
-> Maybe Text |
|
-> m (Maybe Pad) | Returns: a new |
Creates a new pad with the given name from the given template.
If name is Nothing
, a guaranteed unique name (across all pads)
will be assigned.
This function makes a copy of the name so you can safely free the name.
pauseTask
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: a |
Pause the task of pad
. This function will also wait until the
function executed by the task is finished if this function is not
called from the task function.
peerQuery
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Query |
|
-> m Bool | Returns: |
Performs padQuery
on the peer of pad
.
The caller is responsible for both the allocation and deallocation of the query structure.
peerQueryAcceptCaps
padPeerQueryAcceptCaps Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Caps |
|
-> m Bool | Returns: |
Check if the peer of pad
accepts caps
. If pad
has no peer, this function
returns True
.
peerQueryCaps
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Maybe Caps | |
-> m Caps | Returns: the caps of the peer pad with incremented
ref-count. When there is no peer pad, this function returns |
Gets the capabilities of the peer connected to this pad. Similar to
padQueryCaps
.
When called on srcpads filter
contains the caps that
upstream could produce in the order preferred by upstream. When
called on sinkpads filter
contains the caps accepted by
downstream in the preferred order. filter
might be Nothing
but
if it is not Nothing
the returned caps will be a subset of filter
.
peerQueryConvert
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Format |
|
-> Int64 |
|
-> Format |
|
-> m (Bool, Int64) | Returns: |
Queries the peer pad of a given sink pad to convert srcVal
in srcFormat
to destFormat
.
peerQueryDuration
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Format |
|
-> m (Bool, Int64) | Returns: |
Queries the peer pad of a given sink pad for the total stream duration.
peerQueryPosition
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Format |
|
-> m (Bool, Int64) | Returns: |
Queries the peer of a given sink pad for the stream position.
proxyQueryAcceptCaps
padProxyQueryAcceptCaps Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Query |
|
-> m Bool | Returns: |
Checks if all internally linked pads of pad
accepts the caps in query
and
returns the intersection of the results.
This function is useful as a default accept caps query function for an element that can handle any stream format, but requires caps that are acceptable for all opposite pads.
proxyQueryCaps
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Query |
|
-> m Bool | Returns: |
Calls padQueryCaps
for all internally linked pads of pad
and returns
the intersection of the results.
This function is useful as a default caps query function for an element that can handle any stream format, but requires all its pads to have the same caps. Two such elements are tee and adder.
pullRange
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Word64 |
|
-> Word32 |
|
-> m (FlowReturn, Buffer) | Returns: a MT safe. |
Pulls a buffer
from the peer pad or fills up a provided buffer.
This function will first trigger the pad block signal if it was installed.
When pad
is not linked GST_FLOW_NOT_LINKED
is returned else this
function returns the result of padGetRange
on the peer pad.
See padGetRange
for a list of return values and for the
semantics of the arguments of this function.
If buffer
points to a variable holding Nothing
, a valid new Buffer
will be
placed in buffer
when this function returns GST_FLOW_OK
. The new buffer
must be freed with gst_buffer_unref()
after usage. When this function
returns any other result value, buffer
will still point to Nothing
.
When buffer
points to a variable that points to a valid Buffer
, the
buffer will be filled with the result data when this function returns
GST_FLOW_OK
. When this function returns any other result value,
buffer
will be unchanged. If the provided buffer is larger than size
, only
size
bytes will be filled in the result buffer and its size will be updated
accordingly.
Note that less than size
bytes can be returned in buffer
when, for example,
an EOS condition is near or when buffer
is not large enough to hold size
bytes. The caller should check the result buffer size to get the result size.
push
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Buffer |
|
-> m FlowReturn | Returns: a MT safe. |
Pushes a buffer to the peer of pad
.
This function will call installed block probes before triggering any installed data probes.
The function proceeds calling padChain
on the peer pad and returns
the value from that function. If pad
has no peer, GST_FLOW_NOT_LINKED
will
be returned.
In all cases, success or failure, the caller loses its reference to buffer
after calling this function.
pushEvent
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Event |
|
-> m Bool | Returns: MT safe. |
Sends the event to the peer of the given pad. This function is mainly used by elements to send events to their peer elements.
This function takes ownership of the provided event so you should
gst_event_ref()
it if you want to reuse the event after this call.
pushList
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> BufferList |
|
-> m FlowReturn | Returns: a MT safe. |
Pushes a buffer list to the peer of pad
.
This function will call installed block probes before triggering any installed data probes.
The function proceeds calling the chain function on the peer pad and returns
the value from that function. If pad
has no peer, GST_FLOW_NOT_LINKED
will
be returned. If the peer pad does not have any installed chainlist function
every group buffer of the list will be merged into a normal Buffer
and
chained via padChain
.
In all cases, success or failure, the caller loses its reference to list
after calling this function.
query
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Query |
|
-> m Bool | Returns: |
Dispatches a query to a pad. The query should have been allocated by the caller via one of the type-specific allocation functions. The element that the pad belongs to is responsible for filling the query with an appropriate response, which should then be parsed with a type-specific query parsing function.
Again, the caller is responsible for both the allocation and deallocation of the query structure.
Please also note that some queries might need a running pipeline to work.
queryAcceptCaps
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Caps |
|
-> m Bool | Returns: |
Check if the given pad accepts the caps.
queryCaps
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Maybe Caps | |
-> m Caps | Returns: the caps of the pad with incremented ref-count. |
Gets the capabilities this pad can produce or consume.
Note that this method doesn't necessarily return the caps set by sending a
eventNewCaps
- use padGetCurrentCaps
for that instead.
gst_pad_query_caps returns all possible caps a pad can operate with, using
the pad's CAPS query function, If the query fails, this function will return
filter
, if not Nothing
, otherwise ANY.
When called on sinkpads filter
contains the caps that
upstream could produce in the order preferred by upstream. When
called on srcpads filter
contains the caps accepted by
downstream in the preferred order. filter
might be Nothing
but
if it is not Nothing
the returned caps will be a subset of filter
.
Note that this function does not return writable Caps
, use
gst_caps_make_writable()
before modifying the caps.
queryConvert
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Format |
|
-> Int64 |
|
-> Format |
|
-> m (Bool, Int64) | Returns: |
Queries a pad to convert srcVal
in srcFormat
to destFormat
.
queryDefault
:: (HasCallStack, MonadIO m, IsPad a, IsObject b) | |
=> a |
|
-> Maybe b |
|
-> Query |
|
-> m Bool | Returns: |
Invokes the default query handler for the given pad.
The query is sent to all pads internally linked to pad
. Note that
if there are many possible sink pads that are internally linked to
pad
, only one will be sent the query.
Multi-sinkpad elements should implement custom query handlers.
queryDuration
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Format |
|
-> m (Bool, Int64) | Returns: |
Queries a pad for the total stream duration.
queryPosition
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Format |
|
-> m (Bool, Int64) | Returns: |
Queries a pad for the stream position.
removeProbe
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> CULong |
|
-> m () |
Remove the probe with id
from pad
.
MT safe.
sendEvent
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Event |
|
-> m Bool | Returns: |
Sends the event to the pad. This function can be used by applications to send events in the pipeline.
If pad
is a source pad, event
should be an upstream event. If pad
is a
sink pad, event
should be a downstream event. For example, you would not
send a GST_EVENT_EOS
on a src pad; EOS events only propagate downstream.
Furthermore, some downstream events have to be serialized with data flow,
like EOS, while some can travel out-of-band, like GST_EVENT_FLUSH_START
. If
the event needs to be serialized with data flow, this function will take the
pad's stream lock while calling its event function.
To find out whether an event type is upstream, downstream, or downstream and
serialized, see EventTypeFlags
, eventTypeGetFlags
,
GST_EVENT_IS_UPSTREAM
, GST_EVENT_IS_DOWNSTREAM
, and
GST_EVENT_IS_SERIALIZED
. Note that in practice that an application or
plugin doesn't need to bother itself with this information; the core handles
all necessary locks and checks.
This function takes ownership of the provided event so you should
gst_event_ref()
it if you want to reuse the event after this call.
setActivateFunctionFull
padSetActivateFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadActivateFunction |
|
-> m () |
Sets the given activate function for pad
. The activate function will
dispatch to padActivateMode
to perform the actual activation.
Only makes sense to set on sink pads.
Call this function if your sink pad can start a pull-based task.
setActivatemodeFunctionFull
padSetActivatemodeFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadActivateModeFunction |
|
-> m () |
Sets the given activate_mode function for the pad. An activate_mode function prepares the element for data passing.
setActive
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Bool |
|
-> m Bool | Returns: MT safe. |
Activates or deactivates the given pad. Normally called from within core state change functions.
If active
, makes sure the pad is active. If it is already active, either in
push or pull mode, just return. Otherwise dispatches to the pad's activate
function to perform the actual activation.
If not active
, calls padActivateMode
with the pad's current mode
and a False
argument.
setChainFunctionFull
padSetChainFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadChainFunction |
|
-> m () |
Sets the given chain function for the pad. The chain function is called to
process a Buffer
input buffer. see PadChainFunction
for more details.
setChainListFunctionFull
padSetChainListFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadChainListFunction |
|
-> m () |
Sets the given chain list function for the pad. The chainlist function is
called to process a BufferList
input buffer list. See
PadChainListFunction
for more details.
setElementPrivate
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Ptr () |
|
-> m () |
Set the given private data gpointer on the pad. This function can only be used by the element that owns the pad. No locking is performed in this function.
setEventFullFunctionFull
padSetEventFullFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadEventFullFunction |
|
-> m () |
Sets the given event handler for the pad.
Since: 1.8
setEventFunctionFull
padSetEventFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadEventFunction |
|
-> m () |
Sets the given event handler for the pad.
setGetrangeFunctionFull
padSetGetrangeFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadGetRangeFunction |
|
-> m () |
Sets the given getrange function for the pad. The getrange function is
called to produce a new Buffer
to start the processing pipeline. see
PadGetRangeFunction
for a description of the getrange function.
setIterateInternalLinksFunctionFull
padSetIterateInternalLinksFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadIterIntLinkFunction |
|
-> m () |
Sets the given internal link iterator function for the pad.
setLinkFunctionFull
padSetLinkFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadLinkFunction |
|
-> m () |
Sets the given link function for the pad. It will be called when the pad is linked with another pad.
The return value GST_PAD_LINK_OK
should be used when the connection can be
made.
The return value GST_PAD_LINK_REFUSED
should be used when the connection
cannot be made for some reason.
If link
is installed on a source pad, it should call the PadLinkFunction
of the peer sink pad, if present.
setOffset
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Int64 |
|
-> m () |
Set the offset that will be applied to the running time of pad
.
setQueryFunctionFull
padSetQueryFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadQueryFunction |
|
-> m () |
Set the given query function for the pad.
setUnlinkFunctionFull
padSetUnlinkFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadUnlinkFunction |
|
-> m () |
Sets the given unlink function for the pad. It will be called when the pad is unlinked.
Note that the pad's lock is already held when the unlink function is called, so most pad functions cannot be called from within the callback.
startTask
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> TaskFunction |
|
-> m Bool | Returns: a |
Starts a task that repeatedly calls func
with userData
. This function
is mostly used in pad activation functions to start the dataflow.
The GST_PAD_STREAM_LOCK
of pad
will automatically be acquired
before func
is called.
stickyEventsForeach
padStickyEventsForeach Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadStickyEventsForeachFunction |
|
-> m () |
Iterates all sticky events on pad
and calls foreachFunc
for every
event. If foreachFunc
returns False
the iteration is immediately stopped.
stopTask
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: a |
Stop the task of pad
. This function will also make sure that the
function executed by the task will effectively stop if not called
from the GstTaskFunction.
This function will deadlock if called from the GstTaskFunction of
the task. Use taskPause
instead.
Regardless of whether the pad has a task, the stream lock is acquired and released so as to ensure that streaming through this pad has finished.
storeStickyEvent
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Event |
|
-> m FlowReturn | Returns: |
Store the sticky event
on pad
Since: 1.2
unlink
:: (HasCallStack, MonadIO m, IsPad a, IsPad b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: MT safe. |
Unlinks the source pad from the sink pad. Will emit the unlinked signal on both pads.
useFixedCaps
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m () |
A helper function you can use that sets the FIXED_CAPS flag This way the default CAPS query will always return the negotiated caps or in case the pad is not negotiated, the padtemplate caps.
The negotiated caps are the caps of the last CAPS event that passed on the pad. Use this function on a pad that, once it negotiated to a CAPS, cannot be renegotiated to something else.
Properties
caps
No description available in the introspection data.
getPadCaps :: (MonadIO m, IsPad o) => o -> m (Maybe Caps) Source #
Get the value of the “caps
” property.
When overloading is enabled, this is equivalent to
get
pad #caps
direction
No description available in the introspection data.
constructPadDirection :: (IsPad o, MonadIO m) => PadDirection -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “direction
” property. This is rarely needed directly, but it is used by new
.
getPadDirection :: (MonadIO m, IsPad o) => o -> m PadDirection Source #
Get the value of the “direction
” property.
When overloading is enabled, this is equivalent to
get
pad #direction
offset
The offset that will be applied to the running time of the pad.
Since: 1.6
constructPadOffset :: (IsPad o, MonadIO m) => Int64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “offset
” property. This is rarely needed directly, but it is used by new
.
getPadOffset :: (MonadIO m, IsPad o) => o -> m Int64 Source #
Get the value of the “offset
” property.
When overloading is enabled, this is equivalent to
get
pad #offset
setPadOffset :: (MonadIO m, IsPad o) => o -> Int64 -> m () Source #
Set the value of the “offset
” property.
When overloading is enabled, this is equivalent to
set
pad [ #offset:=
value ]
template
No description available in the introspection data.
clearPadTemplate :: (MonadIO m, IsPad o) => o -> m () Source #
Set the value of the “template
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#template
constructPadTemplate :: (IsPad o, MonadIO m, IsPadTemplate a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “template
” property. This is rarely needed directly, but it is used by new
.
getPadTemplate :: (MonadIO m, IsPad o) => o -> m (Maybe PadTemplate) Source #
Get the value of the “template
” property.
When overloading is enabled, this is equivalent to
get
pad #template
setPadTemplate :: (MonadIO m, IsPad o, IsPadTemplate a) => o -> a -> m () Source #
Set the value of the “template
” property.
When overloading is enabled, this is equivalent to
set
pad [ #template:=
value ]
Signals
linked
type PadLinkedCallback Source #
Signals that a pad has been linked to the peer pad.
afterPadLinked :: (IsPad a, MonadIO m) => a -> ((?self :: a) => PadLinkedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the linked signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
pad #linked callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onPadLinked :: (IsPad a, MonadIO m) => a -> ((?self :: a) => PadLinkedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the linked signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
pad #linked callback
unlinked
type PadUnlinkedCallback Source #
Signals that a pad has been unlinked from the peer pad.
afterPadUnlinked :: (IsPad a, MonadIO m) => a -> ((?self :: a) => PadUnlinkedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unlinked signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
pad #unlinked callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onPadUnlinked :: (IsPad a, MonadIO m) => a -> ((?self :: a) => PadUnlinkedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unlinked signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
pad #unlinked callback