mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-tunnel: use format, channels and rate props
This commit is contained in:
parent
466715672e
commit
28c2e8ca56
3 changed files with 38 additions and 10 deletions
|
|
@ -204,6 +204,15 @@ struct module *create_module_tunnel_sink(struct impl *impl, const char *argument
|
|||
}
|
||||
|
||||
audio_info_to_props(&info, stream_props);
|
||||
if ((str = pw_properties_get(props, "format")) != NULL) {
|
||||
uint32_t id = format_paname2id(str, strlen(str));
|
||||
if (id == SPA_AUDIO_FORMAT_UNKNOWN) {
|
||||
res = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
pw_properties_set(stream_props, PW_KEY_AUDIO_FORMAT, format_id2name(id));
|
||||
}
|
||||
|
||||
module = module_new(impl, &module_tunnel_sink_methods, sizeof(*d));
|
||||
if (module == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue