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 |
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 (ForeignPtr FlowCombiner)
- noFlowCombiner :: Maybe FlowCombiner
- data FlowCombinerAddPadMethodInfo
- flowCombinerAddPad :: (MonadIO m, PadK 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, PadK 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, PadK a) => FlowCombiner -> a -> FlowReturn -> m FlowReturn
Exported types
newtype FlowCombiner Source
Methods
flowCombinerAddPad
data FlowCombinerAddPadMethodInfo Source
((~) (TYPE Lifted) signature (a -> m ()), MonadIO m, PadK a) => MethodInfo (TYPE Lifted) FlowCombinerAddPadMethodInfo FlowCombiner signature Source | |
flowCombinerAddPad :: (MonadIO m, PadK a) => FlowCombiner -> a -> m () Source
flowCombinerClear
data FlowCombinerClearMethodInfo Source
((~) (TYPE Lifted) signature (m ()), MonadIO m) => MethodInfo (TYPE Lifted) FlowCombinerClearMethodInfo FlowCombiner signature Source | |
flowCombinerClear :: MonadIO m => FlowCombiner -> m () Source
flowCombinerFree
data FlowCombinerFreeMethodInfo Source
((~) (TYPE Lifted) signature (m ()), MonadIO m) => MethodInfo (TYPE Lifted) FlowCombinerFreeMethodInfo FlowCombiner signature Source | |
flowCombinerFree :: MonadIO m => FlowCombiner -> m () Source
flowCombinerNew
flowCombinerNew :: MonadIO m => m FlowCombiner Source
flowCombinerRemovePad
data FlowCombinerRemovePadMethodInfo Source
((~) (TYPE Lifted) signature (a -> m ()), MonadIO m, PadK a) => MethodInfo (TYPE Lifted) FlowCombinerRemovePadMethodInfo FlowCombiner signature Source | |
flowCombinerRemovePad :: (MonadIO m, PadK a) => FlowCombiner -> a -> m () Source
flowCombinerReset
data FlowCombinerResetMethodInfo Source
((~) (TYPE Lifted) signature (m ()), MonadIO m) => MethodInfo (TYPE Lifted) FlowCombinerResetMethodInfo FlowCombiner signature Source | |
flowCombinerReset :: MonadIO m => FlowCombiner -> m () Source
flowCombinerUpdateFlow
data FlowCombinerUpdateFlowMethodInfo Source
((~) (TYPE Lifted) signature (FlowReturn -> m FlowReturn), MonadIO m) => MethodInfo (TYPE Lifted) FlowCombinerUpdateFlowMethodInfo FlowCombiner signature Source | |
flowCombinerUpdateFlow :: MonadIO m => FlowCombiner -> FlowReturn -> m FlowReturn Source
flowCombinerUpdatePadFlow
data FlowCombinerUpdatePadFlowMethodInfo Source
((~) (TYPE Lifted) signature (a -> FlowReturn -> m FlowReturn), MonadIO m, PadK a) => MethodInfo (TYPE Lifted) FlowCombinerUpdatePadFlowMethodInfo FlowCombiner signature Source | |
flowCombinerUpdatePadFlow :: (MonadIO m, PadK a) => FlowCombiner -> a -> FlowReturn -> m FlowReturn Source