mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: improve module args compatibility
Boolean switches can also be true with 'y', 'yes', 't' and 'on'
This commit is contained in:
parent
310e6009ca
commit
c8f629a0a3
6 changed files with 14 additions and 5 deletions
|
|
@ -227,6 +227,14 @@ int module_args_to_audioinfo(struct impl *impl, struct pw_properties *props, str
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool module_args_parse_bool(const char *v)
|
||||
{
|
||||
if (spa_streq(v, "1") || !strcasecmp(v, "y") || !strcasecmp(v, "t") ||
|
||||
!strcasecmp(v, "yes") || !strcasecmp(v, "true") || !strcasecmp(v, "on"))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
#include "modules/registry.h"
|
||||
|
||||
static const struct module_info module_list[] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue