mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
Add set_active method on node
Require that nodes need to be activated before they are scheduled. Make method to activate remote node. Add method to pause/resume stream.
This commit is contained in:
parent
acfdc63f26
commit
d96d40e30a
19 changed files with 135 additions and 46 deletions
|
|
@ -166,9 +166,10 @@ struct pw_client_node_buffer {
|
|||
#define PW_CLIENT_NODE_PROXY_METHOD_DONE 0
|
||||
#define PW_CLIENT_NODE_PROXY_METHOD_UPDATE 1
|
||||
#define PW_CLIENT_NODE_PROXY_METHOD_PORT_UPDATE 2
|
||||
#define PW_CLIENT_NODE_PROXY_METHOD_EVENT 3
|
||||
#define PW_CLIENT_NODE_PROXY_METHOD_DESTROY 4
|
||||
#define PW_CLIENT_NODE_PROXY_METHOD_NUM 5
|
||||
#define PW_CLIENT_NODE_PROXY_METHOD_SET_ACTIVE 3
|
||||
#define PW_CLIENT_NODE_PROXY_METHOD_EVENT 4
|
||||
#define PW_CLIENT_NODE_PROXY_METHOD_DESTROY 5
|
||||
#define PW_CLIENT_NODE_PROXY_METHOD_NUM 6
|
||||
|
||||
/** \ref pw_client_node methods */
|
||||
struct pw_client_node_proxy_methods {
|
||||
|
|
@ -225,6 +226,10 @@ struct pw_client_node_proxy_methods {
|
|||
uint32_t n_params,
|
||||
const struct spa_param **params,
|
||||
const struct spa_port_info *info);
|
||||
/**
|
||||
* Activate of deactivate the node
|
||||
*/
|
||||
void (*set_active) (void *object, bool active);
|
||||
/**
|
||||
* Send an event to the node
|
||||
* \param event the event to send
|
||||
|
|
@ -278,6 +283,12 @@ pw_client_node_proxy_port_update(struct pw_client_node_proxy *p,
|
|||
info);
|
||||
}
|
||||
|
||||
static inline void
|
||||
pw_client_node_proxy_set_active(struct pw_client_node_proxy *p, bool active)
|
||||
{
|
||||
pw_proxy_do((struct pw_proxy*)p, struct pw_client_node_proxy_methods, set_active, active);
|
||||
}
|
||||
|
||||
static inline void
|
||||
pw_client_node_proxy_event(struct pw_client_node_proxy *p, struct spa_event *event)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue