mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
remove spalib
This commit is contained in:
parent
f532fd8681
commit
a6ad8f747f
69 changed files with 612 additions and 1250 deletions
|
|
@ -8,6 +8,6 @@ load-module libpipewire-module-spa-monitor bluez5/libspa-bluez5 bluez5-monitor b
|
|||
#load-module libpipewire-module-spa-node videotestsrc/libspa-videotestsrc videotestsrc videotestsrc Spa:POD:Object:Props:patternType=Spa:POD:Object:Props:patternType:snow
|
||||
load-module libpipewire-module-client-node
|
||||
load-module libpipewire-module-flatpak
|
||||
#load-module libpipewire-module-media-session
|
||||
load-module libpipewire-module-media-session
|
||||
load-module libpipewire-module-audio-dsp
|
||||
load-module libpipewire-module-link-factory
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include <spa/param/format-utils.h>
|
||||
#include <spa/param/audio/format-utils.h>
|
||||
#include <spa/param/props.h>
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include <spa/param/video/format-utils.h>
|
||||
#include <spa/param/props.h>
|
||||
#include <spa/node/io.h>
|
||||
#include <spa/lib/debug.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <pipewire/module.h>
|
||||
|
|
@ -455,7 +455,7 @@ static int port_set_format(struct spa_node *node,
|
|||
if (format == NULL)
|
||||
return 0;
|
||||
|
||||
spa_debug_pod(format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(0, d->t->map, format);
|
||||
|
||||
spa_format_video_raw_parse(format, &d->format, &d->type.format_video);
|
||||
|
||||
|
|
@ -683,8 +683,6 @@ int main(int argc, char *argv[])
|
|||
init_type(&data.type, data.t->map);
|
||||
reset_props(&data.props);
|
||||
|
||||
spa_debug_set_type_map(data.t->map);
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
printf("can't initialize SDL: %s\n", SDL_GetError());
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <spa/param/audio/format-utils.h>
|
||||
#include <spa/param/props.h>
|
||||
#include <spa/node/io.h>
|
||||
#include <spa/lib/debug.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
|
||||
|
|
@ -359,7 +359,7 @@ static int port_set_format(struct spa_node *node,
|
|||
return 0;
|
||||
}
|
||||
|
||||
spa_debug_pod(format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(0, d->t->map, format);
|
||||
|
||||
if (spa_format_audio_raw_parse(format, &d->format, &d->type.format_audio) < 0)
|
||||
return -EINVAL;
|
||||
|
|
@ -602,7 +602,6 @@ int main(int argc, char *argv[])
|
|||
spa_list_init(&data.empty);
|
||||
init_type(&data.type, data.t->map);
|
||||
reset_props(&data.props);
|
||||
spa_debug_set_type_map(data.t->map);
|
||||
|
||||
pw_remote_add_listener(data.remote, &data.remote_listener, &remote_events, &data);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@
|
|||
#include <spa/param/video/format-utils.h>
|
||||
#include <spa/param/props.h>
|
||||
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <pipewire/factory.h>
|
||||
|
||||
|
|
@ -140,8 +138,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
pw_module_load(data.core, "libpipewire-module-spa-node-factory", NULL, NULL, NULL, NULL);
|
||||
|
||||
spa_debug_set_type_map(data.t->map);
|
||||
|
||||
pw_remote_add_listener(data.remote, &data.remote_listener, &remote_events, &data);
|
||||
|
||||
pw_remote_connect(data.remote);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <spa/param/video/format-utils.h>
|
||||
#include <spa/param/props.h>
|
||||
#include <spa/node/io.h>
|
||||
#include <spa/lib/debug.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <pipewire/module.h>
|
||||
|
|
@ -337,7 +337,7 @@ static int port_set_format(struct spa_node *node, enum spa_direction direction,
|
|||
if (format == NULL)
|
||||
return 0;
|
||||
|
||||
spa_debug_pod(format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(0, d->t->map, format);
|
||||
|
||||
spa_format_video_raw_parse(format, &d->format, &d->type.format_video);
|
||||
|
||||
|
|
@ -511,8 +511,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
init_type(&data.type, data.t->map);
|
||||
|
||||
spa_debug_set_type_map(data.t->map);
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
printf("can't initialize SDL: %s\n", SDL_GetError());
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@
|
|||
#include <spa/utils/hook.h>
|
||||
#include <spa/param/audio/format-utils.h>
|
||||
|
||||
#include <spa/lib/pod.h>
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
#include "pipewire/core.h"
|
||||
#include "pipewire/control.h"
|
||||
#include "pipewire/link.h"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <spa/param/format-utils.h>
|
||||
#include <spa/param/video/format-utils.h>
|
||||
#include <spa/param/props.h>
|
||||
#include <spa/lib/debug.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
|
||||
|
|
@ -322,7 +322,7 @@ static int build_format(struct data *data, struct spa_pod_builder *b, const stru
|
|||
params[0] = spa_pod_builder_pop(b);
|
||||
|
||||
printf("supported formats:\n");
|
||||
spa_debug_pod(params[0], SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(2, data->t->map, params[0]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -355,7 +355,6 @@ int main(int argc, char *argv[])
|
|||
data.path = argc > 1 ? argv[1] : NULL;
|
||||
|
||||
init_type(&data.type, data.t->map);
|
||||
spa_debug_set_type_map(data.t->map);
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
printf("can't initialize SDL: %s\n", SDL_GetError());
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#include <spa/param/format-utils.h>
|
||||
#include <spa/param/video/format-utils.h>
|
||||
#include <spa/param/props.h>
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,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],
|
||||
|
|
@ -74,7 +73,6 @@ pipewire_module_audio_dsp = shared_library('pipewire-module-audio-dsp',
|
|||
'spa/spa-node.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, rt_lib, pipewire_dep],
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
#include <spa/buffer/alloc.h>
|
||||
#include <spa/pod/parser.h>
|
||||
#include <spa/param/audio/format-utils.h>
|
||||
|
||||
#include <spa/lib/pod.h>
|
||||
#include <spa/debug/pod.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#include "pipewire/core.h"
|
||||
#include "pipewire/pipewire.h"
|
||||
|
|
@ -45,8 +45,6 @@
|
|||
#include "client-node.h"
|
||||
#include "client-stream.h"
|
||||
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
/** \cond */
|
||||
|
||||
struct type {
|
||||
|
|
@ -349,14 +347,10 @@ static int debug_params(struct impl *impl, struct spa_node *node,
|
|||
struct pw_type *t = impl->t;
|
||||
struct spa_pod_builder b = { 0 };
|
||||
uint8_t buffer[4096];
|
||||
uint32_t state, flag;
|
||||
struct spa_pod *format;
|
||||
uint32_t state;
|
||||
struct spa_pod *param;
|
||||
int res;
|
||||
|
||||
flag = 0;
|
||||
if (id == t->param.idEnumFormat)
|
||||
flag |= SPA_DEBUG_FLAG_FORMAT;
|
||||
|
||||
spa_log_error(this->log, "params %s:", spa_type_map_get_type(t->map, id));
|
||||
|
||||
state = 0;
|
||||
|
|
@ -365,18 +359,18 @@ static int debug_params(struct impl *impl, struct spa_node *node,
|
|||
res = spa_node_port_enum_params(node,
|
||||
direction, port_id,
|
||||
id, &state,
|
||||
NULL, &format, &b);
|
||||
NULL, ¶m, &b);
|
||||
if (res <= 0) {
|
||||
if (res < 0)
|
||||
spa_log_error(this->log, " error: %s", spa_strerror(res));
|
||||
break;
|
||||
}
|
||||
spa_debug_pod(format, flag);
|
||||
spa_debug_pod(2, t->map, param);
|
||||
}
|
||||
|
||||
spa_log_error(this->log, "failed filter:");
|
||||
if (filter)
|
||||
spa_debug_pod(filter, flag);
|
||||
spa_debug_pod(2, t->map, filter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -417,7 +411,7 @@ static int negotiate_format(struct impl *impl)
|
|||
}
|
||||
|
||||
spa_pod_fixate(format);
|
||||
spa_debug_pod(format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(0, t->map, format);
|
||||
|
||||
if ((res = spa_node_port_set_param(impl->adapter_mix,
|
||||
SPA_DIRECTION_REVERSE(impl->direction), 0,
|
||||
|
|
|
|||
|
|
@ -28,9 +28,7 @@
|
|||
#include <spa/node/node.h>
|
||||
#include <spa/utils/hook.h>
|
||||
#include <spa/param/audio/format-utils.h>
|
||||
|
||||
#include <spa/lib/pod.h>
|
||||
#include <spa/lib/debug.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#include "pipewire/core.h"
|
||||
#include "pipewire/control.h"
|
||||
|
|
@ -666,7 +664,7 @@ static int collect_audio_format(void *data, uint32_t id,
|
|||
return 0;
|
||||
|
||||
spa_pod_fixate(param);
|
||||
spa_debug_pod(param, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(0, impl->t->map, param);
|
||||
|
||||
if (spa_format_audio_raw_parse(param, &info, &impl->type.format_audio) < 0)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@
|
|||
#include <spa/utils/hook.h>
|
||||
#include <spa/param/audio/format-utils.h>
|
||||
|
||||
#include <spa/lib/pod.h>
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
#include "pipewire/core.h"
|
||||
#include "pipewire/link.h"
|
||||
#include "pipewire/log.h"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ process_messages(struct client_data *data)
|
|||
|
||||
if (debug_messages) {
|
||||
fprintf(stderr, "<<<<<<<<< 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;
|
||||
|
|
@ -344,7 +344,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;
|
||||
|
||||
|
|
@ -567,7 +567,7 @@ on_remote_data(void *data, int fd, enum spa_io mask)
|
|||
}
|
||||
if (debug_messages) {
|
||||
fprintf(stderr, "<<<<<<<<< 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,
|
||||
|
|
@ -611,7 +611,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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
fprintf(stderr, ">>>>>>>>> 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, 0);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,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);
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <pipewire/private.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <pipewire/private.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include <spa/node/node.h>
|
||||
#include <spa/monitor/monitor.h>
|
||||
#include <spa/pod/parser.h>
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
#include <pipewire/log.h>
|
||||
#include <pipewire/type.h>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,10 @@
|
|||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <spa/lib/debug.h>
|
||||
#include <pipewire/log.h>
|
||||
|
||||
#include <spa/support/dbus.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <pipewire/private.h>
|
||||
|
|
@ -390,8 +392,6 @@ struct pw_core *pw_core_new(struct pw_loop *main_loop, struct pw_properties *pro
|
|||
pw_type_init(&this->type);
|
||||
pw_map_init(&this->globals, 128, 32);
|
||||
|
||||
spa_debug_set_type_map(this->type.map);
|
||||
|
||||
this->support[0] = SPA_SUPPORT_INIT(SPA_TYPE__TypeMap, this->type.map);
|
||||
this->support[1] = SPA_SUPPORT_INIT(SPA_TYPE_LOOP__DataLoop, this->data_loop->loop);
|
||||
this->support[2] = SPA_SUPPORT_INIT(SPA_TYPE_LOOP__MainLoop, this->main_loop->loop);
|
||||
|
|
@ -759,7 +759,7 @@ int pw_core_find_format(struct pw_core *core,
|
|||
}
|
||||
pw_log_debug("Got output format:");
|
||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
||||
spa_debug_pod(*format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(2, t->map, *format);
|
||||
} else if (out_state >= PW_PORT_STATE_CONFIGURE && in_state > PW_PORT_STATE_CONFIGURE) {
|
||||
/* only output needs format */
|
||||
if ((res = spa_node_port_enum_params(input->node->node,
|
||||
|
|
@ -773,7 +773,7 @@ int pw_core_find_format(struct pw_core *core,
|
|||
}
|
||||
pw_log_debug("Got input format:");
|
||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
||||
spa_debug_pod(*format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(2, t->map, *format);
|
||||
} else if (in_state == PW_PORT_STATE_CONFIGURE && out_state == PW_PORT_STATE_CONFIGURE) {
|
||||
struct spa_pod_builder fb = { 0 };
|
||||
uint8_t fbuf[4096];
|
||||
|
|
@ -795,7 +795,7 @@ int pw_core_find_format(struct pw_core *core,
|
|||
}
|
||||
pw_log_debug("enum output %d with filter: %p", oidx, filter);
|
||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
||||
spa_debug_pod(filter, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(2, t->map, filter);
|
||||
|
||||
if ((res = spa_node_port_enum_params(output->node->node,
|
||||
output->direction, output->port_id,
|
||||
|
|
@ -811,7 +811,7 @@ int pw_core_find_format(struct pw_core *core,
|
|||
|
||||
pw_log_debug("Got filtered:");
|
||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
||||
spa_debug_pod(*format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(2, core->type.map, *format);
|
||||
} else {
|
||||
res = -EBADF;
|
||||
asprintf(error, "error node state");
|
||||
|
|
|
|||
|
|
@ -25,14 +25,15 @@
|
|||
#include <spa/pod/compare.h>
|
||||
#include <spa/param/param.h>
|
||||
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
#include "pipewire.h"
|
||||
#include "private.h"
|
||||
#include "pipewire.h"
|
||||
#include "interfaces.h"
|
||||
#include "link.h"
|
||||
#include "work-queue.h"
|
||||
|
||||
#include <spa/debug/node.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#define MAX_BUFFERS 64
|
||||
|
||||
/** \cond */
|
||||
|
|
@ -222,7 +223,7 @@ static int do_negotiate(struct pw_link *this, uint32_t in_state, uint32_t out_st
|
|||
|
||||
pw_log_debug("link %p: doing set format %p", this, format);
|
||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
||||
spa_debug_pod(format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(2, t->map, format);
|
||||
|
||||
if (out_mix_state == PW_PORT_STATE_CONFIGURE) {
|
||||
pw_log_debug("link %p: doing set format on output mix", this);
|
||||
|
|
@ -499,7 +500,7 @@ param_filter(struct pw_link *this,
|
|||
}
|
||||
|
||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG) && iparam != NULL)
|
||||
spa_debug_pod(iparam, 0);
|
||||
spa_debug_pod(2, this->core->type.map, iparam);
|
||||
|
||||
for (oidx = 0;;) {
|
||||
pw_log_debug("oparam %d", oidx);
|
||||
|
|
@ -510,7 +511,7 @@ param_filter(struct pw_link *this,
|
|||
}
|
||||
|
||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
||||
spa_debug_pod(oparam, 0);
|
||||
spa_debug_pod(2, this->core->type.map, oparam);
|
||||
|
||||
num++;
|
||||
}
|
||||
|
|
@ -614,8 +615,8 @@ static int do_allocation(struct pw_link *this, uint32_t in_state, uint32_t out_s
|
|||
}
|
||||
|
||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG)) {
|
||||
spa_debug_port_info(oinfo);
|
||||
spa_debug_port_info(iinfo);
|
||||
spa_debug_port_info(2, oinfo);
|
||||
spa_debug_port_info(2, iinfo);
|
||||
}
|
||||
if (output->allocation.n_buffers) {
|
||||
out_flags = SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS;
|
||||
|
|
@ -652,7 +653,7 @@ static int do_allocation(struct pw_link *this, uint32_t in_state, uint32_t out_s
|
|||
spa_pod_fixate(params[i]);
|
||||
pw_log_debug("fixated param %d:", i);
|
||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
||||
spa_debug_pod(params[i], 0);
|
||||
spa_debug_pod(2, this->core->type.map, params[i]);
|
||||
offset += SPA_ROUND_UP_N(SPA_POD_SIZE(params[i]), 8);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,9 +61,11 @@ pw_log_logv(enum spa_log_level level,
|
|||
/** Check if a loglevel is enabled \memberof pw_log */
|
||||
#define pw_log_level_enabled(lev) (pw_log_level >= (lev))
|
||||
|
||||
#define pw_log(lev,...) \
|
||||
if (SPA_UNLIKELY(pw_log_level_enabled (lev))) \
|
||||
pw_log_log(lev,__FILE__,__LINE__,__func__,__VA_ARGS__)
|
||||
#define pw_log(lev,...) \
|
||||
({ \
|
||||
if (SPA_UNLIKELY(pw_log_level_enabled (lev))) \
|
||||
pw_log_log(lev,__FILE__,__LINE__,__func__,__VA_ARGS__); \
|
||||
})
|
||||
|
||||
#define pw_log_error(...) pw_log(SPA_LOG_LEVEL_ERROR,__VA_ARGS__)
|
||||
#define pw_log_warn(...) pw_log(SPA_LOG_LEVEL_WARN,__VA_ARGS__)
|
||||
|
|
|
|||
|
|
@ -79,12 +79,11 @@ libpipewire = shared_library('pipewire-@0@'.format(apiversion), pipewire_sources
|
|||
soversion : soversion,
|
||||
c_args : libpipewire_c_args,
|
||||
include_directories : [pipewire_inc, configinc, spa_inc],
|
||||
link_with : spalib,
|
||||
install : true,
|
||||
dependencies : [dl_lib, mathlib, pthread_lib],
|
||||
)
|
||||
|
||||
pipewire_dep = declare_dependency(link_with : libpipewire,
|
||||
include_directories : [pipewire_inc, configinc, spa_inc],
|
||||
dependencies : [pthread_lib,spalib_dep],
|
||||
dependencies : [pthread_lib],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@
|
|||
#include "pipewire/main-loop.h"
|
||||
#include "pipewire/work-queue.h"
|
||||
|
||||
#ifndef spa_debug
|
||||
#define spa_debug pw_log_trace
|
||||
#endif
|
||||
|
||||
#include <spa/graph/graph-scheduler2.h>
|
||||
|
||||
/** \cond */
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ extern "C" {
|
|||
#include <sys/socket.h>
|
||||
#include <sys/types.h> /* for pthread_t */
|
||||
|
||||
|
||||
#include "pipewire/mem.h"
|
||||
#include "pipewire/pipewire.h"
|
||||
#include "pipewire/introspect.h"
|
||||
#include "pipewire/log.h"
|
||||
|
||||
#ifndef spa_debug
|
||||
#define spa_debug pw_log_trace
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include <spa/node/io.h>
|
||||
#include <spa/utils/ringbuffer.h>
|
||||
#include <spa/pod/filter.h>
|
||||
#include <spa/lib/debug.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#include "pipewire/pipewire.h"
|
||||
#include "pipewire/stream.h"
|
||||
|
|
@ -446,7 +446,7 @@ static int port_set_format(struct spa_node *node,
|
|||
|
||||
pw_log_debug("stream %p: format changed:", impl);
|
||||
if (pw_log_level >= SPA_LOG_LEVEL_DEBUG)
|
||||
spa_debug_pod(format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(2, t->map, format);
|
||||
|
||||
clear_params(stream, PARAM_TYPE_FORMAT);
|
||||
if (spa_pod_is_object_type(format, t->spa_format)) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include <signal.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <spa/lib/debug.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <pipewire/command.h>
|
||||
|
|
@ -596,7 +596,7 @@ static void info_link(struct proxy_data *pd)
|
|||
fprintf(stdout, "%c\tinput-port-id: %u\n", MARK_CHANGE(1), info->input_port_id);
|
||||
fprintf(stdout, "%c\tformat:\n", MARK_CHANGE(2));
|
||||
if (info->format)
|
||||
spa_debug_pod(info->format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(2, pd->rd->data->t->map, info->format);
|
||||
else
|
||||
fprintf(stdout, "\t\tnone\n");
|
||||
print_properties(info->props, MARK_CHANGE(3), true);
|
||||
|
|
@ -666,14 +666,14 @@ static void node_event_param(void *object, uint32_t id, uint32_t index, uint32_t
|
|||
struct proxy_data *data = object;
|
||||
struct remote_data *rd = data->rd;
|
||||
struct pw_type *t = rd->data->t;
|
||||
uint32_t flags = 0;
|
||||
|
||||
fprintf(stdout, "remote %d node %d param %d index %d\n",
|
||||
rd->id, data->global->id, id, index);
|
||||
|
||||
if (spa_pod_is_object_type(param, t->spa_format))
|
||||
flags |= SPA_DEBUG_FLAG_FORMAT;
|
||||
spa_debug_pod(param, flags);
|
||||
spa_debug_format(2, t->map, param);
|
||||
else
|
||||
spa_debug_pod(2, t->map, param);
|
||||
}
|
||||
|
||||
static const struct pw_node_proxy_events node_events = {
|
||||
|
|
@ -704,14 +704,14 @@ static void port_event_param(void *object, uint32_t id, uint32_t index, uint32_t
|
|||
struct proxy_data *data = object;
|
||||
struct remote_data *rd = data->rd;
|
||||
struct pw_type *t = rd->data->t;
|
||||
uint32_t flags = 0;
|
||||
|
||||
fprintf(stdout, "remote %d port %d param %d index %d\n",
|
||||
rd->id, data->global->id, id, index);
|
||||
|
||||
if (spa_pod_is_object_type(param, t->spa_format))
|
||||
flags |= SPA_DEBUG_FLAG_FORMAT;
|
||||
spa_debug_pod(param, flags);
|
||||
spa_debug_format(2, t->map, param);
|
||||
else
|
||||
spa_debug_pod(2, t->map, param);
|
||||
}
|
||||
|
||||
static const struct pw_port_proxy_events port_events = {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <spa/lib/debug.h>
|
||||
#include <spa/debug/format.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <pipewire/interfaces.h>
|
||||
|
|
@ -216,10 +216,10 @@ static void print_node(struct proxy_data *data)
|
|||
printf("%c\tname: \"%s\"\n", MARK_CHANGE(0), info->name);
|
||||
printf("%c\tparams:\n", MARK_CHANGE(5));
|
||||
for (i = 0; i < data->n_params; i++) {
|
||||
uint32_t flags = 0;
|
||||
if (spa_pod_is_object_type(data->params[i], t->spa_format))
|
||||
flags |= SPA_DEBUG_FLAG_FORMAT;
|
||||
spa_debug_pod(data->params[i], flags);
|
||||
spa_debug_format(2, t->map, data->params[i]);
|
||||
else
|
||||
spa_debug_pod(2, t->map, data->params[i]);
|
||||
}
|
||||
printf("%c\tinput ports: %u/%u\n", MARK_CHANGE(1),
|
||||
info->n_input_ports, info->max_input_ports);
|
||||
|
|
@ -293,10 +293,10 @@ static void print_port(struct proxy_data *data)
|
|||
printf("%c\tname: \"%s\"\n", MARK_CHANGE(0), info->name);
|
||||
printf("%c\tparams:\n", MARK_CHANGE(2));
|
||||
for (i = 0; i < data->n_params; i++) {
|
||||
uint32_t flags = 0;
|
||||
if (spa_pod_is_object_type(data->params[i], t->spa_format))
|
||||
flags |= SPA_DEBUG_FLAG_FORMAT;
|
||||
spa_debug_pod(data->params[i], flags);
|
||||
spa_debug_format(2, t->map, data->params[i]);
|
||||
else
|
||||
spa_debug_pod(2, t->map, data->params[i]);
|
||||
}
|
||||
print_properties(info->props, MARK_CHANGE(1));
|
||||
}
|
||||
|
|
@ -404,6 +404,7 @@ static const struct pw_client_proxy_events client_events = {
|
|||
static void link_event_info(void *object, struct pw_link_info *info)
|
||||
{
|
||||
struct proxy_data *data = object;
|
||||
struct pw_type *t = pw_core_get_type(data->data->core);
|
||||
bool print_all, print_mark;
|
||||
|
||||
print_all = true;
|
||||
|
|
@ -431,7 +432,7 @@ static void link_event_info(void *object, struct pw_link_info *info)
|
|||
printf("%c\tinput-port-id: %u\n", MARK_CHANGE(1), info->input_port_id);
|
||||
printf("%c\tformat:\n", MARK_CHANGE(2));
|
||||
if (info->format)
|
||||
spa_debug_pod(info->format, SPA_DEBUG_FLAG_FORMAT);
|
||||
spa_debug_format(2, t->map, info->format);
|
||||
else
|
||||
printf("\t\tnone\n");
|
||||
print_properties(info->props, MARK_CHANGE(3));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue