mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
interface: add an interface struct
The interface struct has the type,version and methods of the interface. Make spa interfaces extend from spa_interface and make a separate structure for the methods. Pass a generic void* as the first argument of methods, like we don in PipeWire. Bundle the methods + implementation in a versioned inteface and use that to invoke methods. This way we can do version checks on the methods. Make resource and proxy interfaces that we can can call. We can then make the core interfaces independent on proxy/resource and hide them in the lower layers. Add add_listener method to methods of core interfaces, just like SPA.
This commit is contained in:
parent
eb6481efb3
commit
ff946e3d4b
85 changed files with 3051 additions and 3000 deletions
|
|
@ -129,17 +129,17 @@ static void update_param(struct data *data)
|
|||
data->param_accum -= M_PI_M2;
|
||||
}
|
||||
|
||||
static int impl_send_command(struct spa_node *node, const struct spa_command *command)
|
||||
static int impl_send_command(void *object, const struct spa_command *command)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_add_listener(struct spa_node *node,
|
||||
static int impl_add_listener(void *object,
|
||||
struct spa_hook *listener,
|
||||
const struct spa_node_events *events,
|
||||
void *data)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
struct spa_hook_list save;
|
||||
|
||||
spa_hook_list_isolate(&d->hooks, &save, listener, events, data);
|
||||
|
|
@ -154,23 +154,23 @@ static int impl_add_listener(struct spa_node *node,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_set_callbacks(struct spa_node *node,
|
||||
static int impl_set_callbacks(void *object,
|
||||
const struct spa_node_callbacks *callbacks, void *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_set_io(struct spa_node *node,
|
||||
static int impl_set_io(void *object,
|
||||
uint32_t id, void *data, size_t size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_port_set_io(struct spa_node *node,
|
||||
static int impl_port_set_io(void *object,
|
||||
enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t id, void *data, size_t size)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
|
||||
switch (id) {
|
||||
case SPA_IO_Buffers:
|
||||
|
|
@ -186,12 +186,12 @@ static int impl_port_set_io(struct spa_node *node,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_port_enum_params(struct spa_node *node, int seq,
|
||||
static int impl_port_enum_params(void *object, int seq,
|
||||
enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t id, uint32_t start, uint32_t num,
|
||||
const struct spa_pod *filter)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
struct spa_pod *param;
|
||||
struct spa_pod_builder b = { 0 };
|
||||
uint8_t buffer[1024];
|
||||
|
|
@ -288,11 +288,11 @@ static int impl_port_enum_params(struct spa_node *node, int seq,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int port_set_format(struct spa_node *node,
|
||||
static int port_set_format(void *object,
|
||||
enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t flags, const struct spa_pod *format)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
Uint32 sdl_format;
|
||||
void *dest;
|
||||
|
||||
|
|
@ -327,22 +327,22 @@ static int port_set_format(struct spa_node *node,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_port_set_param(struct spa_node *node,
|
||||
static int impl_port_set_param(void *object,
|
||||
enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t id, uint32_t flags,
|
||||
const struct spa_pod *param)
|
||||
{
|
||||
if (id == SPA_PARAM_Format) {
|
||||
return port_set_format(node, direction, port_id, flags, param);
|
||||
return port_set_format(object, direction, port_id, flags, param);
|
||||
}
|
||||
else
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static int impl_port_use_buffers(struct spa_node *node, enum spa_direction direction, uint32_t port_id,
|
||||
static int impl_port_use_buffers(void *object, enum spa_direction direction, uint32_t port_id,
|
||||
struct spa_buffer **buffers, uint32_t n_buffers)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < n_buffers; i++)
|
||||
|
|
@ -417,9 +417,9 @@ static int do_render(struct spa_loop *loop, bool async, uint32_t seq,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_node_process(struct spa_node *node)
|
||||
static int impl_node_process(void *object)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
struct spa_buffer *buf;
|
||||
int res;
|
||||
|
||||
|
|
@ -441,8 +441,8 @@ static int impl_node_process(struct spa_node *node)
|
|||
return d->io->status = SPA_STATUS_NEED_BUFFER;
|
||||
}
|
||||
|
||||
static const struct spa_node impl_node = {
|
||||
SPA_VERSION_NODE,
|
||||
static const struct spa_node_methods impl_node = {
|
||||
SPA_VERSION_NODE_METHODS,
|
||||
.add_listener = impl_add_listener,
|
||||
.set_callbacks = impl_set_callbacks,
|
||||
.set_io = impl_set_io,
|
||||
|
|
@ -465,7 +465,10 @@ static void make_node(struct data *data)
|
|||
pw_properties_set(props, PW_NODE_PROP_CATEGORY, "Capture");
|
||||
pw_properties_set(props, PW_NODE_PROP_ROLE, "Camera");
|
||||
|
||||
data->impl_node = impl_node;
|
||||
data->impl_node.iface = SPA_INTERFACE_INIT(
|
||||
SPA_TYPE_INTERFACE_Node,
|
||||
SPA_VERSION_NODE,
|
||||
&impl_node, data);
|
||||
pw_remote_export(data->remote, SPA_TYPE_INTERFACE_Node, props, &data->impl_node);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,17 +102,17 @@ static void update_volume(struct data *data)
|
|||
data->volume_accum -= M_PI_M2;
|
||||
}
|
||||
|
||||
static int impl_send_command(struct spa_node *node, const struct spa_command *command)
|
||||
static int impl_send_command(void *object, const struct spa_command *command)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_add_listener(struct spa_node *node,
|
||||
static int impl_add_listener(void *object,
|
||||
struct spa_hook *listener,
|
||||
const struct spa_node_events *events,
|
||||
void *data)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
struct spa_hook_list save;
|
||||
|
||||
spa_hook_list_isolate(&d->hooks, &save, listener, events, data);
|
||||
|
|
@ -125,22 +125,22 @@ static int impl_add_listener(struct spa_node *node,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_set_callbacks(struct spa_node *node,
|
||||
static int impl_set_callbacks(void *object,
|
||||
const struct spa_node_callbacks *callbacks, void *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_set_io(struct spa_node *node,
|
||||
static int impl_set_io(void *object,
|
||||
uint32_t id, void *data, size_t size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_port_set_io(struct spa_node *node, enum spa_direction direction, uint32_t port_id,
|
||||
static int impl_port_set_io(void *object, enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t id, void *data, size_t size)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
|
||||
switch (id) {
|
||||
case SPA_IO_Buffers:
|
||||
|
|
@ -156,12 +156,12 @@ static int impl_port_set_io(struct spa_node *node, enum spa_direction direction,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_port_enum_params(struct spa_node *node, int seq,
|
||||
static int impl_port_enum_params(void *object, int seq,
|
||||
enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t id, uint32_t start, uint32_t num,
|
||||
const struct spa_pod *filter)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
struct spa_pod *param;
|
||||
struct spa_pod_builder b = { 0 };
|
||||
uint8_t buffer[1024];
|
||||
|
|
@ -260,11 +260,11 @@ static int impl_port_enum_params(struct spa_node *node, int seq,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int port_set_format(struct spa_node *node,
|
||||
static int port_set_format(void *object,
|
||||
enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t flags, const struct spa_pod *format)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
|
||||
d->info.change_mask = SPA_PORT_CHANGE_MASK_PARAMS;
|
||||
if (format == NULL) {
|
||||
|
|
@ -291,22 +291,22 @@ static int port_set_format(struct spa_node *node,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_port_set_param(struct spa_node *node,
|
||||
static int impl_port_set_param(void *object,
|
||||
enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t id, uint32_t flags,
|
||||
const struct spa_pod *param)
|
||||
{
|
||||
if (id == SPA_PARAM_Format) {
|
||||
return port_set_format(node, direction, port_id, flags, param);
|
||||
return port_set_format(object, direction, port_id, flags, param);
|
||||
}
|
||||
else
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static int impl_port_use_buffers(struct spa_node *node, enum spa_direction direction, uint32_t port_id,
|
||||
static int impl_port_use_buffers(void *object, enum spa_direction direction, uint32_t port_id,
|
||||
struct spa_buffer **buffers, uint32_t n_buffers)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
uint32_t i;
|
||||
for (i = 0; i < n_buffers; i++) {
|
||||
struct buffer *b = &d->buffers[i];
|
||||
|
|
@ -347,9 +347,9 @@ static inline void reuse_buffer(struct data *d, uint32_t id)
|
|||
spa_list_append(&d->empty, &d->buffers[id].link);
|
||||
}
|
||||
|
||||
static int impl_port_reuse_buffer(struct spa_node *node, uint32_t port_id, uint32_t buffer_id)
|
||||
static int impl_port_reuse_buffer(void *object, uint32_t port_id, uint32_t buffer_id)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
reuse_buffer(d, buffer_id);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -396,9 +396,9 @@ static void fill_s16(struct data *d, void *dest, int avail)
|
|||
}
|
||||
}
|
||||
|
||||
static int impl_node_process(struct spa_node *node)
|
||||
static int impl_node_process(void *object)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
struct buffer *b;
|
||||
int avail;
|
||||
struct spa_io_buffers *io = d->io;
|
||||
|
|
@ -446,8 +446,8 @@ static int impl_node_process(struct spa_node *node)
|
|||
return SPA_STATUS_HAVE_BUFFER;
|
||||
}
|
||||
|
||||
static const struct spa_node impl_node = {
|
||||
SPA_VERSION_NODE,
|
||||
static const struct spa_node_methods impl_node = {
|
||||
SPA_VERSION_NODE_METHODS,
|
||||
.add_listener = impl_add_listener,
|
||||
.set_callbacks = impl_set_callbacks,
|
||||
.set_io = impl_set_io,
|
||||
|
|
@ -473,7 +473,10 @@ static void make_node(struct data *data)
|
|||
if (data->path)
|
||||
pw_properties_set(props, PW_NODE_PROP_TARGET_NODE, data->path);
|
||||
|
||||
data->impl_node = impl_node;
|
||||
data->impl_node.iface = SPA_INTERFACE_INIT(
|
||||
SPA_TYPE_INTERFACE_Node,
|
||||
SPA_VERSION_NODE,
|
||||
&impl_node, data);
|
||||
pw_remote_export(data->remote, SPA_TYPE_INTERFACE_Node, props, &data->impl_node);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ static int make_node(struct data *data)
|
|||
data->node = pw_factory_create_object(factory,
|
||||
NULL,
|
||||
PW_TYPE_INTERFACE_Node,
|
||||
PW_VERSION_NODE,
|
||||
PW_VERSION_NODE_PROXY,
|
||||
props, SPA_ID_INVALID);
|
||||
|
||||
pw_node_set_active(data->node, true);
|
||||
|
|
|
|||
|
|
@ -80,22 +80,22 @@ static void handle_events(struct data *data)
|
|||
}
|
||||
}
|
||||
|
||||
static int impl_set_io(struct spa_node *node, uint32_t id, void *data, size_t size)
|
||||
static int impl_set_io(void *object, uint32_t id, void *data, size_t size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_send_command(struct spa_node *node, const struct spa_command *command)
|
||||
static int impl_send_command(void *object, const struct spa_command *command)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_add_listener(struct spa_node *node,
|
||||
static int impl_add_listener(void *object,
|
||||
struct spa_hook *listener,
|
||||
const struct spa_node_events *events,
|
||||
void *data)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
struct spa_port_info info;
|
||||
struct spa_hook_list save;
|
||||
|
||||
|
|
@ -112,16 +112,16 @@ static int impl_add_listener(struct spa_node *node,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_set_callbacks(struct spa_node *node,
|
||||
static int impl_set_callbacks(void *object,
|
||||
const struct spa_node_callbacks *callbacks, void *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_port_set_io(struct spa_node *node, enum spa_direction direction, uint32_t port_id,
|
||||
static int impl_port_set_io(void *object, enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t id, void *data, size_t size)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
|
||||
if (id == SPA_IO_Buffers)
|
||||
d->io = data;
|
||||
|
|
@ -131,12 +131,12 @@ static int impl_port_set_io(struct spa_node *node, enum spa_direction direction,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_port_enum_params(struct spa_node *node, int seq,
|
||||
static int impl_port_enum_params(void *object, int seq,
|
||||
enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t id, uint32_t start, uint32_t num,
|
||||
const struct spa_pod *filter)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
struct spa_pod *param;
|
||||
struct spa_pod_builder b = { 0 };
|
||||
uint8_t buffer[1024];
|
||||
|
|
@ -200,10 +200,10 @@ static int impl_port_enum_params(struct spa_node *node, int seq,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int port_set_format(struct spa_node *node, enum spa_direction direction, uint32_t port_id,
|
||||
static int port_set_format(void *object, enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t flags, const struct spa_pod *format)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
Uint32 sdl_format;
|
||||
void *dest;
|
||||
|
||||
|
|
@ -229,22 +229,22 @@ static int port_set_format(struct spa_node *node, enum spa_direction direction,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_port_set_param(struct spa_node *node,
|
||||
static int impl_port_set_param(void *object,
|
||||
enum spa_direction direction, uint32_t port_id,
|
||||
uint32_t id, uint32_t flags,
|
||||
const struct spa_pod *param)
|
||||
{
|
||||
if (id == SPA_PARAM_Format) {
|
||||
return port_set_format(node, direction, port_id, flags, param);
|
||||
return port_set_format(object, direction, port_id, flags, param);
|
||||
}
|
||||
else
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static int impl_port_use_buffers(struct spa_node *node, enum spa_direction direction, uint32_t port_id,
|
||||
static int impl_port_use_buffers(void *object, enum spa_direction direction, uint32_t port_id,
|
||||
struct spa_buffer **buffers, uint32_t n_buffers)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < n_buffers; i++)
|
||||
|
|
@ -303,9 +303,9 @@ static int do_render(struct spa_loop *loop, bool async, uint32_t seq,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int impl_node_process(struct spa_node *node)
|
||||
static int impl_node_process(void *object)
|
||||
{
|
||||
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
|
||||
struct data *d = object;
|
||||
int res;
|
||||
|
||||
if ((res = pw_loop_invoke(pw_main_loop_get_loop(d->loop), do_render,
|
||||
|
|
@ -319,9 +319,8 @@ static int impl_node_process(struct spa_node *node)
|
|||
return SPA_STATUS_NEED_BUFFER;
|
||||
}
|
||||
|
||||
static const struct spa_node impl_node = {
|
||||
SPA_VERSION_NODE,
|
||||
NULL,
|
||||
static const struct spa_node_methods impl_node = {
|
||||
SPA_VERSION_NODE_METHODS,
|
||||
.add_listener = impl_add_listener,
|
||||
.set_callbacks = impl_set_callbacks,
|
||||
.set_io = impl_set_io,
|
||||
|
|
@ -339,7 +338,10 @@ static void make_nodes(struct data *data)
|
|||
struct pw_properties *props;
|
||||
|
||||
data->node = pw_node_new(data->core, "SDL-sink", NULL, 0);
|
||||
data->impl_node = impl_node;
|
||||
data->impl_node.iface = SPA_INTERFACE_INIT(
|
||||
SPA_TYPE_INTERFACE_Node,
|
||||
SPA_VERSION_NODE,
|
||||
&impl_node, data);
|
||||
pw_node_set_implementation(data->node, &data->impl_node);
|
||||
|
||||
pw_node_register(data->node, NULL, NULL, NULL);
|
||||
|
|
@ -350,7 +352,7 @@ static void make_nodes(struct data *data)
|
|||
data->v4l2 = pw_factory_create_object(factory,
|
||||
NULL,
|
||||
PW_TYPE_INTERFACE_Node,
|
||||
PW_VERSION_NODE,
|
||||
PW_VERSION_NODE_PROXY,
|
||||
props,
|
||||
SPA_ID_INVALID);
|
||||
data->link = pw_link_new(data->core,
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ static int link_session_dsp(struct impl *impl, struct session *session)
|
|||
session->link_proxy = pw_core_proxy_create_object(impl->core_proxy,
|
||||
"link-factory",
|
||||
PW_TYPE_INTERFACE_Link,
|
||||
PW_VERSION_LINK,
|
||||
PW_VERSION_LINK_PROXY,
|
||||
&props->dict,
|
||||
0);
|
||||
pw_proxy_add_listener(session->link_proxy, &session->link_listener, &link_proxy_events, session);
|
||||
|
|
@ -481,7 +481,7 @@ handle_node(struct impl *impl, uint32_t id, uint32_t parent_id,
|
|||
media_class = props ? spa_dict_lookup(props, "media.class") : NULL;
|
||||
|
||||
p = pw_registry_proxy_bind(impl->registry_proxy,
|
||||
id, type, PW_VERSION_NODE,
|
||||
id, type, PW_VERSION_NODE_PROXY,
|
||||
sizeof(struct node));
|
||||
|
||||
node = pw_proxy_get_user_data(p);
|
||||
|
|
@ -657,7 +657,7 @@ handle_port(struct impl *impl, uint32_t id, uint32_t parent_id, uint32_t type,
|
|||
return -EINVAL;
|
||||
|
||||
p = pw_registry_proxy_bind(impl->registry_proxy,
|
||||
id, type, PW_VERSION_PORT,
|
||||
id, type, PW_VERSION_PORT_PROXY,
|
||||
sizeof(struct port));
|
||||
|
||||
port = pw_proxy_get_user_data(p);
|
||||
|
|
@ -737,7 +737,7 @@ handle_client(struct impl *impl, uint32_t id, uint32_t parent_id,
|
|||
const char *str;
|
||||
|
||||
p = pw_registry_proxy_bind(impl->registry_proxy,
|
||||
id, type, PW_VERSION_CLIENT,
|
||||
id, type, PW_VERSION_CLIENT_PROXY,
|
||||
sizeof(struct client));
|
||||
|
||||
client = pw_proxy_get_user_data(p);
|
||||
|
|
@ -932,7 +932,7 @@ static int link_nodes(struct node *peer, enum pw_direction direction, struct nod
|
|||
pw_core_proxy_create_object(impl->core_proxy,
|
||||
"link-factory",
|
||||
PW_TYPE_INTERFACE_Link,
|
||||
PW_VERSION_LINK,
|
||||
PW_VERSION_LINK_PROXY,
|
||||
&props->dict,
|
||||
0);
|
||||
|
||||
|
|
@ -1259,7 +1259,7 @@ static void rescan_session(struct impl *impl, struct session *sess)
|
|||
sess->dsp_proxy = pw_core_proxy_create_object(impl->core_proxy,
|
||||
"audio-dsp",
|
||||
PW_TYPE_INTERFACE_Node,
|
||||
PW_VERSION_NODE,
|
||||
PW_VERSION_NODE_PROXY,
|
||||
&props->dict,
|
||||
0);
|
||||
pw_properties_free(props);
|
||||
|
|
@ -1299,7 +1299,7 @@ static void do_rescan(struct impl *impl)
|
|||
static void core_done(void *data, uint32_t id, int seq)
|
||||
{
|
||||
struct impl *impl = data;
|
||||
pw_log_debug("media-session %p: sync %d %d/%d", impl, id, seq, impl->seq);
|
||||
pw_log_debug("media-session %p: sync %u %d/%d", impl, id, seq, impl->seq);
|
||||
if (impl->seq == seq)
|
||||
do_rescan(impl);
|
||||
}
|
||||
|
|
@ -1326,7 +1326,7 @@ static void on_state_changed(void *_data, enum pw_remote_state old, enum pw_remo
|
|||
&impl->core_listener,
|
||||
&core_events, impl);
|
||||
impl->registry_proxy = pw_core_proxy_get_registry(impl->core_proxy,
|
||||
PW_VERSION_REGISTRY, 0);
|
||||
PW_VERSION_REGISTRY_PROXY, 0);
|
||||
pw_registry_proxy_add_listener(impl->registry_proxy,
|
||||
&impl->registry_listener,
|
||||
®istry_events, impl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue