mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
types: work on types
Move static pod types to type system work on type info for types Move the event and command ids to an enum to make it easier to extend later.
This commit is contained in:
parent
fca3e1d85d
commit
805e3bb6c1
82 changed files with 812 additions and 924 deletions
|
|
@ -53,23 +53,23 @@ struct data {
|
|||
|
||||
static void inspect_item(struct data *data, struct spa_pod *item)
|
||||
{
|
||||
spa_debug_pod(0, spa_type_monitor, item);
|
||||
spa_debug_pod(0, spa_type_monitor_item, item);
|
||||
}
|
||||
|
||||
static void on_monitor_event(void *_data, struct spa_event *event)
|
||||
{
|
||||
struct data *data = _data;
|
||||
|
||||
switch (SPA_EVENT_TYPE(event)) {
|
||||
case SPA_ID_EVENT_MONITOR_Added:
|
||||
switch (SPA_MONITOR_EVENT_ID(event)) {
|
||||
case SPA_MONITOR_EVENT_Added:
|
||||
fprintf(stderr, "added:\n");
|
||||
inspect_item(data, SPA_POD_CONTENTS(struct spa_event, event));
|
||||
break;
|
||||
case SPA_ID_EVENT_MONITOR_Removed:
|
||||
case SPA_MONITOR_EVENT_Removed:
|
||||
fprintf(stderr, "removed:\n");
|
||||
inspect_item(data, SPA_POD_CONTENTS(struct spa_event, event));
|
||||
break;
|
||||
case SPA_ID_EVENT_MONITOR_Changed:
|
||||
case SPA_MONITOR_EVENT_Changed:
|
||||
fprintf(stderr, "changed:\n");
|
||||
inspect_item(data, SPA_POD_CONTENTS(struct spa_event, event));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue