mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
filter: add PARAM_Latency support
Announce the Latency param in pw-filter. Mark the latency param as writable. It becomes readable when we provide a value.
This commit is contained in:
parent
8485622923
commit
743eaf4aa2
2 changed files with 6 additions and 2 deletions
|
|
@ -105,7 +105,8 @@ struct port {
|
||||||
#define IDX_IO 2
|
#define IDX_IO 2
|
||||||
#define IDX_Format 3
|
#define IDX_Format 3
|
||||||
#define IDX_Buffers 4
|
#define IDX_Buffers 4
|
||||||
#define N_PORT_PARAMS 5
|
#define IDX_Latency 5
|
||||||
|
#define N_PORT_PARAMS 6
|
||||||
struct spa_param_info params[N_PORT_PARAMS];
|
struct spa_param_info params[N_PORT_PARAMS];
|
||||||
|
|
||||||
struct spa_io_buffers *io;
|
struct spa_io_buffers *io;
|
||||||
|
|
@ -188,6 +189,8 @@ static int get_port_param_index(uint32_t id)
|
||||||
return IDX_Format;
|
return IDX_Format;
|
||||||
case SPA_PARAM_Buffers:
|
case SPA_PARAM_Buffers:
|
||||||
return IDX_Buffers;
|
return IDX_Buffers;
|
||||||
|
case SPA_PARAM_Latency:
|
||||||
|
return IDX_Latency;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -1493,6 +1496,7 @@ void *pw_filter_add_port(struct pw_filter *filter,
|
||||||
p->params[IDX_IO] = SPA_PARAM_INFO(SPA_PARAM_IO, 0);
|
p->params[IDX_IO] = SPA_PARAM_INFO(SPA_PARAM_IO, 0);
|
||||||
p->params[IDX_Format] = SPA_PARAM_INFO(SPA_PARAM_Format, SPA_PARAM_INFO_WRITE);
|
p->params[IDX_Format] = SPA_PARAM_INFO(SPA_PARAM_Format, SPA_PARAM_INFO_WRITE);
|
||||||
p->params[IDX_Buffers] = SPA_PARAM_INFO(SPA_PARAM_Buffers, 0);
|
p->params[IDX_Buffers] = SPA_PARAM_INFO(SPA_PARAM_Buffers, 0);
|
||||||
|
p->params[IDX_Latency] = SPA_PARAM_INFO(SPA_PARAM_Buffers, SPA_PARAM_INFO_WRITE);
|
||||||
p->info.params = p->params;
|
p->info.params = p->params;
|
||||||
p->info.n_params = N_PORT_PARAMS;
|
p->info.n_params = N_PORT_PARAMS;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1657,7 +1657,7 @@ pw_stream_connect(struct pw_stream *stream,
|
||||||
impl->port_params[IDX_IO] = SPA_PARAM_INFO(SPA_PARAM_IO, 0);
|
impl->port_params[IDX_IO] = SPA_PARAM_INFO(SPA_PARAM_IO, 0);
|
||||||
impl->port_params[IDX_Format] = SPA_PARAM_INFO(SPA_PARAM_Format, SPA_PARAM_INFO_WRITE);
|
impl->port_params[IDX_Format] = SPA_PARAM_INFO(SPA_PARAM_Format, SPA_PARAM_INFO_WRITE);
|
||||||
impl->port_params[IDX_Buffers] = SPA_PARAM_INFO(SPA_PARAM_Buffers, 0);
|
impl->port_params[IDX_Buffers] = SPA_PARAM_INFO(SPA_PARAM_Buffers, 0);
|
||||||
impl->port_params[IDX_Latency] = SPA_PARAM_INFO(SPA_PARAM_Latency, 0);
|
impl->port_params[IDX_Latency] = SPA_PARAM_INFO(SPA_PARAM_Latency, SPA_PARAM_INFO_WRITE);
|
||||||
impl->port_info.props = &impl->port_props->dict;
|
impl->port_info.props = &impl->port_props->dict;
|
||||||
impl->port_info.params = impl->port_params;
|
impl->port_info.params = impl->port_params;
|
||||||
impl->port_info.n_params = N_PORT_PARAMS;
|
impl->port_info.n_params = N_PORT_PARAMS;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue