diff --git a/src/modules/meson.build b/src/modules/meson.build index ce9c1a4fa..2fbf0116d 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -206,6 +206,9 @@ pipewire_module_protocol_pulse_sources = [ 'module-protocol-pulse/client.c', 'module-protocol-pulse/collect.c', 'module-protocol-pulse/extension.c', + 'module-protocol-pulse/extensions/ext-device-manager.c', + 'module-protocol-pulse/extensions/ext-device-restore.c', + 'module-protocol-pulse/extensions/ext-stream-restore.c', 'module-protocol-pulse/format.c', 'module-protocol-pulse/manager.c', 'module-protocol-pulse/media-roles.c', diff --git a/src/modules/module-protocol-pulse/extension.c b/src/modules/module-protocol-pulse/extension.c index 8f3ea225b..ee9ad1740 100644 --- a/src/modules/module-protocol-pulse/extension.c +++ b/src/modules/module-protocol-pulse/extension.c @@ -25,15 +25,9 @@ #include #include +#include "defs.h" #include "extension.h" - -static int do_extension_device_manager(struct client *client, uint32_t tag, struct message *m) -{ - return -ENOTSUP; -} - -#include "extensions/ext-device-restore.c" -#include "extensions/ext-stream-restore.c" +#include "extensions/registry.h" static const struct extension extensions[] = { { "module-stream-restore", 0 | EXTENSION_FLAG, do_extension_stream_restore, }, diff --git a/src/modules/module-protocol-pulse/extensions/ext-device-manager.c b/src/modules/module-protocol-pulse/extensions/ext-device-manager.c new file mode 100644 index 000000000..2ba080ec8 --- /dev/null +++ b/src/modules/module-protocol-pulse/extensions/ext-device-manager.c @@ -0,0 +1,8 @@ +#include + +#include "registry.h" + +int do_extension_device_manager(struct client *client, uint32_t tag, struct message *m) +{ + return -ENOTSUP; +} diff --git a/src/modules/module-protocol-pulse/extensions/ext-device-restore.c b/src/modules/module-protocol-pulse/extensions/ext-device-restore.c index ae67ec5f4..5c6d62826 100644 --- a/src/modules/module-protocol-pulse/extensions/ext-device-restore.c +++ b/src/modules/module-protocol-pulse/extensions/ext-device-restore.c @@ -47,6 +47,7 @@ #include "../message.h" #include "../reply.h" #include "../volume.h" +#include "registry.h" PW_LOG_TOPIC_EXTERN(pulse_ext_dev_restore); #undef PW_LOG_TOPIC_DEFAULT @@ -318,7 +319,7 @@ static const struct extension_sub ext_device_restore[] = { { "SAVE_FORMATS", 5, do_extension_device_restore_save_formats, }, }; -static int do_extension_device_restore(struct client *client, uint32_t tag, struct message *m) +int do_extension_device_restore(struct client *client, uint32_t tag, struct message *m) { uint32_t command; int res; diff --git a/src/modules/module-protocol-pulse/extensions/ext-stream-restore.c b/src/modules/module-protocol-pulse/extensions/ext-stream-restore.c index 963891aec..8b78cde88 100644 --- a/src/modules/module-protocol-pulse/extensions/ext-stream-restore.c +++ b/src/modules/module-protocol-pulse/extensions/ext-stream-restore.c @@ -46,6 +46,7 @@ #include "../message.h" #include "../reply.h" #include "../volume.h" +#include "registry.h" PW_LOG_TOPIC_EXTERN(pulse_ext_stream_restore); #undef PW_LOG_TOPIC_DEFAULT @@ -304,7 +305,7 @@ static const struct extension_sub ext_stream_restore[] = { { "EVENT", 5, }, }; -static int do_extension_stream_restore(struct client *client, uint32_t tag, struct message *m) +int do_extension_stream_restore(struct client *client, uint32_t tag, struct message *m) { uint32_t command; int res; diff --git a/src/modules/module-protocol-pulse/extensions/registry.h b/src/modules/module-protocol-pulse/extensions/registry.h new file mode 100644 index 000000000..ab9faf734 --- /dev/null +++ b/src/modules/module-protocol-pulse/extensions/registry.h @@ -0,0 +1,13 @@ +#ifndef PIPEWIRE_PULSE_EXTENSION_REGISTRY_H +#define PIPEWIRE_PULSE_EXTENSION_REGISTRY_H + +#include + +struct client; +struct message; + +int do_extension_stream_restore(struct client *client, uint32_t tag, struct message *m); +int do_extension_device_restore(struct client *client, uint32_t tag, struct message *m); +int do_extension_device_manager(struct client *client, uint32_t tag, struct message *m); + +#endif /* PIPEWIRE_PULSE_EXTENSION_REGISTRY_H */