mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
interfaces: improve remote API
Add return values to events and method callbacks. This makes it possible to pass any error or async return value. Add sync/done/error in both directions so that both proxy and resource and perform/reply sync and produce errors. Return a SPA_ASYNC from remote method calls (and events), keep the sequence number in the connection. With the core sync/done we can remove the client-node done method and it's internal sequence number along with the seq number in method calls. We can also use the method/event async return value to perform a sync with as the unique sequence number for this method. Add sync method and done/error event to proxy and resource.
This commit is contained in:
parent
0d8821096a
commit
eea062ee53
41 changed files with 1180 additions and 817 deletions
|
|
@ -74,15 +74,15 @@ struct spa_device_callbacks {
|
|||
uint32_t version;
|
||||
|
||||
/** notify extra information about the device */
|
||||
void (*info) (void *data, const struct spa_device_info *info);
|
||||
int (*info) (void *data, const struct spa_device_info *info);
|
||||
|
||||
/** a device event */
|
||||
void (*event) (void *data, struct spa_event *event);
|
||||
int (*event) (void *data, struct spa_event *event);
|
||||
|
||||
/** info changed for an object managed by the device, info is NULL when
|
||||
* the object is removed */
|
||||
void (*object_info) (void *data, uint32_t id,
|
||||
const struct spa_device_object_info *info);
|
||||
int (*object_info) (void *data, uint32_t id,
|
||||
const struct spa_device_object_info *info);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -80,10 +80,10 @@ struct spa_monitor_callbacks {
|
|||
uint32_t version;
|
||||
|
||||
/** receive extra information about the monitor */
|
||||
void (*info) (void *data, const struct spa_dict *info);
|
||||
int (*info) (void *data, const struct spa_dict *info);
|
||||
|
||||
/** an item is added/removed/changed on the monitor */
|
||||
void (*event) (void *data, struct spa_event *event);
|
||||
int (*event) (void *data, struct spa_event *event);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue