param: add more generic port params

Remove port properties and replace them with port params. Move the
params from the PortInfo to enum_params.
Use the Param ranges to specify possible sizes etc.
This commit is contained in:
Wim Taymans 2017-05-22 13:06:18 +02:00
parent 12effccb06
commit d1a6d6e03f
37 changed files with 1044 additions and 755 deletions

View file

@ -29,20 +29,12 @@
SpaResult
spa_debug_port_info (const SpaPortInfo *info, const SpaTypeMap *map)
{
int i;
if (info == NULL)
return SPA_RESULT_INVALID_ARGUMENTS;
fprintf (stderr, "SpaPortInfo %p:\n", info);
fprintf (stderr, " flags: \t%08x\n", info->flags);
fprintf (stderr, " maxbuffering: \t%"PRIu64"\n", info->maxbuffering);
fprintf (stderr, " latency: \t%" PRIu64 "\n", info->latency);
fprintf (stderr, " n_params: \t%d\n", info->n_params);
for (i = 0; i < info->n_params; i++) {
SpaAllocParam *param = info->params[i];
spa_debug_pod (&param->pod, map);
}
return SPA_RESULT_OK;
}
@ -151,6 +143,13 @@ spa_debug_props (const SpaProps *props, const SpaTypeMap *map)
return SPA_RESULT_OK;
}
SpaResult
spa_debug_param (const SpaParam *param, const SpaTypeMap *map)
{
spa_debug_pod (&param->pod, map);
return SPA_RESULT_OK;
}
struct pod_type_name {
const char *name;
const char *CCName;

View file

@ -36,6 +36,7 @@ extern "C" {
SpaResult spa_debug_port_info (const SpaPortInfo *info, const SpaTypeMap *map);
SpaResult spa_debug_buffer (const SpaBuffer *buffer, const SpaTypeMap *map);
SpaResult spa_debug_props (const SpaProps *props, const SpaTypeMap *map);
SpaResult spa_debug_param (const SpaParam *param, const SpaTypeMap *map);
SpaResult spa_debug_pod (const SpaPOD *pod, const SpaTypeMap *map);
SpaResult spa_debug_format (const SpaFormat *format, const SpaTypeMap *map);
SpaResult spa_debug_dump_mem (const void *data, size_t size);

View file

@ -183,6 +183,7 @@ spa_props_filter (SpaPODBuilder *b,
nalt1--;
} else {
nalt1 = 1;
rt1 = SPA_POD_PROP_RANGE_NONE;
}
if (p2->body.flags & SPA_POD_PROP_FLAG_UNSET) {
@ -190,6 +191,7 @@ spa_props_filter (SpaPODBuilder *b,
nalt2--;
} else {
nalt2 = 1;
rt2 = SPA_POD_PROP_RANGE_NONE;
}
if ((rt1 == SPA_POD_PROP_RANGE_NONE && rt2 == SPA_POD_PROP_RANGE_NONE) ||