keys: add lazy scheduling flags and docs

This commit is contained in:
Wim Taymans 2024-11-04 17:01:43 +01:00
parent ae0dd9195a
commit 9c49bffc22
5 changed files with 154 additions and 0 deletions

View file

@ -1123,6 +1123,8 @@ static void check_properties(struct pw_impl_node *node)
recalc_reason = "driver priority changed";
}
}
node->supports_lazy = pw_properties_get_uint32(node->properties, PW_KEY_NODE_SUPPORTS_LAZY, 0);
node->supports_request = pw_properties_get_uint32(node->properties, PW_KEY_NODE_SUPPORTS_REQUEST, 0);
if ((str = pw_properties_get(node->properties, PW_KEY_NODE_NAME)) &&
(node->name == NULL || !spa_streq(node->name, str))) {

View file

@ -190,6 +190,15 @@ extern "C" {
#define PW_KEY_NODE_DRIVER "node.driver" /**< node can drive the graph. When the node is
* selected as the driver, it needs to start
* the graph periodically. */
#define PW_KEY_NODE_SUPPORTS_LAZY "node.supports-lazy" /**< the node can be a lazy driver. It will listen
* to RequestProcess commands and take them into
* account when deciding to start the graph.
* A value of 0 disables support, a value of > 0
* enables with increasing preference. */
#define PW_KEY_NODE_SUPPORTS_REQUEST "node.supports-request" /**< The node supports emiting RequestProcess events
* when it wants the graph to be scheduled.
* A value of 0 disables support, a value of > 0
* enables with increasing preference. */
#define PW_KEY_NODE_DRIVER_ID "node.driver-id" /**< the node id of the node assigned as driver
* for this node */
#define PW_KEY_NODE_ASYNC "node.async" /**< the node wants async scheduling */

View file

@ -752,6 +752,9 @@ struct pw_impl_node {
char *name; /** for debug */
uint32_t supports_lazy; /**< lazy driver preference */
uint32_t supports_request; /**< request follower preference */
uint32_t priority_driver; /** priority for being driver */
char **groups; /** groups to schedule this node in */
char **link_groups; /** groups this node is linked to */