Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
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
- getStickyEvent
- getStream
- getStreamId
- 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.
- newtype Pad = Pad (ManagedPtr Pad)
- class GObject o => IsPad o
- toPad :: IsPad o => o -> IO Pad
- noPad :: Maybe Pad
- data PadActivateModeMethodInfo
- padActivateMode :: (HasCallStack, MonadIO m, IsPad a) => a -> PadMode -> Bool -> m Bool
- data PadAddProbeMethodInfo
- padAddProbe :: (HasCallStack, MonadIO m, IsPad a) => a -> [PadProbeType] -> PadProbeCallback -> m CULong
- data PadCanLinkMethodInfo
- padCanLink :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> m Bool
- data PadChainMethodInfo
- padChain :: (HasCallStack, MonadIO m, IsPad a) => a -> Buffer -> m FlowReturn
- data PadChainListMethodInfo
- padChainList :: (HasCallStack, MonadIO m, IsPad a) => a -> BufferList -> m FlowReturn
- data PadCheckReconfigureMethodInfo
- padCheckReconfigure :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- data PadCreateStreamIdMethodInfo
- padCreateStreamId :: (HasCallStack, MonadIO m, IsPad a, IsElement b) => a -> b -> Maybe Text -> m Text
- data PadEventDefaultMethodInfo
- padEventDefault :: (HasCallStack, MonadIO m, IsPad a, IsObject b) => a -> Maybe b -> Event -> m Bool
- data PadForwardMethodInfo
- padForward :: (HasCallStack, MonadIO m, IsPad a) => a -> PadForwardFunction -> m Bool
- data PadGetAllowedCapsMethodInfo
- padGetAllowedCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Caps)
- data PadGetCurrentCapsMethodInfo
- padGetCurrentCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Caps)
- data PadGetDirectionMethodInfo
- padGetDirection :: (HasCallStack, MonadIO m, IsPad a) => a -> m PadDirection
- data PadGetElementPrivateMethodInfo
- padGetElementPrivate :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Ptr ())
- data PadGetLastFlowReturnMethodInfo
- padGetLastFlowReturn :: (HasCallStack, MonadIO m, IsPad a) => a -> m FlowReturn
- data PadGetOffsetMethodInfo
- padGetOffset :: (HasCallStack, MonadIO m, IsPad a) => a -> m Int64
- data PadGetPadTemplateMethodInfo
- padGetPadTemplate :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe PadTemplate)
- data PadGetPadTemplateCapsMethodInfo
- padGetPadTemplateCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> m Caps
- data PadGetParentElementMethodInfo
- padGetParentElement :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Element)
- data PadGetPeerMethodInfo
- padGetPeer :: (HasCallStack, MonadIO m, IsPad a) => a -> m Pad
- data PadGetRangeMethodInfo
- padGetRange :: (HasCallStack, MonadIO m, IsPad a) => a -> Word64 -> Word32 -> m (FlowReturn, Buffer)
- data PadGetStickyEventMethodInfo
- padGetStickyEvent :: (HasCallStack, MonadIO m, IsPad a) => a -> EventType -> Word32 -> m (Maybe Event)
- data PadGetStreamMethodInfo
- padGetStream :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Stream)
- data PadGetStreamIdMethodInfo
- padGetStreamId :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Text)
- data PadHasCurrentCapsMethodInfo
- padHasCurrentCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- data PadIsActiveMethodInfo
- padIsActive :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- data PadIsBlockedMethodInfo
- padIsBlocked :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- data PadIsBlockingMethodInfo
- padIsBlocking :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- data PadIsLinkedMethodInfo
- padIsLinked :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- data PadIterateInternalLinksMethodInfo
- padIterateInternalLinks :: (HasCallStack, MonadIO m, IsPad a) => a -> m (Maybe Iterator)
- data PadIterateInternalLinksDefaultMethodInfo
- padIterateInternalLinksDefault :: (HasCallStack, MonadIO m, IsPad a, IsObject b) => a -> Maybe b -> m (Maybe Iterator)
- data PadLinkMethodInfo
- padLink :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> m PadLinkReturn
- data PadLinkFullMethodInfo
- padLinkFull :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> [PadLinkCheck] -> m PadLinkReturn
- padLinkGetName :: (HasCallStack, MonadIO m) => PadLinkReturn -> m Text
- data PadLinkMaybeGhostingMethodInfo
- padLinkMaybeGhosting :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> m Bool
- data PadLinkMaybeGhostingFullMethodInfo
- padLinkMaybeGhostingFull :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> [PadLinkCheck] -> m Bool
- data PadMarkReconfigureMethodInfo
- padMarkReconfigure :: (HasCallStack, MonadIO m, IsPad a) => a -> m ()
- data PadNeedsReconfigureMethodInfo
- 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)
- data PadPauseTaskMethodInfo
- padPauseTask :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- data PadPeerQueryMethodInfo
- padPeerQuery :: (HasCallStack, MonadIO m, IsPad a) => a -> Query -> m Bool
- data PadPeerQueryAcceptCapsMethodInfo
- padPeerQueryAcceptCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Caps -> m Bool
- data PadPeerQueryCapsMethodInfo
- padPeerQueryCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Maybe Caps -> m Caps
- data PadPeerQueryConvertMethodInfo
- padPeerQueryConvert :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> Int64 -> Format -> m (Bool, Int64)
- data PadPeerQueryDurationMethodInfo
- padPeerQueryDuration :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> m (Bool, Int64)
- data PadPeerQueryPositionMethodInfo
- padPeerQueryPosition :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> m (Bool, Int64)
- data PadProxyQueryAcceptCapsMethodInfo
- padProxyQueryAcceptCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Query -> m Bool
- data PadProxyQueryCapsMethodInfo
- padProxyQueryCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Query -> m Bool
- data PadPullRangeMethodInfo
- padPullRange :: (HasCallStack, MonadIO m, IsPad a) => a -> Word64 -> Word32 -> m (FlowReturn, Buffer)
- data PadPushMethodInfo
- padPush :: (HasCallStack, MonadIO m, IsPad a) => a -> Buffer -> m FlowReturn
- data PadPushEventMethodInfo
- padPushEvent :: (HasCallStack, MonadIO m, IsPad a) => a -> Event -> m Bool
- data PadPushListMethodInfo
- padPushList :: (HasCallStack, MonadIO m, IsPad a) => a -> BufferList -> m FlowReturn
- data PadQueryMethodInfo
- padQuery :: (HasCallStack, MonadIO m, IsPad a) => a -> Query -> m Bool
- data PadQueryAcceptCapsMethodInfo
- padQueryAcceptCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Caps -> m Bool
- data PadQueryCapsMethodInfo
- padQueryCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> Maybe Caps -> m Caps
- data PadQueryConvertMethodInfo
- padQueryConvert :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> Int64 -> Format -> m (Bool, Int64)
- data PadQueryDefaultMethodInfo
- padQueryDefault :: (HasCallStack, MonadIO m, IsPad a, IsObject b) => a -> Maybe b -> Query -> m Bool
- data PadQueryDurationMethodInfo
- padQueryDuration :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> m (Bool, Int64)
- data PadQueryPositionMethodInfo
- padQueryPosition :: (HasCallStack, MonadIO m, IsPad a) => a -> Format -> m (Bool, Int64)
- data PadRemoveProbeMethodInfo
- padRemoveProbe :: (HasCallStack, MonadIO m, IsPad a) => a -> CULong -> m ()
- data PadSendEventMethodInfo
- padSendEvent :: (HasCallStack, MonadIO m, IsPad a) => a -> Event -> m Bool
- data PadSetActivateFunctionFullMethodInfo
- padSetActivateFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadActivateFunction -> m ()
- data PadSetActivatemodeFunctionFullMethodInfo
- padSetActivatemodeFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadActivateModeFunction -> m ()
- data PadSetActiveMethodInfo
- padSetActive :: (HasCallStack, MonadIO m, IsPad a) => a -> Bool -> m Bool
- data PadSetChainFunctionFullMethodInfo
- padSetChainFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadChainFunction -> m ()
- data PadSetChainListFunctionFullMethodInfo
- padSetChainListFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadChainListFunction -> m ()
- data PadSetElementPrivateMethodInfo
- padSetElementPrivate :: (HasCallStack, MonadIO m, IsPad a) => a -> Ptr () -> m ()
- data PadSetEventFullFunctionFullMethodInfo
- padSetEventFullFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadEventFullFunction -> m ()
- data PadSetEventFunctionFullMethodInfo
- padSetEventFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadEventFunction -> m ()
- data PadSetGetrangeFunctionFullMethodInfo
- padSetGetrangeFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadGetRangeFunction -> m ()
- data PadSetIterateInternalLinksFunctionFullMethodInfo
- padSetIterateInternalLinksFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadIterIntLinkFunction -> m ()
- data PadSetLinkFunctionFullMethodInfo
- padSetLinkFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadLinkFunction -> m ()
- data PadSetOffsetMethodInfo
- padSetOffset :: (HasCallStack, MonadIO m, IsPad a) => a -> Int64 -> m ()
- data PadSetQueryFunctionFullMethodInfo
- padSetQueryFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadQueryFunction -> m ()
- data PadSetUnlinkFunctionFullMethodInfo
- padSetUnlinkFunctionFull :: (HasCallStack, MonadIO m, IsPad a) => a -> PadUnlinkFunction -> m ()
- data PadStartTaskMethodInfo
- padStartTask :: (HasCallStack, MonadIO m, IsPad a) => a -> TaskFunction -> m Bool
- data PadStickyEventsForeachMethodInfo
- padStickyEventsForeach :: (HasCallStack, MonadIO m, IsPad a) => a -> PadStickyEventsForeachFunction -> m ()
- data PadStopTaskMethodInfo
- padStopTask :: (HasCallStack, MonadIO m, IsPad a) => a -> m Bool
- data PadStoreStickyEventMethodInfo
- padStoreStickyEvent :: (HasCallStack, MonadIO m, IsPad a) => a -> Event -> m FlowReturn
- data PadUnlinkMethodInfo
- padUnlink :: (HasCallStack, MonadIO m, IsPad a, IsPad b) => a -> b -> m Bool
- data PadUseFixedCapsMethodInfo
- padUseFixedCaps :: (HasCallStack, MonadIO m, IsPad a) => a -> m ()
- data PadCapsPropertyInfo
- getPadCaps :: (MonadIO m, IsPad o) => o -> m (Maybe Caps)
- padCaps :: AttrLabelProxy "caps"
- data PadDirectionPropertyInfo
- constructPadDirection :: IsPad o => PadDirection -> IO (GValueConstruct o)
- getPadDirection :: (MonadIO m, IsPad o) => o -> m PadDirection
- padDirection :: AttrLabelProxy "direction"
- data PadOffsetPropertyInfo
- constructPadOffset :: IsPad o => Int64 -> IO (GValueConstruct o)
- getPadOffset :: (MonadIO m, IsPad o) => o -> m Int64
- padOffset :: AttrLabelProxy "offset"
- setPadOffset :: (MonadIO m, IsPad o) => o -> Int64 -> m ()
- data PadTemplatePropertyInfo
- clearPadTemplate :: (MonadIO m, IsPad o) => o -> m ()
- constructPadTemplate :: (IsPad o, IsPadTemplate a) => a -> IO (GValueConstruct o)
- getPadTemplate :: (MonadIO m, IsPad o) => o -> m (Maybe PadTemplate)
- padTemplate :: AttrLabelProxy "template"
- setPadTemplate :: (MonadIO m, IsPad o, IsPadTemplate a) => o -> a -> m ()
- type C_PadLinkedCallback = Ptr () -> Ptr Pad -> Ptr () -> IO ()
- type PadLinkedCallback = Pad -> IO ()
- data PadLinkedSignalInfo
- afterPadLinked :: (IsPad a, MonadIO m) => a -> PadLinkedCallback -> m SignalHandlerId
- genClosure_PadLinked :: PadLinkedCallback -> IO Closure
- mk_PadLinkedCallback :: C_PadLinkedCallback -> IO (FunPtr C_PadLinkedCallback)
- noPadLinkedCallback :: Maybe PadLinkedCallback
- onPadLinked :: (IsPad a, MonadIO m) => a -> PadLinkedCallback -> m SignalHandlerId
- wrap_PadLinkedCallback :: PadLinkedCallback -> Ptr () -> Ptr Pad -> Ptr () -> IO ()
- type C_PadUnlinkedCallback = Ptr () -> Ptr Pad -> Ptr () -> IO ()
- type PadUnlinkedCallback = Pad -> IO ()
- data PadUnlinkedSignalInfo
- afterPadUnlinked :: (IsPad a, MonadIO m) => a -> PadUnlinkedCallback -> m SignalHandlerId
- genClosure_PadUnlinked :: PadUnlinkedCallback -> IO Closure
- mk_PadUnlinkedCallback :: C_PadUnlinkedCallback -> IO (FunPtr C_PadUnlinkedCallback)
- noPadUnlinkedCallback :: Maybe PadUnlinkedCallback
- onPadUnlinked :: (IsPad a, MonadIO m) => a -> PadUnlinkedCallback -> m SignalHandlerId
- wrap_PadUnlinkedCallback :: PadUnlinkedCallback -> Ptr () -> Ptr Pad -> Ptr () -> IO ()
Exported types
Pad (ManagedPtr Pad) |
GObject Pad Source # | |
IsObject Pad Source # | |
IsPad Pad Source # | |
IsObject Pad Source # | |
((~) * info (ResolvePadMethod t Pad), MethodInfo * info Pad p) => IsLabel t (Pad -> p) Source # | |
((~) * info (ResolvePadMethod t Pad), MethodInfo * info Pad p) => IsLabelProxy t (Pad -> p) Source # | |
HasAttributeList * Pad Source # | |
type AttributeList Pad Source # | |
type SignalList Pad Source # | |
Methods
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
data PadAddProbeMethodInfo Source #
((~) * signature ([PadProbeType] -> PadProbeCallback -> m CULong), MonadIO m, IsPad a) => MethodInfo * PadAddProbeMethodInfo a signature Source # | |
:: (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
data PadCanLinkMethodInfo Source #
((~) * signature (b -> m Bool), MonadIO m, IsPad a, IsPad b) => MethodInfo * PadCanLinkMethodInfo a signature Source # | |
:: (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
data PadChainMethodInfo Source #
((~) * signature (Buffer -> m FlowReturn), MonadIO m, IsPad a) => MethodInfo * PadChainMethodInfo a signature Source # | |
:: (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
data PadChainListMethodInfo Source #
((~) * signature (BufferList -> m FlowReturn), MonadIO m, IsPad a) => MethodInfo * PadChainListMethodInfo a signature Source # | |
:: (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
data PadCheckReconfigureMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsPad a) => MethodInfo * PadCheckReconfigureMethodInfo a signature Source # | |
:: (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
data PadForwardMethodInfo Source #
((~) * signature (PadForwardFunction -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadForwardMethodInfo a signature Source # | |
:: (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
data PadGetAllowedCapsMethodInfo Source #
((~) * signature (m (Maybe Caps)), MonadIO m, IsPad a) => MethodInfo * PadGetAllowedCapsMethodInfo a signature Source # | |
:: (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
data PadGetCurrentCapsMethodInfo Source #
((~) * signature (m (Maybe Caps)), MonadIO m, IsPad a) => MethodInfo * PadGetCurrentCapsMethodInfo a signature Source # | |
:: (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
data PadGetDirectionMethodInfo Source #
((~) * signature (m PadDirection), MonadIO m, IsPad a) => MethodInfo * PadGetDirectionMethodInfo a signature Source # | |
:: (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
data PadGetElementPrivateMethodInfo Source #
((~) * signature (m (Ptr ())), MonadIO m, IsPad a) => MethodInfo * PadGetElementPrivateMethodInfo a signature Source # | |
:: (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
data PadGetLastFlowReturnMethodInfo Source #
((~) * signature (m FlowReturn), MonadIO m, IsPad a) => MethodInfo * PadGetLastFlowReturnMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m FlowReturn |
Gets the FlowReturn
return from the last data passed by this pad.
Since: 1.4
getOffset
data PadGetOffsetMethodInfo Source #
((~) * signature (m Int64), MonadIO m, IsPad a) => MethodInfo * PadGetOffsetMethodInfo a signature Source # | |
:: (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
data PadGetPadTemplateMethodInfo Source #
((~) * signature (m (Maybe PadTemplate)), MonadIO m, IsPad a) => MethodInfo * PadGetPadTemplateMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m (Maybe PadTemplate) | Returns: the |
Gets the template for pad
.
getPadTemplateCaps
data PadGetPadTemplateCapsMethodInfo Source #
((~) * signature (m Caps), MonadIO m, IsPad a) => MethodInfo * PadGetPadTemplateCapsMethodInfo a signature Source # | |
padGetPadTemplateCaps Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Caps | Returns: the |
Gets the capabilities for pad
's template.
getParentElement
data PadGetParentElementMethodInfo Source #
((~) * signature (m (Maybe Element)), MonadIO m, IsPad a) => MethodInfo * PadGetParentElementMethodInfo a signature Source # | |
:: (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
data PadGetPeerMethodInfo Source #
((~) * signature (m Pad), MonadIO m, IsPad a) => MethodInfo * PadGetPeerMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m 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
data PadGetRangeMethodInfo Source #
((~) * signature (Word64 -> Word32 -> m (FlowReturn, Buffer)), MonadIO m, IsPad a) => MethodInfo * PadGetRangeMethodInfo a signature Source # | |
:: (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.
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
data PadGetStreamMethodInfo Source #
((~) * signature (m (Maybe Stream)), MonadIO m, IsPad a) => MethodInfo * PadGetStreamMethodInfo a signature Source # | |
:: (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
data PadGetStreamIdMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m, IsPad a) => MethodInfo * PadGetStreamIdMethodInfo a signature Source # | |
:: (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
hasCurrentCaps
data PadHasCurrentCapsMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsPad a) => MethodInfo * PadHasCurrentCapsMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: |
Check if pad
has caps set on it with a GST_EVENT_CAPS
event.
isActive
data PadIsActiveMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsPad a) => MethodInfo * PadIsActiveMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: MT safe. |
Query if a pad is active
isBlocked
data PadIsBlockedMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsPad a) => MethodInfo * PadIsBlockedMethodInfo a signature Source # | |
:: (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
data PadIsBlockingMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsPad a) => MethodInfo * PadIsBlockingMethodInfo a signature Source # | |
isLinked
data PadIsLinkedMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsPad a) => MethodInfo * PadIsLinkedMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> m Bool | Returns: MT safe. |
Checks if a pad
is linked to another pad or not.
iterateInternalLinks
data PadIterateInternalLinksMethodInfo Source #
((~) * signature (m (Maybe Iterator)), MonadIO m, IsPad a) => MethodInfo * PadIterateInternalLinksMethodInfo a signature Source # | |
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
data PadLinkMethodInfo Source #
((~) * signature (b -> m PadLinkReturn), MonadIO m, IsPad a, IsPad b) => MethodInfo * PadLinkMethodInfo a signature Source # | |
:: (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
data PadLinkFullMethodInfo Source #
((~) * signature (b -> [PadLinkCheck] -> m PadLinkReturn), MonadIO m, IsPad a, IsPad b) => MethodInfo * PadLinkFullMethodInfo a signature Source # | |
:: (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
data PadLinkMaybeGhostingMethodInfo Source #
((~) * signature (b -> m Bool), MonadIO m, IsPad a, IsPad b) => MethodInfo * PadLinkMaybeGhostingMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPad a, IsPad b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: whether the link succeeded. |
Links src
to sink
, creating any 'GI.Gst.Objects.GhostPad.GhostPad'\'s in between as necessary.
This is a convenience function to save having to create and add intermediate
'GI.Gst.Objects.GhostPad.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
data PadLinkMaybeGhostingFullMethodInfo Source #
((~) * signature (b -> [PadLinkCheck] -> m Bool), MonadIO m, IsPad a, IsPad b) => MethodInfo * PadLinkMaybeGhostingFullMethodInfo a signature Source # | |
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 'GI.Gst.Objects.GhostPad.GhostPad'\'s in between as necessary.
This is a convenience function to save having to create and add intermediate
'GI.Gst.Objects.GhostPad.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
data PadMarkReconfigureMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsPad a) => MethodInfo * PadMarkReconfigureMethodInfo a signature Source # | |
:: (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
data PadNeedsReconfigureMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsPad a) => MethodInfo * PadNeedsReconfigureMethodInfo a signature Source # | |
:: (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) |
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) |
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
data PadPauseTaskMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsPad a) => MethodInfo * PadPauseTaskMethodInfo a signature Source # | |
:: (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
data PadPeerQueryMethodInfo Source #
((~) * signature (Query -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadPeerQueryMethodInfo a signature Source # | |
:: (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
data PadPeerQueryAcceptCapsMethodInfo Source #
((~) * signature (Caps -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadPeerQueryAcceptCapsMethodInfo a signature Source # | |
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
data PadProxyQueryAcceptCapsMethodInfo Source #
((~) * signature (Query -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadProxyQueryAcceptCapsMethodInfo a signature Source # | |
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
data PadProxyQueryCapsMethodInfo Source #
((~) * signature (Query -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadProxyQueryCapsMethodInfo a signature Source # | |
:: (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
data PadPullRangeMethodInfo Source #
((~) * signature (Word64 -> Word32 -> m (FlowReturn, Buffer)), MonadIO m, IsPad a) => MethodInfo * PadPullRangeMethodInfo a signature Source # | |
:: (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
data PadPushMethodInfo Source #
((~) * signature (Buffer -> m FlowReturn), MonadIO m, IsPad a) => MethodInfo * PadPushMethodInfo a signature Source # | |
:: (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
data PadPushEventMethodInfo Source #
((~) * signature (Event -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadPushEventMethodInfo a signature Source # | |
:: (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
data PadPushListMethodInfo Source #
((~) * signature (BufferList -> m FlowReturn), MonadIO m, IsPad a) => MethodInfo * PadPushListMethodInfo a signature Source # | |
:: (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
data PadQueryMethodInfo Source #
((~) * signature (Query -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadQueryMethodInfo a signature Source # | |
:: (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
data PadQueryAcceptCapsMethodInfo Source #
((~) * signature (Caps -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadQueryAcceptCapsMethodInfo a signature Source # | |
:: (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
data PadRemoveProbeMethodInfo Source #
((~) * signature (CULong -> m ()), MonadIO m, IsPad a) => MethodInfo * PadRemoveProbeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> CULong |
|
-> m () |
Remove the probe with id
from pad
.
MT safe.
sendEvent
data PadSendEventMethodInfo Source #
((~) * signature (Event -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadSendEventMethodInfo a signature Source # | |
:: (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
data PadSetActivateFunctionFullMethodInfo Source #
((~) * signature (PadActivateFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetActivateFunctionFullMethodInfo a signature Source # | |
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
data PadSetActivatemodeFunctionFullMethodInfo Source #
((~) * signature (PadActivateModeFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetActivatemodeFunctionFullMethodInfo a signature Source # | |
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
data PadSetActiveMethodInfo Source #
((~) * signature (Bool -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadSetActiveMethodInfo a signature Source # | |
:: (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
data PadSetChainFunctionFullMethodInfo Source #
((~) * signature (PadChainFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetChainFunctionFullMethodInfo a signature Source # | |
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
data PadSetChainListFunctionFullMethodInfo Source #
((~) * signature (PadChainListFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetChainListFunctionFullMethodInfo a signature Source # | |
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
data PadSetElementPrivateMethodInfo Source #
((~) * signature (Ptr () -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetElementPrivateMethodInfo a signature Source # | |
:: (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
data PadSetEventFullFunctionFullMethodInfo Source #
((~) * signature (PadEventFullFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetEventFullFunctionFullMethodInfo a signature Source # | |
padSetEventFullFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadEventFullFunction |
|
-> m () |
Sets the given event handler for the pad.
Since: 1.8
setEventFunctionFull
data PadSetEventFunctionFullMethodInfo Source #
((~) * signature (PadEventFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetEventFunctionFullMethodInfo a signature Source # | |
padSetEventFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadEventFunction |
|
-> m () |
Sets the given event handler for the pad.
setGetrangeFunctionFull
data PadSetGetrangeFunctionFullMethodInfo Source #
((~) * signature (PadGetRangeFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetGetrangeFunctionFullMethodInfo a signature Source # | |
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
data PadSetIterateInternalLinksFunctionFullMethodInfo Source #
((~) * signature (PadIterIntLinkFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetIterateInternalLinksFunctionFullMethodInfo a signature Source # | |
padSetIterateInternalLinksFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadIterIntLinkFunction |
|
-> m () |
Sets the given internal link iterator function for the pad.
setLinkFunctionFull
data PadSetLinkFunctionFullMethodInfo Source #
((~) * signature (PadLinkFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetLinkFunctionFullMethodInfo a signature Source # | |
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
data PadSetOffsetMethodInfo Source #
((~) * signature (Int64 -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetOffsetMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Int64 |
|
-> m () |
Set the offset that will be applied to the running time of pad
.
setQueryFunctionFull
data PadSetQueryFunctionFullMethodInfo Source #
((~) * signature (PadQueryFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetQueryFunctionFullMethodInfo a signature Source # | |
padSetQueryFunctionFull Source #
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> PadQueryFunction |
|
-> m () |
Set the given query function for the pad.
setUnlinkFunctionFull
data PadSetUnlinkFunctionFullMethodInfo Source #
((~) * signature (PadUnlinkFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadSetUnlinkFunctionFullMethodInfo a signature Source # | |
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.
startTask
data PadStartTaskMethodInfo Source #
((~) * signature (TaskFunction -> m Bool), MonadIO m, IsPad a) => MethodInfo * PadStartTaskMethodInfo a signature Source # | |
:: (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
data PadStickyEventsForeachMethodInfo Source #
((~) * signature (PadStickyEventsForeachFunction -> m ()), MonadIO m, IsPad a) => MethodInfo * PadStickyEventsForeachMethodInfo a signature Source # | |
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
data PadStopTaskMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsPad a) => MethodInfo * PadStopTaskMethodInfo a signature Source # | |
:: (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
data PadStoreStickyEventMethodInfo Source #
((~) * signature (Event -> m FlowReturn), MonadIO m, IsPad a) => MethodInfo * PadStoreStickyEventMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPad a) | |
=> a |
|
-> Event |
|
-> m FlowReturn | Returns: |
Store the sticky event
on pad
Since: 1.2
unlink
data PadUnlinkMethodInfo Source #
((~) * signature (b -> m Bool), MonadIO m, IsPad a, IsPad b) => MethodInfo * PadUnlinkMethodInfo a signature Source # | |
:: (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 Pad
::unlinked
signal on both pads.
useFixedCaps
data PadUseFixedCapsMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsPad a) => MethodInfo * PadUseFixedCapsMethodInfo a signature Source # | |
:: (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
data PadCapsPropertyInfo Source #
padCaps :: AttrLabelProxy "caps" Source #
direction
data PadDirectionPropertyInfo Source #
constructPadDirection :: IsPad o => PadDirection -> IO (GValueConstruct o) Source #
getPadDirection :: (MonadIO m, IsPad o) => o -> m PadDirection Source #
padDirection :: AttrLabelProxy "direction" Source #
offset
data PadOffsetPropertyInfo Source #
constructPadOffset :: IsPad o => Int64 -> IO (GValueConstruct o) Source #
padOffset :: AttrLabelProxy "offset" Source #
template
data PadTemplatePropertyInfo Source #
clearPadTemplate :: (MonadIO m, IsPad o) => o -> m () Source #
constructPadTemplate :: (IsPad o, IsPadTemplate a) => a -> IO (GValueConstruct o) Source #
getPadTemplate :: (MonadIO m, IsPad o) => o -> m (Maybe PadTemplate) Source #
padTemplate :: AttrLabelProxy "template" Source #
setPadTemplate :: (MonadIO m, IsPad o, IsPadTemplate a) => o -> a -> m () Source #
Signals
linked
type PadLinkedCallback = Pad -> IO () Source #
data PadLinkedSignalInfo Source #
afterPadLinked :: (IsPad a, MonadIO m) => a -> PadLinkedCallback -> m SignalHandlerId Source #
onPadLinked :: (IsPad a, MonadIO m) => a -> PadLinkedCallback -> m SignalHandlerId Source #
wrap_PadLinkedCallback :: PadLinkedCallback -> Ptr () -> Ptr Pad -> Ptr () -> IO () Source #
unlinked
type PadUnlinkedCallback = Pad -> IO () Source #
data PadUnlinkedSignalInfo Source #
afterPadUnlinked :: (IsPad a, MonadIO m) => a -> PadUnlinkedCallback -> m SignalHandlerId Source #
onPadUnlinked :: (IsPad a, MonadIO m) => a -> PadUnlinkedCallback -> m SignalHandlerId Source #
wrap_PadUnlinkedCallback :: PadUnlinkedCallback -> Ptr () -> Ptr Pad -> Ptr () -> IO () Source #