mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
parent
c9f5deb81d
commit
e966b1d6f2
4 changed files with 29 additions and 6 deletions
|
|
@ -141,6 +141,7 @@ pipewire_module_protocol_pulse_sources = [
|
|||
'module-protocol-pulse/manager.c',
|
||||
'module-protocol-pulse/media-roles.c',
|
||||
'module-protocol-pulse/message.c',
|
||||
'module-protocol-pulse/message-handler.c',
|
||||
'module-protocol-pulse/module.c',
|
||||
'module-protocol-pulse/operation.c',
|
||||
'module-protocol-pulse/pending-sample.c',
|
||||
|
|
|
|||
|
|
@ -1,11 +1,27 @@
|
|||
#define NAME "pulse-server"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <regex.h>
|
||||
|
||||
#include <spa/param/props.h>
|
||||
#include <spa/pod/builder.h>
|
||||
#include <spa/pod/pod.h>
|
||||
#include <spa/utils/defs.h>
|
||||
#include <spa/utils/string.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
|
||||
#include "collect.h"
|
||||
#include "manager.h"
|
||||
#include "message-handler.h"
|
||||
|
||||
static int bluez_card_object_message_handler(struct pw_manager *m, struct pw_manager_object *o, const char *message, const char *params, char **response)
|
||||
{
|
||||
struct transport_codec_info codecs[64];
|
||||
uint32_t n_codecs, active;
|
||||
|
||||
pw_log_debug(NAME "bluez-card %p object message:'%s' params:'%s'", o, message, params);
|
||||
pw_log_debug(NAME ": bluez-card %p object message:'%s' params:'%s'", o, message, params);
|
||||
|
||||
n_codecs = collect_transport_codec_info(o, codecs, SPA_N_ELEMENTS(codecs), &active);
|
||||
|
||||
|
|
@ -79,7 +95,7 @@ static int bluez_card_object_message_handler(struct pw_manager *m, struct pw_man
|
|||
|
||||
static int core_object_message_handler(struct pw_manager *m, struct pw_manager_object *o, const char *message, const char *params, char **response)
|
||||
{
|
||||
pw_log_debug(NAME "core %p object message:'%s' params:'%s'", o, message, params);
|
||||
pw_log_debug(NAME ": core %p object message:'%s' params:'%s'", o, message, params);
|
||||
|
||||
if (spa_streq(message, "list-handlers")) {
|
||||
FILE *r;
|
||||
|
|
@ -101,7 +117,7 @@ static int core_object_message_handler(struct pw_manager *m, struct pw_manager_o
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static void register_object_message_handlers(struct pw_manager_object *o)
|
||||
void register_object_message_handlers(struct pw_manager_object *o)
|
||||
{
|
||||
const char *str;
|
||||
|
||||
|
|
|
|||
8
src/modules/module-protocol-pulse/message-handler.h
Normal file
8
src/modules/module-protocol-pulse/message-handler.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef PULSE_SERVER_MESSAGE_HANDLER_H
|
||||
#define PULSE_SERVER_MESSAGE_HANDLER_H
|
||||
|
||||
struct pw_manager_object;
|
||||
|
||||
void register_object_message_handlers(struct pw_manager_object *o);
|
||||
|
||||
#endif /* PULSE_SERVER_MESSAGE_HANDLER_H */
|
||||
|
|
@ -34,7 +34,6 @@
|
|||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <fcntl.h>
|
||||
#include <regex.h>
|
||||
|
||||
#include <pipewire/log.h>
|
||||
|
||||
|
|
@ -67,6 +66,7 @@
|
|||
#include "format.h"
|
||||
#include "internal.h"
|
||||
#include "message.h"
|
||||
#include "message-handler.h"
|
||||
#include "module.h"
|
||||
#include "operation.h"
|
||||
#include "pending-sample.h"
|
||||
|
|
@ -101,8 +101,6 @@ struct latency_offset_data {
|
|||
unsigned int initialized:1;
|
||||
};
|
||||
|
||||
#include "message-handler.c"
|
||||
|
||||
static struct sample *find_sample(struct impl *impl, uint32_t idx, const char *name)
|
||||
{
|
||||
union pw_map_item *item;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue