mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-20 06:59:58 -05:00
monitor: remove enum_items
Make the monitor and device emit the info and items when the callbacks are set. This makes it easier to implement the monitor because there is much less state to keep around and invalidate etc. Rework the monitors Add bluez5 device
This commit is contained in:
parent
10d277ce03
commit
57e94f7bc4
15 changed files with 510 additions and 332 deletions
|
|
@ -35,6 +35,7 @@ struct spa_device;
|
|||
#include <spa/utils/dict.h>
|
||||
#include <spa/support/plugin.h>
|
||||
#include <spa/pod/builder.h>
|
||||
#include <spa/pod/event.h>
|
||||
|
||||
/**
|
||||
* spa_device_callbacks:
|
||||
|
|
@ -44,6 +45,12 @@ struct spa_device_callbacks {
|
|||
#define SPA_VERSION_DEVICE_CALLBACKS 0
|
||||
uint32_t version;
|
||||
|
||||
/**< notify extra information about the device */
|
||||
void (*info) (void *data, const struct spa_dict *info);
|
||||
|
||||
/** a device event */
|
||||
void (*event) (void *data, struct spa_event *event);
|
||||
|
||||
/**< add a new object managed by the device */
|
||||
void (*add) (void *data, uint32_t id,
|
||||
const struct spa_handle_factory *factory, uint32_t type,
|
||||
|
|
@ -63,15 +70,13 @@ struct spa_device {
|
|||
#define SPA_VERSION_DEVICE 0
|
||||
uint32_t version;
|
||||
|
||||
/**
|
||||
* Extra information about the device
|
||||
*/
|
||||
const struct spa_dict *info;
|
||||
|
||||
/**
|
||||
* Set callbacks to receive asynchronous notifications from
|
||||
* the device.
|
||||
*
|
||||
* Setting the callbacks will trigger the info event and an
|
||||
* add event for each managed node.
|
||||
*
|
||||
* \param device: a #spa_device
|
||||
* \param callback: a #callbacks
|
||||
* \return 0 on success
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue