Commit graph

10 commits

Author SHA1 Message Date
Pauli Virtanen
c66bb65c7a pipewire: don't setlocale from pw_init, let parent app set it
Library code generally shouldn't modify global state, so pw_init()
should not result to changing the C locale.

Instead, set the C locale in main() for tools and daemons.

We'll still setlocale for LC_MESSAGES, to get translated UI elements in
wireplumber. This workaround should be removed eventually...
2022-03-22 21:32:35 +02:00
Peter Hutterer
40487e485d daemon: only call pw_log_set_level() if -v is actually given
Previous commit 69e935e unconditionally called pw_log_set_level() after
the option parsing. If pw_init() changed the logging level based on
PIPEWIRE_DEBUG, we'd now overwrite that change.

Call pw_log_set_level() only if -v is actually given on the commandline.
This means a commandline option will override PIPEWIRE_DEBUG if set but
that is intended.

Fixes 69e935e8a4
2021-09-25 07:21:01 +10:00
Peter Hutterer
69e935e8a4 daemon: allow for a -v, -vv, -vvv argument to increase verbosity
Sometimes that's faster than having to play with PIPEWIRE_DEBUG.
Same for pipewire-media-session.
2021-09-24 10:49:42 +00:00
Wim Taymans
c12bdb8c6c pipewire: cleanup on error
To make leak checks more accurate.
2021-06-09 09:41:50 +02:00
Wim Taymans
db245fd0ce 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
2021-06-08 16:56:22 +02:00
Peter Hutterer
2e6621fae0 daemon: use getenv(PIPEWIRE_CORE) for the core.name if it exists
As documented in pipewire/keys.h, PIPEWIRE_CORE is supposed to overwrite the
default value.
2021-06-04 08:58:18 +00:00
Wim Taymans
aea55f662a i18n: move to separate .h file
So that we can include it where needed and don't cause redefined _()
macros for other projects.

Fixes #1120
2021-04-30 09:57:30 +02:00
Wim Taymans
036c54b043 Add i18n support for some more user-visible strings 2021-04-15 17:56:40 +02:00
Gleb Popov
03ea1a2177 Add a necessary include.
The `basename` function is defined in <libgen.h> and on FreeBSD this header
doesn't get transitively included, which causes a runtime crash.
2021-03-20 09:11:48 +00:00
Wim Taymans
cab87b6d3e pipewire: make pipewire a generic launcher
It uses the basename as the config file so you can symlink to it
and make new custom servers.
2021-02-25 13:35:04 +01:00
Renamed from src/daemon/main.c (Browse further)