mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-25 06:59:57 -05:00
simplify events and commands
This commit is contained in:
parent
0373f73bac
commit
d3dd90bb05
25 changed files with 220 additions and 252 deletions
|
|
@ -33,6 +33,25 @@ typedef struct _SpaMonitor SpaMonitor;
|
|||
#include <spa/dict.h>
|
||||
#include <spa/plugin.h>
|
||||
|
||||
/**
|
||||
* SpaMonitorEventType:
|
||||
* @SPA_MONITOR_EVENT_TYPE_INVALID: invalid event
|
||||
* @SPA_MONITOR_EVENT_TYPE_ADDED: an item was added, data points to #SpaMonitorItem
|
||||
* @SPA_MONITOR_EVENT_TYPE_REMOVED: an item was removed, data points to #SpaMonitorItem
|
||||
* @SPA_MONITOR_EVENT_TYPE_CHANGED: an item was changed, data points to #SpaMonitorItem
|
||||
*/
|
||||
typedef enum {
|
||||
SPA_MONITOR_EVENT_TYPE_INVALID = 0,
|
||||
SPA_MONITOR_EVENT_TYPE_ADDED,
|
||||
SPA_MONITOR_EVENT_TYPE_REMOVED,
|
||||
SPA_MONITOR_EVENT_TYPE_CHANGED,
|
||||
} SpaMonitorEventType;
|
||||
|
||||
typedef struct {
|
||||
SpaMonitorEventType type;
|
||||
size_t size;
|
||||
} SpaMonitorEvent;
|
||||
|
||||
typedef enum {
|
||||
SPA_MONITOR_ITEM_FLAG_NONE = 0,
|
||||
} SpaMonitorItemFlags;
|
||||
|
|
@ -50,6 +69,7 @@ typedef enum {
|
|||
} SpaMonitorItemState;
|
||||
|
||||
typedef struct {
|
||||
SpaMonitorEvent event;
|
||||
const char *id;
|
||||
SpaMonitorItemFlags flags;
|
||||
SpaMonitorItemState state;
|
||||
|
|
@ -59,26 +79,6 @@ typedef struct {
|
|||
const SpaHandleFactory *factory;
|
||||
} SpaMonitorItem;
|
||||
|
||||
/**
|
||||
* SpaMonitorEventType:
|
||||
* @SPA_MONITOR_EVENT_TYPE_INVALID: invalid event
|
||||
* @SPA_MONITOR_EVENT_TYPE_ADDED: an item was added, data points to #SpaMonitorItem
|
||||
* @SPA_MONITOR_EVENT_TYPE_REMOVED: an item was removed, data points to #SpaMonitorItem
|
||||
* @SPA_MONITOR_EVENT_TYPE_CHANGED: an item was changed, data points to #SpaMonitorItem
|
||||
*/
|
||||
typedef enum {
|
||||
SPA_MONITOR_EVENT_TYPE_INVALID = 0,
|
||||
SPA_MONITOR_EVENT_TYPE_ADDED,
|
||||
SPA_MONITOR_EVENT_TYPE_REMOVED,
|
||||
SPA_MONITOR_EVENT_TYPE_CHANGED,
|
||||
} SpaMonitorEventType;
|
||||
|
||||
typedef struct {
|
||||
SpaMonitorEventType type;
|
||||
void *data;
|
||||
size_t size;
|
||||
} SpaMonitorEvent;
|
||||
|
||||
/**
|
||||
* SpaMonitorCallback:
|
||||
* @node: a #SpaMonitor emiting the event
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue