mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
core: always use explicitly configured properties first
First use the configured properties, then use the env variables. Make the daemon use the env variable by default. This makes it possible to start servers with PIPEWIRE_CORE env variable names but still override with the command option. Makes it possible to make apps connect to PIPEWIRE_REMOTE env by default and allows you to override with the command option.
This commit is contained in:
parent
bb20e0646c
commit
141238d88b
4 changed files with 23 additions and 15 deletions
|
|
@ -32,7 +32,7 @@
|
|||
#include "config.h"
|
||||
#include "daemon-config.h"
|
||||
|
||||
static const char *daemon_name = "pipewire-0";
|
||||
static const char *daemon_name = NULL;
|
||||
|
||||
static void do_quit(void *data, int signal_number)
|
||||
{
|
||||
|
|
@ -47,7 +47,7 @@ static void show_help(const char *name)
|
|||
" --version Show version\n"
|
||||
" -n, --name Daemon name (Default %s)\n",
|
||||
name,
|
||||
daemon_name);
|
||||
PW_DEFAULT_REMOTE);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
|
@ -68,6 +68,8 @@ int main(int argc, char *argv[])
|
|||
|
||||
pw_init(&argc, &argv);
|
||||
|
||||
daemon_name = getenv("PIPEWIRE_CORE");
|
||||
|
||||
while ((c = getopt_long(argc, argv, "hVn:", long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'h' :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue