Stream Manager
-
struct WpStreamManager
WpStreamManager is a utility class that automatically creates and manages WpStream objects for all nodes in the PipeWire graph. It monitors node additions and removals, creating the appropriate stream objects (audio or video) for them, and unregistering them when nodes disappear.
This class simplifies stream management by handling the tedious work of tracking which nodes have streams and maintaining that state as the PipeWire graph changes. Without this manager, applications would need to manually listen for node changes and create streams themselves.
The stream manager creates one stream for each port group and direction of the node's EnumPortConfig param. A node can have both audio and video streams, so the stream type (WpAudioStream or WpVideoStream) is chosen from the media type and media class of the node's "stream.props.<port-group>" property, or from the node's ones if that property does not have them. Nodes without EnumPortConfig only get a single WpVideoStream if they are video nodes. The streams are registered with the WpCore for other components to discover and use.
When activated with the WP_STREAM_MANAGER_FEATURE_LOADED feature, the stream manager enters its operational state where it automatically handles node monitoring and stream creation/destruction.
-
enum WpStreamManagerFeatures
Flags to be used as WpObjectFeatures on WpStreamManager.
Values:
-
enumerator WP_STREAM_MANAGER_FEATURE_LOADED = (1 << 0)
Loads the stream manager
-
enumerator WP_STREAM_MANAGER_FEATURE_LOADED = (1 << 0)
-
WpStreamManager *wp_stream_manager_new(WpCore *core)
Constructs a new stream manager object.
- Parameters:
core -- the core associated with the stream manager
- Returns:
(transfer full): the new WpStreamManager
-
WP_TYPE_STREAM_MANAGER (wp_stream_manager_get_type ())
The WpStreamManager GType.