mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
context: override the CORE_NAME in context
Override the CORE_NAME using the env variable in the context instead of pipewire.c. This avoids needing the _add_string() property method. Remove the properties_add_string() method, there are new improved plans for property parsing and merging: See #207
This commit is contained in:
parent
f3a98debec
commit
db245fd0ce
4 changed files with 17 additions and 42 deletions
|
|
@ -65,7 +65,6 @@ int main(int argc, char *argv[])
|
|||
int c;
|
||||
char path[PATH_MAX];
|
||||
const char *config_name;
|
||||
const char *core_name;
|
||||
|
||||
if (setenv("PIPEWIRE_INTERNAL", "1", 1) < 0)
|
||||
fprintf(stderr, "can't set PIPEWIRE_INTERNAL env: %m");
|
||||
|
|
@ -100,11 +99,6 @@ int main(int argc, char *argv[])
|
|||
PW_KEY_CONFIG_NAME, config_name,
|
||||
NULL);
|
||||
|
||||
if ((core_name = getenv("PIPEWIRE_CORE"))) {
|
||||
pw_log_info("using core.name from environment: %s", core_name);
|
||||
pw_properties_set(properties, PW_KEY_CORE_NAME, core_name);
|
||||
}
|
||||
|
||||
loop = pw_main_loop_new(&properties->dict);
|
||||
if (loop == NULL) {
|
||||
pw_log_error("failed to create main-loop: %m");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue