mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-17 14:33:04 -04:00
adapter: use internalFormat for EnumFormat and Format
Always place the follower EnumFormat or Format as internalFormat on the EnumPortConfig and PortConfig respectively. This ways, internalFormat always refers to the follower formats and the format is the external format after (optional) conversion by the adapter. The idea was to keep some sort of compatibility with older versions but that doesn't really apply because the format was never used on EnumPortConfig and interalFormat didn't exist.
This commit is contained in:
parent
5cf5e335eb
commit
bdf5b5a2a7
2 changed files with 6 additions and 10 deletions
|
|
@ -173,20 +173,16 @@ static int convert_enum_port_config(struct impl *this,
|
|||
{
|
||||
struct spa_pod *f1, *f2 = NULL, *format = NULL;
|
||||
struct spa_pod_frame f[1];
|
||||
uint32_t fmt_id, fmt_start = 0, pc_id;
|
||||
uint32_t fmt_id, fmt_start = 0;
|
||||
int res;
|
||||
|
||||
if (this->convert == NULL)
|
||||
return 0;
|
||||
|
||||
if (id == SPA_PARAM_EnumPortConfig) {
|
||||
if (id == SPA_PARAM_EnumPortConfig)
|
||||
fmt_id = SPA_PARAM_EnumFormat;
|
||||
pc_id = SPA_PARAM_PORT_CONFIG_format;
|
||||
}
|
||||
else {
|
||||
else
|
||||
fmt_id = SPA_PARAM_Format;
|
||||
pc_id = SPA_PARAM_PORT_CONFIG_internalFormat;
|
||||
}
|
||||
|
||||
res = spa_node_port_enum_params_sync(this->follower,
|
||||
this->direction, 0,
|
||||
|
|
@ -199,7 +195,7 @@ static int convert_enum_port_config(struct impl *this,
|
|||
0);
|
||||
if (res > 0) {
|
||||
spa_pod_builder_add(builder,
|
||||
pc_id, SPA_POD_Pod(format),
|
||||
SPA_PARAM_PORT_CONFIG_internalFormat, SPA_POD_Pod(format),
|
||||
0);
|
||||
}
|
||||
f1 = spa_pod_builder_pop(builder, &f[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue