remove spalib

This commit is contained in:
Wim Taymans 2018-08-14 12:33:53 +02:00
parent d3b9a52ec4
commit 9d36b85dd6
49 changed files with 566 additions and 1162 deletions

View file

@ -66,7 +66,6 @@ pipewire_module_link_factory = shared_library('pipewire-module-link-factory',
#pipewire_module_protocol_dbus = shared_library('pipewire-module-protocol-dbus', [ 'module-protocol-dbus.c', gdbus_target ],
# c_args : pipewire_module_c_args,
# include_directories : [configinc, spa_inc],
# link_with : spalib,
# install : true,
# install_dir : modules_install_dir,
# dependencies : [glib_dep, gio_dep, mathlib, dl_lib, pipewire_dep],
@ -80,7 +79,6 @@ pipewire_module_protocol_native = shared_library('pipewire-module-protocol-nativ
'module-protocol-native/connection.c' ],
c_args : pipewire_module_c_args,
include_directories : [configinc, spa_inc],
link_with : spalib,
install : true,
install_dir : modules_install_dir,
dependencies : [mathlib, dl_lib, pipewire_dep],

View file

@ -28,7 +28,7 @@
#include <sys/file.h>
#include <spa/pod/iter.h>
#include <spa/lib/debug.h>
#include <spa/debug/pod.h>
#include "config.h"
@ -227,7 +227,7 @@ process_messages(struct client_data *data)
if (debug_messages) {
printf("<<<<<<<<< in: %d %d %d\n", id, opcode, size);
spa_debug_pod((struct spa_pod *)message, 0);
spa_debug_pod(0, core->type.map, (struct spa_pod *)message);
}
if (demarshal[opcode].func(resource, message, size) < 0)
goto invalid_message;
@ -338,7 +338,7 @@ static struct pw_client *client_new(struct server *s, int fd)
if (this->source == NULL)
goto no_source;
this->connection = pw_protocol_native_connection_new(fd);
this->connection = pw_protocol_native_connection_new(protocol->core, fd);
if (this->connection == NULL)
goto no_connection;
@ -561,7 +561,7 @@ on_remote_data(void *data, int fd, enum spa_io mask)
}
if (debug_messages) {
printf("<<<<<<<<< in: %d %d %d\n", id, opcode, size);
spa_debug_pod((struct spa_pod *)message, 0);
spa_debug_pod(0, core->type.map, (struct spa_pod *)message);
}
if (demarshal[opcode].func(proxy, message, size) < 0) {
pw_log_error ("protocol-native %p: invalid message received %u for %u", this,
@ -605,7 +605,7 @@ static int impl_connect_fd(struct pw_protocol_client *client, int fd)
impl->disconnecting = false;
impl->connection = pw_protocol_native_connection_new(fd);
impl->connection = pw_protocol_native_connection_new(remote->core, fd);
if (impl->connection == NULL)
goto error_close;

View file

@ -25,7 +25,7 @@
#include <unistd.h>
#include <sys/socket.h>
#include <spa/lib/debug.h>
#include <spa/debug/pod.h>
#include <pipewire/pipewire.h>
#include <pipewire/private.h>
@ -59,6 +59,8 @@ struct impl {
uint32_t dest_id;
uint8_t opcode;
struct spa_pod_builder builder;
struct pw_core *core;
};
/** \endcond */
@ -193,7 +195,7 @@ static void clear_buffer(struct buffer *buf)
*
* \memberof pw_protocol_native_connection
*/
struct pw_protocol_native_connection *pw_protocol_native_connection_new(int fd)
struct pw_protocol_native_connection *pw_protocol_native_connection_new(struct pw_core *core, int fd)
{
struct impl *impl;
struct pw_protocol_native_connection *this;
@ -216,6 +218,7 @@ struct pw_protocol_native_connection *pw_protocol_native_connection_new(int fd)
impl->in.buffer_data = malloc(MAX_BUFFER_SIZE);
impl->in.buffer_maxsize = MAX_BUFFER_SIZE;
impl->in.update = true;
impl->core = core;
if (impl->out.buffer_data == NULL || impl->in.buffer_data == NULL)
goto no_mem;
@ -432,7 +435,7 @@ pw_protocol_native_connection_end(struct pw_protocol_native_connection *conn,
if (debug_messages) {
printf(">>>>>>>>> out: %d %d %d\n", impl->dest_id, impl->opcode, size);
spa_debug_pod((struct spa_pod *)p, 0);
spa_debug_pod(0, impl->core->type.map, (struct spa_pod *)p);
}
spa_hook_list_call(&conn->listener_list, struct pw_protocol_native_connection_events, need_flush);
}

View file

@ -59,7 +59,7 @@ pw_protocol_native_connection_add_listener(struct pw_protocol_native_connection
}
struct pw_protocol_native_connection *
pw_protocol_native_connection_new(int fd);
pw_protocol_native_connection_new(struct pw_core *core, int fd);
void
pw_protocol_native_connection_destroy(struct pw_protocol_native_connection *conn);