diff --git a/spa/include/spa/port.h b/spa/include/spa/port.h index c6f896a1f..a78969d4a 100644 --- a/spa/include/spa/port.h +++ b/spa/include/spa/port.h @@ -28,6 +28,7 @@ typedef struct _SpaAllocParam SpaAllocParam; #include #include +#include #define SPA_ALLOC_PARAM_URI "http://spaplug.in/ns/alloc-param" #define SPA_ALLOC_PARAM_PREFIX SPA_ALLOC_PARAM_URI "#" @@ -110,7 +111,7 @@ typedef enum { * @latency: latency on this port in nanoseconds * @params: extra allocation parameters * @n_params: number of elements in @params; - * @features: NULL terminated array of extra port features + * @extra: a dictionary of extra port info * */ typedef struct { @@ -119,7 +120,7 @@ typedef struct { uint64_t latency; SpaAllocParam **params; unsigned int n_params; - const char **features; + SpaDict *extra; } SpaPortInfo; diff --git a/spa/include/spa/props.h b/spa/include/spa/props.h index 71be620dd..5b4622fbc 100644 --- a/spa/include/spa/props.h +++ b/spa/include/spa/props.h @@ -136,7 +136,7 @@ typedef struct { * @range_type: type of the range values * @n_range_values: number of elements in @range_values * @range_values: array of possible values - * @info: extra info + * @extra: extra info */ typedef struct { uint32_t id; @@ -148,7 +148,7 @@ typedef struct { SpaPropRangeType range_type; unsigned int n_range_values; const SpaPropRangeInfo *range_values; - SpaDict *info; + SpaDict *extra; } SpaPropInfo; /** diff --git a/spa/lib/debug.c b/spa/lib/debug.c index 2cad5ac31..dc5b10d99 100644 --- a/spa/lib/debug.c +++ b/spa/lib/debug.c @@ -432,9 +432,9 @@ spa_debug_props (const SpaProps *props, bool print_ranges) fprintf (stderr, "\t: %-12s\n", rinfo->name); } } - if (info->info) { - fprintf (stderr, "Info: \n"); - spa_debug_dict (info->info); + if (info->extra) { + fprintf (stderr, "Extra info: \n"); + spa_debug_dict (info->extra); } } return SPA_RESULT_OK; diff --git a/spa/lib/port.c b/spa/lib/port.c index 2687c5d18..a1d0a0273 100644 --- a/spa/lib/port.c +++ b/spa/lib/port.c @@ -62,7 +62,7 @@ spa_port_info_serialize (void *p, const SpaPortInfo *info) pi->params = SPA_INT_TO_PTR (SPA_PTRDIFF (ap, pi)); else pi->params = 0; - pi->features = 0; + pi->extra = 0; p = SPA_MEMBER (ap, sizeof (SpaAllocParam*) * info->n_params, void); diff --git a/spa/plugins/alsa/alsa-sink.c b/spa/plugins/alsa/alsa-sink.c index 9daf3585c..0e22b6943 100644 --- a/spa/plugins/alsa/alsa-sink.c +++ b/spa/plugins/alsa/alsa-sink.c @@ -341,7 +341,7 @@ spa_alsa_sink_node_port_set_format (SpaNode *node, this->param_buffers.min_buffers = 1; this->param_buffers.max_buffers = 8; this->param_buffers.align = 16; - this->info.features = NULL; + this->info.extra = NULL; this->have_format = true; update_state (this, SPA_NODE_STATE_READY); diff --git a/spa/plugins/alsa/alsa-source.c b/spa/plugins/alsa/alsa-source.c index 418aada09..a9e1d80e2 100644 --- a/spa/plugins/alsa/alsa-source.c +++ b/spa/plugins/alsa/alsa-source.c @@ -375,7 +375,7 @@ spa_alsa_source_node_port_set_format (SpaNode *node, this->param_meta.param.type = SPA_ALLOC_PARAM_TYPE_META_ENABLE; this->param_meta.param.size = sizeof (this->param_meta); this->param_meta.type = SPA_META_TYPE_HEADER; - this->info.features = NULL; + this->info.extra = NULL; this->have_format = true; diff --git a/spa/plugins/audiotestsrc/audiotestsrc.c b/spa/plugins/audiotestsrc/audiotestsrc.c index d43fa9ee3..047d6cb87 100644 --- a/spa/plugins/audiotestsrc/audiotestsrc.c +++ b/spa/plugins/audiotestsrc/audiotestsrc.c @@ -583,7 +583,7 @@ spa_audiotestsrc_node_port_set_format (SpaNode *node, this->param_meta.param.type = SPA_ALLOC_PARAM_TYPE_META_ENABLE; this->param_meta.param.size = sizeof (this->param_meta); this->param_meta.type = SPA_META_TYPE_HEADER; - this->info.features = NULL; + this->info.extra = NULL; update_state (this, SPA_NODE_STATE_READY); } else diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c index c9d251a81..722c3c3f1 100644 --- a/spa/plugins/v4l2/v4l2-utils.c +++ b/spa/plugins/v4l2/v4l2-utils.c @@ -816,7 +816,7 @@ spa_v4l2_set_format (SpaV4l2Source *this, V4l2Format *f, bool try_only) state->param_meta.param.size = sizeof (state->param_meta); state->param_meta.type = SPA_META_TYPE_HEADER; - state->info.features = NULL; + state->info.extra = NULL; return 0; } diff --git a/spa/plugins/videotestsrc/videotestsrc.c b/spa/plugins/videotestsrc/videotestsrc.c index 4583568f1..5eb6afb65 100644 --- a/spa/plugins/videotestsrc/videotestsrc.c +++ b/spa/plugins/videotestsrc/videotestsrc.c @@ -532,7 +532,7 @@ spa_videotestsrc_node_port_set_format (SpaNode *node, this->param_meta.param.type = SPA_ALLOC_PARAM_TYPE_META_ENABLE; this->param_meta.param.size = sizeof (this->param_meta); this->param_meta.type = SPA_META_TYPE_HEADER; - this->info.features = NULL; + this->info.extra = NULL; update_state (this, SPA_NODE_STATE_READY); } else