mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
node: add enabled state
Add method to enable/disable a node. Disabled nodes will SUSPEND and not be available for automatic connections, it is intented for handling the monitor node state.
This commit is contained in:
parent
95b3cba3c3
commit
bd1fea49c2
4 changed files with 43 additions and 3 deletions
|
|
@ -68,6 +68,8 @@ struct pw_node_events {
|
|||
void (*info_changed) (void *data, struct pw_node_info *info);
|
||||
/** the node active state changed */
|
||||
void (*active_changed) (void *data, bool active);
|
||||
/** the node enabled state changed */
|
||||
void (*enabled_changed) (void *data, bool enabled);
|
||||
|
||||
/** a new state is requested on the node */
|
||||
void (*state_request) (void *data, enum pw_node_state state);
|
||||
|
|
@ -164,9 +166,15 @@ struct pw_port * pw_node_get_free_port(struct pw_node *node, enum pw_direction d
|
|||
* nodes and start data transport */
|
||||
int pw_node_set_active(struct pw_node *node, bool active);
|
||||
|
||||
/** Check is a node is active */
|
||||
/** Check if a node is active */
|
||||
bool pw_node_is_active(struct pw_node *node);
|
||||
|
||||
/** Set a node enabled. The node will be able to be activated */
|
||||
int pw_node_set_enabled(struct pw_node *node, bool enabled);
|
||||
|
||||
/** Check if a node is enabled */
|
||||
bool pw_node_is_enabled(struct pw_node *node);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue