FlowCombiner


Object Hierarchy:

Object hierarchy for FlowCombiner

Description:

[ CCode ( cname = "GstFlowCombiner" , copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , lower_case_cprefix = "gst_flow_combiner_" , type_id = "gst_flow_combiner_get_type ()" ) ]
[ Compact ]
[ GIR ( name = "FlowCombiner" ) ]
[ Version ( since = "1.4" ) ]
public class FlowCombiner

Utility struct to help handling FlowReturn combination.

Useful for Elements that have multiple source pads and need to combine the different FlowReturn for those pads.

FlowCombiner works by using the last FlowReturn for all Pad it has in its list and computes the combined return value and provides it to the caller.

To add a new pad to the FlowCombiner use add_pad. The new Pad is stored with a default value of OK.

In case you want a Pad to be removed, use 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 Pads.

Aside from reducing the user's code size, the main advantage of using this helper struct is to follow the standard rules for FlowReturn combination. These rules are:

* EOS: only if all returns are EOS too * NOT_LINKED: only if all returns are NOT_LINKED too * ERROR or below: if at least one returns an error return * NOT_NEGOTIATED: if at least one returns a not-negotiated return * FLUSHING: if at least one returns flushing * OK: otherwise

ERROR or below, GST_FLOW_NOT_NEGOTIATED and GST_FLOW_FLUSHING are returned immediately from the update_flow function.


Namespace: Gst.Base

Content:

Creation methods:

Methods: