Commit graph

6111 commits

Author SHA1 Message Date
Wim Taymans b981319525 i18n: add translations
The pipewire.pot file is made with 'meson compile pipewire-pot' by
scanning the files in POTFILES.in.
The .po files were generated with 'meson compile pipewire-update-po',
on .po file per entry in LINGUAS.
The .po files were filled with:
'msgmerge -N $pulseaudio/po/$lang.po po/$lang.po -o po/$lang.po' to
get a decent set of translations for all the ACP strings.

Run 'LANGUAGE=nl make run' to start the server in a language,
test with 'LANGUAGE=nl pavucontrol'
2021-04-15 17:56:40 +02:00
Wim Taymans 036c54b043 Add i18n support for some more user-visible strings 2021-04-15 17:56:40 +02:00
Wim Taymans c90332a6bf acp: make sure all descriptions are translated 2021-04-15 17:56:40 +02:00
Wim Taymans 09106151d3 acp: use the right profile name and description 2021-04-15 17:56:40 +02:00
Wim Taymans 5f09e302a9 pipewire: add i18n initialization
Initialize the i18n support.
Add two methods to call the i18n interface.
Add defines for _() and N_() for translations.
2021-04-15 17:56:40 +02:00
Wim Taymans 043178e16b spa: improve i18n method
Make the method names match the fields in the method.
2021-04-15 17:56:40 +02:00
Wim Taymans 646842098c pipewire: add functions to get and set textdomain 2021-04-15 17:56:40 +02:00
Huang-Huang Bao d44955a199 a2dp: handle source transport destroy
Fix a use-after-free to transport if node is still running.
This revert part of a75fe69c8e.
2021-04-15 06:59:19 +00:00
Peter Hutterer 4b7a2df0b7 man: replace the custom man array with a filename-based section extraction
Use the file names as-is in meson.build (which makes it possible to grep for
them easily) and use the various string methods to extract the section from
the file name and compile the intermediate xml file.
2021-04-15 06:57:00 +00:00
Peter Hutterer 3de2d1c99c spa: use meson's install_subdir to install our header files
All files in spa/include are being installed anyway, so to avoid having to
list each file one-by-one let's use meson's install_subdir() to install all
of them in one go.
2021-04-15 06:57:00 +00:00
Peter Hutterer 223f20709d meson: replace join_paths(a, b) with a / b
More readable and from the meson reference manual:
(since 0.49.0) Using the/ operator on strings is equivalent to calling join_paths.
2021-04-15 06:57:00 +00:00
Peter Hutterer 2f78829fda ci: split the build_on_fedora job up into a template and a real job
Let's use a template for the generic case of "building on Fedora"
and a named job for the specific job itself.

The real change here is the artifact handling: by default the artifacts
collected for a .build job are only the meson build logs.

The build_on_fedora job collects the installed files as well (to be used in
the pages job later).
2021-04-15 13:48:25 +10:00
Peter Hutterer 2d8ee2b86d ci: fix the pages job
Regression introduced in 7e741ef983, the
change of BUILD_ID in that commit caused the pages job to break.
Fix it by relying on the same path expansion we use for the artifacts in the
parent job instead of a hardcoded path.
2021-04-15 13:48:25 +10:00
Peter Hutterer 8c369b0a58 spa: install i18n header
Added in 01fe9100e2, fails the ci's
check-missing-headers script
2021-04-15 13:48:25 +10:00
Wim Taymans 3babedec9c acp: get i18n interface from support and use it
Save the i18n interface in a global variable. Make acp use the support
interface when translating strings.
2021-04-14 18:03:46 +02:00
Wim Taymans 0b5741e725 pipewire: add i18n interface to support
Implement the i18n interface and add it to support.
2021-04-14 18:03:46 +02:00
Wim Taymans 7ee23a046c acp: avoid warning for i18n string
spa/plugins/alsa/acp/channelmap.h:466:9: warning: format not a string
literal and no format arguments [-Wformat-security]
  466 |         pa_snprintf(s, l, _("(invalid)"));
2021-04-14 18:03:45 +02:00
Wim Taymans 01fe9100e2 spa: add i18n interface
The interface can be used to get translated strings.
2021-04-14 18:03:45 +02:00
George Kiagiadakis ac91383cf5 pipewiresink: stop bufferpool flushing after resuming from pause
See #1048
2021-04-14 13:33:01 +00:00
Wim Taymans 60b405fdfd pulse-server: only send 32 channels max to a client
Limit the amount of channels we send to a client to 32 because this
is the pulseaudio limit.

This means that only the first 32 channels are accessible from the
pulseaudio API.

Fixes #1033
2021-04-14 15:29:46 +02:00
Wim Taymans 8bf7ce5fa4 pulse-server: fix channels property
Setting the channel property should create as many channels as
requested, not just the number from the default channel map.

If no channel_map is set, use the default one if the channels match
or use one with unknown channel layout otherwise.

Check the configured channels against the channel map and error
if there is a mismatch.
2021-04-14 15:29:46 +02:00
Peter Hutterer 7e741ef983 ci: add build jobs for automatic and custom-tailored options
Simple jobs that run a standard meson build process, once with no options
selected, once with a matrix of various options explicitly enabled or
disabled. This should pick up any accidental build errors.

