remove spalib

This commit is contained in:
Wim Taymans 2018-08-14 12:33:53 +02:00
parent f532fd8681
commit a6ad8f747f
69 changed files with 612 additions and 1250 deletions

View file

@ -1,77 +1,62 @@
executable('test-mixer', 'test-mixer.c',
include_directories : [spa_inc ],
dependencies : [dl_lib, pthread_lib, mathlib],
link_with : spalib,
install : false)
executable('test-convert', 'test-convert.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [dl_lib, pthread_lib, mathlib],
link_with : spalib,
install : false)
executable('test-convert2', 'test-convert2.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [dl_lib, pthread_lib, mathlib],
link_with : spalib,
install : false)
executable('test-bluez5', 'test-bluez5.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [dl_lib, pthread_lib, mathlib, dbus_dep],
link_with : spalib,
install : false)
executable('test-ringbuffer', 'test-ringbuffer.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [dl_lib, pthread_lib],
link_with : spalib,
install : false)
executable('test-graph', 'test-graph.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [dl_lib, pthread_lib],
link_with : spalib,
install : false)
executable('test-graph2', 'test-graph2.c',
include_directories : [spa_inc ],
dependencies : [dl_lib, pthread_lib],
link_with : spalib,
install : false)
executable('test-perf', 'test-perf.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [dl_lib, pthread_lib],
link_with : spalib,
install : false)
executable('stress-ringbuffer', 'stress-ringbuffer.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [dl_lib, pthread_lib],
link_with : spalib,
install : false)
if sdl_dep.found()
executable('test-v4l2', 'test-v4l2.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [dl_lib, sdl_dep, pthread_lib],
link_with : spalib,
install : false)
endif
executable('test-props', 'test-props.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [],
link_with : spalib,
install : false)
executable('test-props2', 'test-props2.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [],
link_with : spalib,
install : false)
#executable('test-props4', 'test-props4.c',
# include_directories : [spa_inc, spa_libinc ],
# include_directories : [spa_inc ],
# dependencies : [],
# link_with : spalib,
# install : false)
executable('test-props5', 'test-props5.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [],
link_with : spalib,
install : false)
executable('test-control', 'test-control.c',
include_directories : [spa_inc, spa_libinc ],
include_directories : [spa_inc ],
dependencies : [dl_lib, pthread_lib, mathlib],
link_with : spalib,
install : false)

View file

