mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
protocol-native: move compat_v2 to protocol
This commit is contained in:
parent
7d6fc0f544
commit
17bc9d520e
4 changed files with 12 additions and 8 deletions
|
|
@ -23,6 +23,8 @@
|
|||
#endif
|
||||
|
||||
#include <spa/pod/iter.h>
|
||||
#include <spa/pod/parser.h>
|
||||
#include <spa/pod/builder.h>
|
||||
#include <spa/utils/result.h>
|
||||
#include <spa/utils/string.h>
|
||||
|
||||
|
|
@ -1465,6 +1467,7 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
{
|
||||
struct pw_context *context = pw_impl_module_get_context(module);
|
||||
struct pw_protocol *this;
|
||||
struct pw_impl_core *core = context->core;
|
||||
struct protocol_data *d;
|
||||
const struct pw_properties *props;
|
||||
int res;
|
||||
|
|
@ -1496,10 +1499,10 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
d->module = module;
|
||||
|
||||
props = pw_context_get_properties(context);
|
||||
d->local = create_server(this, context->core, &props->dict);
|
||||
d->local = create_server(this, core, &props->dict);
|
||||
|
||||
if (need_server(context, &props->dict)) {
|
||||
if (impl_add_server(this, context->core, &props->dict) == NULL) {
|
||||
if (impl_add_server(this, core, &props->dict) == NULL) {
|
||||
res = -errno;
|
||||
goto error_cleanup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,3 +27,9 @@ static inline void *get_first_pod_from_data(void *data, uint32_t maxsize, uint64
|
|||
return NULL;
|
||||
return pod;
|
||||
}
|
||||
|
||||
struct protocol_compat_v2 {
|
||||
/* v2 typemap */
|
||||
struct pw_map types;
|
||||
unsigned int send_types:1;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include "interfaces.h"
|
||||
#include "typemap.h"
|
||||
|
||||
#include "../defs.h"
|
||||
#include "../connection.h"
|
||||
|
||||
PW_LOG_TOPIC_EXTERN(mod_topic);
|
||||
|
|
|
|||
|
|
@ -213,12 +213,6 @@ enum spa_node0_command {
|
|||
SPA_NODE0_COMMAND_ClockUpdate,
|
||||
};
|
||||
|
||||
struct protocol_compat_v2 {
|
||||
/* v2 typemap */
|
||||
struct pw_map types;
|
||||
unsigned int send_types:1;
|
||||
};
|
||||
|
||||
#define pw_impl_core_emit(s,m,v,...) spa_hook_list_call(&s->listener_list, struct pw_impl_core_events, m, v, ##__VA_ARGS__)
|
||||
|
||||
#define pw_impl_core_emit_destroy(s) pw_impl_core_emit(s, destroy, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue