gi-gstbase-0.1.6.13: GstBase bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.GstBase.Structs.FlowCombiner

Contents

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.

Synopsis

Exported types

newtype FlowCombiner Source

Instances

BoxedObject FlowCombiner Source 
((~) * info (ResolveFlowCombinerMethod t FlowCombiner), MethodInfo * info FlowCombiner p) => IsLabel t (FlowCombiner -> p) Source 

Methods

fromLabel :: Proxy# Symbol t -> FlowCombiner -> p

((~) * info (ResolveFlowCombinerMethod t FlowCombiner), MethodInfo * info FlowCombiner p) => IsLabelProxy t (FlowCombiner -> p) Source 
((~) (TYPE Lifted) signature (a -> FlowReturn -> m FlowReturn), MonadIO m, PadK a) => MethodInfo (TYPE Lifted) FlowCombinerUpdatePadFlowMethodInfo FlowCombiner signature Source 
((~) (TYPE Lifted) signature (FlowReturn -> m FlowReturn), MonadIO m) => MethodInfo (TYPE Lifted) FlowCombinerUpdateFlowMethodInfo FlowCombiner signature Source 
((~) (TYPE Lifted) signature (m ()), MonadIO m) => MethodInfo (TYPE Lifted) FlowCombinerResetMethodInfo FlowCombiner signature Source 
((~) (TYPE Lifted) signature (a -> m ()), MonadIO m, PadK a) => MethodInfo (TYPE Lifted) FlowCombinerRemovePadMethodInfo FlowCombiner signature Source 
((~) (TYPE Lifted) signature (m ()), MonadIO m) => MethodInfo (TYPE Lifted) FlowCombinerFreeMethodInfo FlowCombiner signature Source 
((~) (TYPE Lifted) signature (m ()), MonadIO m) => MethodInfo (TYPE Lifted) FlowCombinerClearMethodInfo FlowCombiner signature Source 
((~) (TYPE Lifted) signature (a -> m ()), MonadIO m, PadK a) => MethodInfo (TYPE Lifted) FlowCombinerAddPadMethodInfo FlowCombiner signature Source 

Methods

flowCombinerAddPad

flowCombinerAddPad :: (MonadIO m, PadK a) => FlowCombiner -> a -> m () Source

flowCombinerClear

flowCombinerFree

flowCombinerNew

flowCombinerRemovePad

flowCombinerRemovePad :: (MonadIO m, PadK a) => FlowCombiner -> a -> m () Source

flowCombinerReset

flowCombinerUpdateFlow

flowCombinerUpdateFlow :: MonadIO m => FlowCombiner -> FlowReturn -> m FlowReturn Source

flowCombinerUpdatePadFlow

flowCombinerUpdatePadFlow :: (MonadIO m, PadK a) => FlowCombiner -> a -> FlowReturn -> m FlowReturn Source