mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
pulse-server: filter out iec958 PCM formats
Convert the iec958 PCM formats differently when enumerating the sink formats. This way we can still convert the param to a format_info.
This commit is contained in:
parent
93e9efc1e4
commit
a25396c1eb
2 changed files with 6 additions and 2 deletions
|
|
@ -389,7 +389,7 @@ struct encoding_info {
|
|||
|
||||
static const struct encoding_info encoding_names[] = {
|
||||
[ENCODING_ANY] = { "ANY", 0 },
|
||||
[ENCODING_PCM] = { "PCM", 0 },
|
||||
[ENCODING_PCM] = { "PCM", SPA_AUDIO_IEC958_CODEC_PCM },
|
||||
[ENCODING_AC3_IEC61937] = { "AC3-IEC61937", SPA_AUDIO_IEC958_CODEC_AC3 },
|
||||
[ENCODING_EAC3_IEC61937] = { "EAC3-IEC61937", SPA_AUDIO_IEC958_CODEC_EAC3 },
|
||||
[ENCODING_MPEG_IEC61937] = { "MPEG-IEC61937", SPA_AUDIO_IEC958_CODEC_MPEG },
|
||||
|
|
|
|||
|
|
@ -3578,8 +3578,11 @@ static int fill_sink_info(struct client *client, struct message *m,
|
|||
spa_zero(info[n_info]);
|
||||
if (format_info_from_param(&info[n_info], p->param, index++) < 0)
|
||||
break;
|
||||
if (info[n_info].encoding == ENCODING_ANY)
|
||||
if (info[n_info].encoding == ENCODING_ANY ||
|
||||
(info[n_info].encoding == ENCODING_PCM && info[n_info].props != NULL)) {
|
||||
format_info_clear(&info[n_info]);
|
||||
continue;
|
||||
}
|
||||
n_info++;
|
||||
}
|
||||
}
|
||||
|
|
@ -3590,6 +3593,7 @@ static int fill_sink_info(struct client *client, struct message *m,
|
|||
message_put(m,
|
||||
TAG_FORMAT_INFO, &info[i],
|
||||
TAG_INVALID);
|
||||
format_info_clear(&info[i]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue