mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
module-zeroconf: translate audio format
The audio format in the avahi messages is in pulseaudio format so translate it to PipeWire format in audio.format. See #1745
This commit is contained in:
parent
84ecebbd4e
commit
73bf30efa6
1 changed files with 3 additions and 1 deletions
|
|
@ -218,7 +218,9 @@ static void pw_properties_from_avahi_string(const char *key, const char *value,
|
|||
pw_properties_set(props, SPA_KEY_AUDIO_POSITION, s);
|
||||
}
|
||||
else if (spa_streq(key, "format")) {
|
||||
pw_properties_set(props, PW_KEY_AUDIO_FORMAT, value);
|
||||
uint32_t fmt = format_paname2id(value, strlen(value));
|
||||
if (fmt != SPA_AUDIO_FORMAT_UNKNOWN)
|
||||
pw_properties_set(props, PW_KEY_AUDIO_FORMAT, format_id2name(fmt));
|
||||
}
|
||||
else if (spa_streq(key, "icon-name")) {
|
||||
pw_properties_set(props, PW_KEY_DEVICE_ICON_NAME, value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue