mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
pulse-server: use pulse.fix.* keys
Use a different key than the usual one to select an audio format when we are fixating a stream format to avoid confusion. So pulse.fix.rate, pulse.fix.format, pulse.fix.channels are now used to force a specific format when the stream has the FIX_ stream flags.
This commit is contained in:
parent
15e4b3d500
commit
4163991a97
1 changed files with 6 additions and 6 deletions
|
|
@ -1699,19 +1699,19 @@ static int do_create_playback_stream(struct client *client, uint32_t command, ui
|
|||
rate = ss.rate;
|
||||
|
||||
if (fix_format) {
|
||||
if ((str = pw_properties_get(props, SPA_KEY_AUDIO_FORMAT)) != NULL)
|
||||
if ((str = pw_properties_get(props, "pulse.fix.format")) != NULL)
|
||||
sfix.format = format_name2id(str);
|
||||
else
|
||||
sfix.format = SPA_AUDIO_FORMAT_UNKNOWN;
|
||||
}
|
||||
if (fix_rate) {
|
||||
if ((str = pw_properties_get(props, SPA_KEY_AUDIO_RATE)) != NULL)
|
||||
if ((str = pw_properties_get(props, "pulse.fix.rate")) != NULL)
|
||||
sfix.rate = atoi(str);
|
||||
else
|
||||
sfix.rate = 0;
|
||||
}
|
||||
if (fix_channels) {
|
||||
if ((str = pw_properties_get(props, SPA_KEY_AUDIO_CHANNELS)) != NULL)
|
||||
if ((str = pw_properties_get(props, "pulse.fix.channels")) != NULL)
|
||||
sfix.channels = atoi(str);
|
||||
else
|
||||
sfix.channels = 0;
|
||||
|
|
@ -1962,19 +1962,19 @@ static int do_create_record_stream(struct client *client, uint32_t command, uint
|
|||
rate = ss.rate;
|
||||
|
||||
if (fix_format) {
|
||||
if ((str = pw_properties_get(props, SPA_KEY_AUDIO_FORMAT)) != NULL)
|
||||
if ((str = pw_properties_get(props, "pulse.fix.format")) != NULL)
|
||||
sfix.format = format_name2id(str);
|
||||
else
|
||||
sfix.format = SPA_AUDIO_FORMAT_UNKNOWN;
|
||||
}
|
||||
if (fix_rate) {
|
||||
if ((str = pw_properties_get(props, SPA_KEY_AUDIO_RATE)) != NULL)
|
||||
if ((str = pw_properties_get(props, "pulse.fix.rate")) != NULL)
|
||||
sfix.rate = atoi(str);
|
||||
else
|
||||
sfix.rate = 0;
|
||||
}
|
||||
if (fix_channels) {
|
||||
if ((str = pw_properties_get(props, SPA_KEY_AUDIO_CHANNELS)) != NULL)
|
||||
if ((str = pw_properties_get(props, "pulse.fix.channels")) != NULL)
|
||||
sfix.channels = atoi(str);
|
||||
else
|
||||
sfix.channels = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue