mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: compile extensions separately
Avoid including other C source files. Compile them separately.
This commit is contained in:
parent
b78371f702
commit
80ae688cc6
6 changed files with 30 additions and 10 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -25,15 +25,9 @@
|
|||
#include <spa/utils/defs.h>
|
||||
#include <spa/utils/string.h>
|
||||
|
||||
#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, },
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
#include <errno.h>
|
||||
|
||||
#include "registry.h"
|
||||
|
||||
int do_extension_device_manager(struct client *client, uint32_t tag, struct message *m)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
13
src/modules/module-protocol-pulse/extensions/registry.h
Normal file
13
src/modules/module-protocol-pulse/extensions/registry.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef PIPEWIRE_PULSE_EXTENSION_REGISTRY_H
|
||||
#define PIPEWIRE_PULSE_EXTENSION_REGISTRY_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue