| 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 |
GI.GstBase.Structs.FlowCombiner
Description
Utility struct to help handling #GstFlowReturn combination. Useful for #GstElement--s that have multiple source pads and need to combine the different #GstFlowReturn for those pads.
GstFlowReturn for all #GstPad it has in its list and computes the combined return value and provides it to the caller.
To add a new pad to the #GstFlowCombiner use gst_flow_combiner_add_pad(). The new #GstPad is stored with a default value of %GST_FLOW_OK.
In case you want a #GstPad to be removed, use gst_flow_combiner_remove_pad().
Please be aware that this struct isn't thread safe as its designed to be used by demuxers, those usually will have a single thread operating it.
These functions will take refs on the passed #GstPad--s.
Aside from reducing the user's code size, the main advantage of using this helper struct is to follow the standard rules for #GstFlowReturn combination. These rules are:
- %GST_FLOW_EOS: only if all returns are EOS too
- %GST_FLOW_NOT_LINKED: only if all returns are NOT_LINKED too
- %GST_FLOW_ERROR or below: if at least one returns an error return
- %GST_FLOW_NOT_NEGOTIATED: if at least one returns a not-negotiated return
- %GST_FLOW_FLUSHING: if at least one returns flushing
- %GST_FLOW_OK: otherwise
%GST_FLOW_ERROR or below, GST_FLOW_NOT_NEGOTIATED and GST_FLOW_FLUSHING are returned immediatelly from the gst_flow_combiner_update_flow() function.
- newtype FlowCombiner = FlowCombiner (ManagedPtr FlowCombiner)
- noFlowCombiner :: Maybe FlowCombiner
- data FlowCombinerAddPadMethodInfo
- flowCombinerAddPad :: (MonadIO m, IsPad a) => FlowCombiner -> a -> m ()
- data FlowCombinerClearMethodInfo
- flowCombinerClear :: MonadIO m => FlowCombiner -> m ()
- data FlowCombinerFreeMethodInfo
- flowCombinerFree :: MonadIO m => FlowCombiner -> m ()
- flowCombinerNew :: MonadIO m => m FlowCombiner
- data FlowCombinerRemovePadMethodInfo
- flowCombinerRemovePad :: (MonadIO m, IsPad a) => FlowCombiner -> a -> m ()
- data FlowCombinerResetMethodInfo
- flowCombinerReset :: MonadIO m => FlowCombiner -> m ()
- data FlowCombinerUpdateFlowMethodInfo
- flowCombinerUpdateFlow :: MonadIO m => FlowCombiner -> FlowReturn -> m FlowReturn
- data FlowCombinerUpdatePadFlowMethodInfo
- flowCombinerUpdatePadFlow :: (MonadIO m, IsPad a) => FlowCombiner -> a -> FlowReturn -> m FlowReturn
Exported types
newtype FlowCombiner Source #
Constructors
| FlowCombiner (ManagedPtr FlowCombiner) |
Instances
| BoxedObject FlowCombiner Source # | |
| ((~) * info (ResolveFlowCombinerMethod t FlowCombiner), MethodInfo * info FlowCombiner p) => IsLabel t (FlowCombiner -> p) Source # | |
| ((~) * info (ResolveFlowCombinerMethod t FlowCombiner), MethodInfo * info FlowCombiner p) => IsLabelProxy t (FlowCombiner -> p) Source # | |
| HasAttributeList * FlowCombiner Source # | |
| ((~) * signature (a -> FlowReturn -> m FlowReturn), MonadIO m, IsPad a) => MethodInfo * FlowCombinerUpdatePadFlowMethodInfo FlowCombiner signature Source # | |
| ((~) * signature (FlowReturn -> m FlowReturn), MonadIO m) => MethodInfo * FlowCombinerUpdateFlowMethodInfo FlowCombiner signature Source # | |
| ((~) * signature (m ()), MonadIO m) => MethodInfo * FlowCombinerResetMethodInfo FlowCombiner signature Source # | |
| ((~) * signature (a -> m ()), MonadIO m, IsPad a) => MethodInfo * FlowCombinerRemovePadMethodInfo FlowCombiner signature Source # | |
| ((~) * signature (m ()), MonadIO m) => MethodInfo * FlowCombinerFreeMethodInfo FlowCombiner signature Source # | |
| ((~) * signature (m ()), MonadIO m) => MethodInfo * FlowCombinerClearMethodInfo FlowCombiner signature Source # | |
| ((~) * signature (a -> m ()), MonadIO m, IsPad a) => MethodInfo * FlowCombinerAddPadMethodInfo FlowCombiner signature Source # | |
| type AttributeList FlowCombiner Source # | |
Methods
addPad
data FlowCombinerAddPadMethodInfo Source #
Instances
| ((~) * signature (a -> m ()), MonadIO m, IsPad a) => MethodInfo * FlowCombinerAddPadMethodInfo FlowCombiner signature Source # | |
flowCombinerAddPad :: (MonadIO m, IsPad a) => FlowCombiner -> a -> m () Source #
clear
data FlowCombinerClearMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m) => MethodInfo * FlowCombinerClearMethodInfo FlowCombiner signature Source # | |
flowCombinerClear :: MonadIO m => FlowCombiner -> m () Source #
free
data FlowCombinerFreeMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m) => MethodInfo * FlowCombinerFreeMethodInfo FlowCombiner signature Source # | |
flowCombinerFree :: MonadIO m => FlowCombiner -> m () Source #
new
flowCombinerNew :: MonadIO m => m FlowCombiner Source #
removePad
data FlowCombinerRemovePadMethodInfo Source #
Instances
| ((~) * signature (a -> m ()), MonadIO m, IsPad a) => MethodInfo * FlowCombinerRemovePadMethodInfo FlowCombiner signature Source # | |
flowCombinerRemovePad :: (MonadIO m, IsPad a) => FlowCombiner -> a -> m () Source #
reset
data FlowCombinerResetMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m) => MethodInfo * FlowCombinerResetMethodInfo FlowCombiner signature Source # | |
flowCombinerReset :: MonadIO m => FlowCombiner -> m () Source #
updateFlow
data FlowCombinerUpdateFlowMethodInfo Source #
Instances
| ((~) * signature (FlowReturn -> m FlowReturn), MonadIO m) => MethodInfo * FlowCombinerUpdateFlowMethodInfo FlowCombiner signature Source # | |
flowCombinerUpdateFlow :: MonadIO m => FlowCombiner -> FlowReturn -> m FlowReturn Source #
updatePadFlow
data FlowCombinerUpdatePadFlowMethodInfo Source #
Instances
| ((~) * signature (a -> FlowReturn -> m FlowReturn), MonadIO m, IsPad a) => MethodInfo * FlowCombinerUpdatePadFlowMethodInfo FlowCombiner signature Source # | |
flowCombinerUpdatePadFlow :: (MonadIO m, IsPad a) => FlowCombiner -> a -> FlowReturn -> m FlowReturn Source #