mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
stream: add support for PropsInfo
So that streams and filter can describe custom properties.
This commit is contained in:
parent
0db8d39dd8
commit
dfdca3ce29
2 changed files with 13 additions and 5 deletions
|
|
@ -147,9 +147,10 @@ struct filter {
|
|||
uint32_t change_mask_all;
|
||||
struct spa_node_info info;
|
||||
struct spa_list param_list;
|
||||
#define IDX_Props 0
|
||||
#define IDX_ProcessLatency 1
|
||||
#define N_NODE_PARAMS 2
|
||||
#define IDX_PropInfo 0
|
||||
#define IDX_Props 1
|
||||
#define IDX_ProcessLatency 2
|
||||
#define N_NODE_PARAMS 3
|
||||
struct spa_param_info params[N_NODE_PARAMS];
|
||||
|
||||
struct spa_process_latency_info process_latency;
|
||||
|
|
@ -174,6 +175,8 @@ struct filter {
|
|||
static int get_param_index(uint32_t id)
|
||||
{
|
||||
switch (id) {
|
||||
case SPA_PARAM_PropInfo:
|
||||
return IDX_PropInfo;
|
||||
case SPA_PARAM_Props:
|
||||
return IDX_Props;
|
||||
case SPA_PARAM_ProcessLatency:
|
||||
|
|
@ -1495,6 +1498,7 @@ pw_filter_connect(struct pw_filter *filter,
|
|||
impl->info.max_output_ports = UINT32_MAX;
|
||||
impl->info.flags = impl->process_rt ? SPA_NODE_FLAG_RT : 0;
|
||||
impl->info.props = &filter->properties->dict;
|
||||
impl->params[IDX_PropInfo] = SPA_PARAM_INFO(SPA_PARAM_PropInfo, 0);
|
||||
impl->params[IDX_Props] = SPA_PARAM_INFO(SPA_PARAM_Props, SPA_PARAM_INFO_WRITE);
|
||||
impl->params[IDX_ProcessLatency] = SPA_PARAM_INFO(SPA_PARAM_ProcessLatency, 0);
|
||||
impl->info.params = impl->params;
|
||||
|
|
|
|||
|
|
@ -136,8 +136,9 @@ struct stream {
|
|||
|
||||
uint32_t change_mask_all;
|
||||
struct spa_node_info info;
|
||||
#define IDX_Props 0
|
||||
#define N_NODE_PARAMS 1
|
||||
#define IDX_PropInfo 0
|
||||
#define IDX_Props 1
|
||||
#define N_NODE_PARAMS 2
|
||||
struct spa_param_info params[N_NODE_PARAMS];
|
||||
|
||||
uint32_t media_type;
|
||||
|
|
@ -174,6 +175,8 @@ struct stream {
|
|||
static int get_param_index(uint32_t id)
|
||||
{
|
||||
switch (id) {
|
||||
case SPA_PARAM_PropInfo:
|
||||
return IDX_PropInfo;
|
||||
case SPA_PARAM_Props:
|
||||
return IDX_Props;
|
||||
default:
|
||||
|
|
@ -1726,6 +1729,7 @@ pw_stream_connect(struct pw_stream *stream,
|
|||
if (!impl->process_rt)
|
||||
impl->info.flags |= SPA_NODE_FLAG_ASYNC;
|
||||
impl->info.props = &stream->properties->dict;
|
||||
impl->params[IDX_PropInfo] = SPA_PARAM_INFO(SPA_PARAM_PropInfo, 0);
|
||||
impl->params[IDX_Props] = SPA_PARAM_INFO(SPA_PARAM_Props, SPA_PARAM_INFO_WRITE);
|
||||
impl->info.params = impl->params;
|
||||
impl->info.n_params = N_NODE_PARAMS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue