audioadapter: dynamically load the audio converter

So that we can plug in other implementations. Also handle the cases
where we can't load a converter.
This commit is contained in:
Wim Taymans 2024-09-06 17:30:58 +02:00
parent b4c8627a62
commit 4d2cdd6da3
2 changed files with 86 additions and 26 deletions

View file

@ -1994,12 +1994,12 @@ impl_init(const struct spa_handle_factory *factory,
if (strcmp(this->convertname, "video.convert.dummy") == 0) {
configure_convert(this, SPA_PARAM_PORT_CONFIG_MODE_none);
reconfigure_mode(this, true, this->direction, NULL);
reconfigure_mode(this, SPA_PARAM_PORT_CONFIG_MODE_passthrough, this->direction, NULL);
} else {
configure_convert(this, SPA_PARAM_PORT_CONFIG_MODE_convert);
}
} else {
reconfigure_mode(this, true, this->direction, NULL);
reconfigure_mode(this, SPA_PARAM_PORT_CONFIG_MODE_passthrough, this->direction, NULL);
}
link_io(this);