The CI_JOB_NAME now includes brackets which cause issues in file paths, so
we use the CI_JOB_ID instead as build dir.
2021-04-14 11:04:03 +00:00
Peter Hutterer b758afbc22 ci: abstract the default build options into a variable
This enables us to have build jobs that set custom meson options instead of
always relying on the default set.
2021-04-14 11:04:03 +00:00
Peter Hutterer 6eb4114238 meson: fix handling of the alsa option
Option 'pipewire-alsa' is a meson feature and defaults to 'auto'. This is
different to 'disabled', so on systems where alsa's deps weren't available
we would still end up trying to build. Switch to checking alsa_dep.found()
instead.
2021-04-14 09:59:06 +10:00
Wim Taymans 23854539fe pw-dump: reparse and format JSON metadata values
Reparse the metadata value as json and dump it. This ensures the JSON
is valid and that the colors are applied properly.
2021-04-13 20:59:42 +02:00
Wim Taymans bded2a02a0 pw-dump: output Spa:String:JSON values as literal
Don't escape the Spa:String:JSON types in the metadata as it is
supposed to be valid JSON that can be output directly. We might want
to reparse and reformat it later to be sure.
2021-04-13 19:03:06 +02:00
Wim Taymans d8e3f9b801 context: fall back to loading the configured PIPEWIRE_CONF_NAME
First try to load the PIPEWIRE_CONF_NAME environment file, then
fall back to the application configured value (instead of client.conf)
and then fall back to client.conf.
2021-04-13 19:01:32 +02:00
jasker5183 99eeec5854 Add Version Info to v4l2-monitor.conf 2021-04-12 15:46:35 +00:00
jasker5183 508aa2c156 Add Version Info to media-session.conf + Formatting 2021-04-12 15:44:27 +00:00
jasker5183 f328a92b9e Add Version Info to bluez-monitor.conf 2021-04-12 15:42:38 +00:00
jasker5183 54ac9d2378 Add Version Info to alsa-monitor.conf 2021-04-12 15:41:12 +00:00
jasker5183 ba61d5823b Update pipewire-pulse.conf.in Formatting 2021-04-12 15:33:39 +00:00
jasker5183 4767bbc169 Update pipewire.conf.in Formatting 2021-04-12 15:30:03 +00:00
jasker5183 f36f464d7f Update client.conf.in Formatting 2021-04-12 15:26:46 +00:00
Wim Taymans 22ffed456c pulse-server: improve event handling
Do the check for the client event mask in only one place where we
are actually going to send the event. This avoids sending events to
clients that did not register them.

Rework some of the event handling when the manager emit an
add/remove/change event. Make it possible to send multiple events, like
when a sink changes, also emit a change for the monitor.

See #1042
2021-04-12 17:19:15 +02:00
Wim Taymans af6e212817 pulse-server: add simple protocol module
Fixes #954
2021-04-12 16:17:06 +02:00
jasker5183 5c92928eab Add No Color #2 2021-04-12 13:05:57 +00:00
jasker5183 1e3bbfbbc6 Add No Color 2021-04-12 12:52:12 +00:00
Wim Taymans 2a99e7afa8 Add simple protocol
The simple protocol listens on a socket, creates a new pw_client for
each connected client and reads/writes raw audio bytes on the
socket. Incomming bytes are copied to a playback stream, outgoing
bytes are copied from a capture pw_stream.

Fixes #954
2021-04-12 13:24:49 +02:00
Pauli Virtanen 20e383cea7 v4l2: remove device if inotify reports it's no longer accessible 2021-04-11 16:38:10 +00:00
Pauli Virtanen bf3b5d4286 alsa: remove device if inotify reports it's no longer accessible
When the session becomes inactive (eg. user on active seat switched),
udev may make devices inaccessible.  In this case, pipewire should give
up the devices and close their open file descriptors.
2021-04-11 16:38:10 +00:00
Pauli Virtanen 277a9a2577 bluez5: retry initial HFP codec selection after a timeout
In case headset fails to reply with AT+BCS to the codec selection
following AT+CMER, try to retry the codec selection, and if it still
fails, assume the headset is configured for CVSD.
2021-04-11 16:34:33 +00:00
Pauli Virtanen 87e06783d1 bluez5: more cleanup on impl_clear
Remove dbus filters and close the dbus connection.  Closing the
connection lets BlueZ to clean up, so we don't call its unregistration
API.
2021-04-10 23:07:51 +03:00
Pauli Virtanen 1c550d850b media-session: stop/start bluez monitor when seat inactive/active
When current user is no longer active on the seat, unregister the bluez
handler. This disconnects all bluez devices.

When the user becomes active on a seat, start bluez monitor again.
This will also reconnect devices.
2021-04-10 21:53:29 +03:00
Pauli Virtanen 0e80a2497a media-session: add logind seat status support 2021-04-10 21:53:29 +03:00
Pauli Virtanen 87aa18edb1 bluez5: free rfcomm when device is freed
Avoids use-after-free if device gets freed before the corresponding
rfcomm.
2021-04-10 15:47:46 +00:00
Huang-Huang Bao 0beb6bfc6c
bluez-monitor: improve documentation for 'bluez5.msbc-support', set values of some properties in comment to default 2021-04-10 17:56:50 +08:00
Wim Taymans d8f86ca6e5 pulse-server: make name in create_server const
constify the name in create_server() and make a copy of the name
were it is needed instead of modifying the argument in-place.
2021-04-10 11:22:41 +02:00
Wim Taymans 47bf30d734 pulse-server: create pid file only once
Only try to create the pid file once, not for every socket
we listen to.
2021-04-10 11:06:18 +02:00
Huang-Huang Bao 4292e8fe7e
a2dp: set marker bit on AAC header 2021-04-10 04:51:16 +08:00