@ -50,7 +50,7 @@ static struct spa_log *logger;
#include <spa/graph/graph.h>
#include <spa/graph/graph-scheduler2.h>
#include <lib/debug.h>
#include <spa/debug/pod.h>
struct type {
uint32_t log;
@ -134,7 +134,7 @@ struct data {
static void inspect_item(struct data *data, struct spa_pod *item)
{
spa_debug_pod(item, 0);
spa_debug_pod(0, data->map, item);
}
static void monitor_event(void *_data, struct spa_event *event)
@ -223,7 +223,6 @@ int main(int argc, char *argv[])
data.support[0].data = data.map;
data.n_support = 1;
init_type(&data.type, data.map);
spa_debug_set_type_map(data.map);
if ((res = get_handle(&data, &handle,
"build/spa/plugins/support/libspa-support.so",

View file

@ -49,7 +49,7 @@ static SPA_LOG_IMPL(default_log);
#include <spa/graph/graph.h>
#include <spa/graph/graph-scheduler2.h>
#include <lib/debug.h>
#include <spa/debug/pod.h>
struct type {
uint32_t node;
@ -329,7 +329,7 @@ static int make_nodes(struct data *data, const char *device)
":", data->type.props_device, "s", device ? device : "hw:0",
":", data->type.props_min_latency, "i", MIN_LATENCY);
spa_debug_pod(props, 0);
spa_debug_pod(0, data->map, props);
if ((res = spa_node_set_param(data->sink, data->type.param.idProps, 0, props)) < 0)
printf("got set_props error %d\n", res);
@ -434,7 +434,7 @@ static int negotiate_formats(struct data *data)
":", data->type.format_audio.rate, "i", 44100,
":", data->type.format_audio.channels, "i", 2);
spa_debug_pod(filter, 0);
spa_debug_pod(0, data->map, filter);
spa_log_debug(&default_log.log, "enum_params");
if ((res = spa_node_port_enum_params(data->sink,
@ -443,7 +443,7 @@ static int negotiate_formats(struct data *data)
filter, &format, &b)) <= 0)
return -EBADF;
spa_debug_pod(format, 0);
spa_debug_pod(0, data->map, format);
spa_log_debug(&default_log.log, "sink set_param");
if ((res = spa_node_port_set_param(data->sink,
@ -577,8 +577,6 @@ int main(int argc, char *argv[])
data.data_loop.remove_source = do_remove_source;
data.data_loop.invoke = do_invoke;
spa_debug_set_type_map(data.map);
if ((str = getenv("SPA_DEBUG")))
data.log->level = atoi(str);

View file

@ -35,8 +35,8 @@
#include <spa/param/props.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/format-utils.h>
#include <lib/debug.h>
#include <spa/debug/pod.h>
#include <spa/debug/mem.h>
static SPA_TYPE_MAP_IMPL(default_map, 4096);
static SPA_LOG_IMPL(default_log);
@ -318,7 +318,7 @@ static int negotiate_buffers(struct data *data)
NULL, &param, &b)) <= 0)
return -EBADF;
spa_debug_pod(param, 0);
spa_debug_pod(0, data->map, param);
init_buffer(data, data->in_buffers, data->in_buffer, 1, BUFFER_SIZE, 1);
if ((res =
@ -335,7 +335,7 @@ static int negotiate_buffers(struct data *data)
NULL, &param, &b)) <= 0)
return -EBADF;
spa_debug_pod(param, 0);
spa_debug_pod(0, data->map, param);
init_buffer(data, data->out_buffers, data->out_buffer, 1, BUFFER_SIZE, 2);
if ((res =
@ -374,13 +374,13 @@ static void run_convert(struct data *data)
data->io_out[0].status = SPA_STATUS_NEED_BUFFER;
data->io_out[0].buffer_id = 0;
spa_debug_dump_mem(data->in_buffers[0]->datas[0].data, BUFFER_SIZE);
spa_debug_mem(0, data->in_buffers[0]->datas[0].data, BUFFER_SIZE);
res = spa_node_process(data->conv);
printf("called process %d\n", res);
spa_debug_dump_mem(data->out_buffers[0]->datas[0].data, BUFFER_SIZE);
spa_debug_dump_mem(data->out_buffers[0]->datas[1].data, BUFFER_SIZE);
spa_debug_mem(0, data->out_buffers[0]->datas[0].data, BUFFER_SIZE);
spa_debug_mem(0, data->out_buffers[0]->datas[1].data, BUFFER_SIZE);
{
struct spa_command cmd = SPA_COMMAND_INIT(data->type.command_node.Pause);
@ -408,7 +408,6 @@ int main(int argc, char *argv[])
data.n_support = 2;
init_type(&data.type, data.map);
spa_debug_set_type_map(data.map);
if ((res = make_nodes(&data, argc > 1 ? argv[1] : NULL)) < 0) {
printf("can't make nodes: %d\n", res);

View file

@ -37,8 +37,9 @@
#include <spa/param/props.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/format-utils.h>
#include <lib/debug.h>
#include <spa/debug/pod.h>
#include <spa/debug/format.h>
#include <spa/debug/mem.h>
static SPA_TYPE_MAP_IMPL(default_map, 4096);
static SPA_LOG_IMPL(default_log);
@ -273,7 +274,7 @@ static int negotiate_link_format(struct data *data, struct link *link, struct sp
}
spa_pod_fixate(filter);
spa_debug_pod(filter, SPA_DEBUG_FLAG_FORMAT);
spa_debug_format(0, data->map, filter);
if (link->out_node != NULL) {
if ((res = spa_node_port_set_param(link->out_node->node,
@ -369,7 +370,7 @@ static int negotiate_link_buffers(struct data *data, struct link *link)
}
spa_pod_fixate(param);
spa_debug_pod(param, 0);
spa_debug_pod(0, data->map, param);
if (link->in_info)
in_alloc = SPA_FLAG_CHECK(link->in_info->flags, SPA_PORT_INFO_FLAG_CAN_ALLOC_BUFFERS);
@ -497,7 +498,7 @@ static void run_convert(struct data *data)
b = data->links[0].buffers[0];
for (i = 0; i < b->n_datas; i++)
spa_debug_dump_mem(b->datas[i].data, b->datas[i].maxsize);
spa_debug_mem(0, b->datas[i].data, b->datas[i].maxsize);
for (j = 0; j < 2; j++) {
data->links[0].io.status = SPA_STATUS_HAVE_BUFFER;
@ -510,7 +511,7 @@ static void run_convert(struct data *data)
b = data->links[3].buffers[0];
for (i = 0; i < b->n_datas; i++)
spa_debug_dump_mem(b->datas[i].data, b->datas[i].maxsize);
spa_debug_mem(0, b->datas[i].data, b->datas[i].maxsize);
{
struct spa_command cmd = SPA_COMMAND_INIT(t->command_node.Pause);
@ -540,7 +541,6 @@ int main(int argc, char *argv[])
data.n_support = 2;
init_type(&data.type, data.map);
spa_debug_set_type_map(data.map);
if ((res = make_nodes(&data, argc > 1 ? argv[1] : NULL)) < 0) {
printf("can't make nodes: %d\n", res);

View file

@ -44,7 +44,7 @@ static SPA_LOG_IMPL(default_log);
#include <spa/graph/graph.h>
#include <spa/graph/graph-scheduler2.h>
#include <lib/debug.h>
#include <spa/debug/pod.h>
struct type {
uint32_t node;
@ -308,7 +308,7 @@ static int make_nodes(struct data *data, const char *device)
":", data->type.props_device, "s", device ? device : "hw:0",
":", data->type.props_min_latency, "i", MIN_LATENCY);
spa_debug_pod(props, 0);
spa_debug_pod(0, data->map, props);
if ((res = spa_node_set_param(data->sink, data->type.param.idProps, 0, props)) < 0)
printf("got set_props error %d\n", res);
@ -402,7 +402,7 @@ static int negotiate_formats(struct data *data)
":", data->type.format_audio.rate, "i", 44100,
":", data->type.format_audio.channels, "i", 2);
spa_debug_pod(filter, 0);
spa_debug_pod(0, data->map, filter);
spa_log_debug(&default_log.log, "enum_params");
if ((res = spa_node_port_enum_params(data->sink,
@ -411,7 +411,7 @@ static int negotiate_formats(struct data *data)
filter, &format, &b)) <= 0)
return -EBADF;
spa_debug_pod(format, 0);
spa_debug_pod(0, data->map, format);
spa_log_debug(&default_log.log, "sink set_param");
if ((res = spa_node_port_set_param(data->sink,
@ -569,8 +569,6 @@ int main(int argc, char *argv[])
data.data_loop.remove_source = do_remove_source;
data.data_loop.invoke = do_invoke;
spa_debug_set_type_map(data.map);
if ((str = getenv("SPA_DEBUG")))
data.log->level = atoi(str);

View file

@ -29,8 +29,8 @@
#include <spa/pod/builder.h>
#include <spa/pod/parser.h>
#include <spa/param/video/format-utils.h>
#include <lib/debug.h>
#include <spa/debug/pod.h>
#include <spa/debug/format.h>
#if 0
/* { video/raw,
@ -250,8 +250,8 @@ static void do_static_struct(struct spa_type_map *map)
}
};
spa_debug_pod(&test_format.fmt.pod, 0);
spa_debug_pod(&test_format.fmt.pod, SPA_DEBUG_FLAG_FORMAT);
spa_debug_pod(0, map, &test_format.fmt.pod);
spa_debug_format(0, map, &test_format.fmt.pod);
{
uint32_t format = -1;
@ -283,7 +283,6 @@ int main(int argc, char *argv[])
struct spa_type_map *map = &default_map.map;
type_init(map);
spa_debug_set_type_map(map);
spa_pod_builder_init(&b, buffer, sizeof(buffer));
@ -317,7 +316,7 @@ int main(int argc, char *argv[])
fmt = spa_pod_builder_pop(&b);
spa_debug_pod(&fmt->pod, 0);
spa_debug_pod(0, map, &fmt->pod);
spa_pod_builder_init(&b, buffer, sizeof(buffer));
@ -335,8 +334,8 @@ int main(int argc, char *argv[])
2, &SPA_FRACTION(0,1),
&SPA_FRACTION(INT32_MAX,1));
spa_debug_pod(&fmt->pod, 0);
spa_debug_pod(&fmt->pod, SPA_DEBUG_FLAG_FORMAT);
spa_debug_pod(0, map, &fmt->pod);
spa_debug_format(0, map, &fmt->pod);
spa_pod_builder_init(&b, buffer, sizeof(buffer));
@ -365,8 +364,8 @@ int main(int argc, char *argv[])
&SPA_FRACTION(INT32_MAX,1),
">", NULL);
spa_debug_pod(&fmt->pod, 0);
spa_debug_pod(&fmt->pod, SPA_DEBUG_FLAG_FORMAT);
spa_debug_pod(0, map, &fmt->pod);
spa_debug_format(0, map, &fmt->pod);
do_static_struct(map);

View file

@ -30,7 +30,7 @@
#include <spa/pod/parser.h>
#include <spa/param/video/format.h>
#include <lib/debug.h>
#include <spa/debug/pod.h>
static SPA_TYPE_MAP_IMPL(default_map, 4096);
@ -43,8 +43,6 @@ int main(int argc, char *argv[])
struct spa_pod_parser prs;
struct spa_type_map *map = &default_map.map;
spa_debug_set_type_map(map);
b.data = buffer;
b.size = 1024;
@ -86,11 +84,11 @@ int main(int argc, char *argv[])
spa_pod_builder_pop(&b);
obj = spa_pod_builder_pop(&b);
spa_debug_pod(obj, 0);
spa_debug_pod(0, map, obj);
struct spa_pod_prop *p = spa_pod_find_prop(obj, 4);
printf("%d %d\n", p->body.key, p->body.flags);
spa_debug_pod(&p->body.value, 0);
spa_debug_pod(0, map, &p->body.value);
obj = spa_pod_builder_deref(&b, ref);

View file

@ -26,8 +26,6 @@
#include <spa/support/log.h>
#include <spa/pod/iter.h>
#include <lib/debug.h>
#if 0
/*
( "Format",

View file

@ -24,8 +24,9 @@
#include <errno.h>
#include <spa/pod/parser.h>
#include <spa/pod/builder.h>
#include <lib/debug.h>
#include <spa/debug/pod.h>
int main(int argc, char *argv[])
{
@ -52,7 +53,7 @@ int main(int argc, char *argv[])
2, &SPA_FRACTION(0,1),
&SPA_FRACTION(INT32_MAX, 1),
">", NULL);
spa_debug_pod(fmt, 0);
spa_debug_pod(0, NULL, fmt);
spa_pod_parser_pod(&prs, fmt);
res = spa_pod_parser_get(&prs,
@ -67,7 +68,7 @@ int main(int argc, char *argv[])
printf("media-type:%d media-subtype:%d\n", media_type, media_subtype);
printf("framerate:\n");
if (pod)
spa_debug_pod(pod, 0);
spa_debug_pod(0, NULL, pod);
printf("format: %d\n", fmt_value);
spa_pod_builder_init(&b, buffer, sizeof(buffer));
@ -76,7 +77,7 @@ int main(int argc, char *argv[])
" P", NULL,
" [ i", 44, "i",45,"]"
">", NULL);
spa_debug_pod(pod, 0);
spa_debug_pod(0, NULL, pod);
spa_pod_parser_pod(&prs, pod);
res = spa_pod_parser_get(&prs,

View file

@ -36,8 +36,6 @@
#include <spa/param/audio/format-utils.h>
#include <spa/param/format-utils.h>
#include <lib/debug.h>
static SPA_TYPE_MAP_IMPL(default_map, 4096);
static SPA_LOG_IMPL(default_log);

View file

@ -39,8 +39,6 @@
#include <spa/param/video/format-utils.h>
#include <spa/param/format-utils.h>
#include <lib/debug.h>
static SPA_TYPE_MAP_IMPL(default_map, 4096);
static SPA_LOG_IMPL(default_log);