mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
Improve async handling
Don't use special callback in node to receive the results. Instead, use a generic result callback to receive the result. This makes things a bit more symetric and generic again because then you can choose how to match the result to the request and you have a generic way to handle both the sync and async case. We can then also remove the wait method. This also makes the remote interface and spa interface to objects very similar. Make a helper object to receive and dispatch results. Use this in the helper for enum_params. Make device use the same result callbacks.
This commit is contained in:
parent
98463b689b
commit
d2c18c7b1a
64 changed files with 1298 additions and 1141 deletions
|
|
@ -138,7 +138,8 @@ static void test_device_abi(void)
|
|||
struct pw_device_proxy_events e;
|
||||
struct {
|
||||
uint32_t version;
|
||||
int (*enum_params) (void *object, uint32_t id, uint32_t start, uint32_t num,
|
||||
int (*enum_params) (void *object, uint32_t seq, uint32_t id,
|
||||
uint32_t start, uint32_t num,
|
||||
const struct spa_pod *filter);
|
||||
int (*set_param) (void *object, uint32_t id, uint32_t flags,
|
||||
const struct spa_pod *param);
|
||||
|
|
@ -146,7 +147,7 @@ static void test_device_abi(void)
|
|||
struct {
|
||||
uint32_t version;
|
||||
int (*info) (void *object, const struct pw_device_info *info);
|
||||
int (*param) (void *object,
|
||||
int (*param) (void *object, uint32_t seq,
|
||||
uint32_t id, uint32_t index, uint32_t next,
|
||||
const struct spa_pod *param);
|
||||
} events = { PW_VERSION_DEVICE_PROXY_EVENTS, };
|
||||
|
|
@ -170,8 +171,8 @@ static void test_node_abi(void)
|
|||
struct pw_node_proxy_events e;
|
||||
struct {
|
||||
uint32_t version;
|
||||
int (*enum_params) (void *object, uint32_t id, uint32_t start, uint32_t num,
|
||||
const struct spa_pod *filter);
|
||||
int (*enum_params) (void *object, uint32_t seq, uint32_t id,
|
||||
uint32_t start, uint32_t num, const struct spa_pod *filter);
|
||||
int (*set_param) (void *object, uint32_t id, uint32_t flags,
|
||||
const struct spa_pod *param);
|
||||
int (*send_command) (void *object, const struct spa_command *command);
|
||||
|
|
@ -179,7 +180,7 @@ static void test_node_abi(void)
|
|||
struct {
|
||||
uint32_t version;
|
||||
int (*info) (void *object, const struct pw_node_info *info);
|
||||
int (*param) (void *object,
|
||||
int (*param) (void *object, uint32_t seq,
|
||||
uint32_t id, uint32_t index, uint32_t next,
|
||||
const struct spa_pod *param);
|
||||
} events = { PW_VERSION_NODE_PROXY_EVENTS, };
|
||||
|
|
@ -204,13 +205,13 @@ static void test_port_abi(void)
|
|||
struct pw_port_proxy_events e;
|
||||
struct {
|
||||
uint32_t version;
|
||||
int (*enum_params) (void *object, uint32_t id, uint32_t start, uint32_t num,
|
||||
const struct spa_pod *filter);
|
||||
int (*enum_params) (void *object, uint32_t seq, uint32_t id,
|
||||
uint32_t start, uint32_t num, const struct spa_pod *filter);
|
||||
} methods = { PW_VERSION_PORT_PROXY_METHODS, };
|
||||
struct {
|
||||
uint32_t version;
|
||||
int (*info) (void *object, const struct pw_port_info *info);
|
||||
int (*param) (void *object,
|
||||
int (*param) (void *object, uint32_t seq,
|
||||
uint32_t id, uint32_t index, uint32_t next,
|
||||
const struct spa_pod *param);
|
||||
} events = { PW_VERSION_PORT_PROXY_EVENTS, };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue