FlowCombiner

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.

#GstFlowCombiner works by using the last #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 gstbase.flow_combiner.FlowCombiner.addPad. The new #GstPad is stored with a default value of gst.types.FlowReturn.Ok.

In case you want a #GstPad to be removed, use gstbase.flow_combiner.FlowCombiner.removePad.

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.types.FlowReturn.Error or below, GST_FLOW_NOT_NEGOTIATED and GST_FLOW_FLUSHING are returned immediately from the gstbase.flow_combiner.FlowCombiner.updateFlow function.

Constructors

this
this()

Creates a new #GstFlowCombiner, use gstbase.flow_combiner.FlowCombiner.free to free it.

Members

Functions

addPad
void addPad(gst.pad.Pad pad)

Adds a new #GstPad to the #GstFlowCombiner.

clear
void clear()

Removes all pads from a #GstFlowCombiner and resets it to its initial state.

removePad
void removePad(gst.pad.Pad pad)

Removes a #GstPad from the #GstFlowCombiner.

reset
void reset()

Reset flow combiner and all pads to their initial state without removing pads.

updateFlow
gst.types.FlowReturn updateFlow(gst.types.FlowReturn fret)

Computes the combined flow return for the pads in it.

updatePadFlow
gst.types.FlowReturn updatePadFlow(gst.pad.Pad pad, gst.types.FlowReturn fret)

Sets the provided pad's last flow return to provided value and computes the combined flow return for the pads in it.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.