internal/pipewire: constant for PIPEWIRE_REMOTE

This is not defined anywhere in upstream PipeWire, no idea why.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-12-07 23:35:29 +09:00
parent 1931b54600
commit bf856f06e5

View File

@@ -783,6 +783,9 @@ func (ctx *Context) Close() (err error) {
}
}
// Remote is the environment (sic) with the remote name.
const Remote = "PIPEWIRE_REMOTE"
/* modules/module-protocol-native/local-socket.c */
const DEFAULT_SYSTEM_RUNTIME_DIR = "/run/pipewire"
@@ -821,7 +824,7 @@ func ConnectName(name string, manager bool) (ctx *Context, err error) {
}
if name == "" {
if v, ok := os.LookupEnv("PIPEWIRE_REMOTE"); !ok || v == "" {
if v, ok := os.LookupEnv(Remote); !ok || v == "" {
name = PW_DEFAULT_REMOTE
} else {
name = v