Commit graph

173 commits

Author SHA1 Message Date
Wim Taymans
be09198249 module-rtp: port source and sink to new stream 2023-03-09 13:14:22 +01:00
Wim Taymans
cb1e5661dc move SAP in separate module
The idea is to have the rtp-source and rtp-sink be separate modules that
can be loaded a static ip/port as well.

The SAP module would then expose existing rtp-sinks or additionally load
rtp-sources based on SAP messages.

This makes things a bit more flexible when we also want to expose the
rtp-sink using zeroconf, for example.
2023-03-09 13:14:22 +01:00
Wim Taymans
3badf6f3ac module-rtp: move avahi in rtp-session
It needs to be there because we need to be able to relate
zeroconf entries to udp connections.
2023-03-09 13:14:21 +01:00
Wim Taymans
7da031c969 module-rtp: add new rtp-session module
The module uses the apple session setup for managing peer connections.

Make a generic rtp stream object, make midi and audio implementations.
2023-03-09 13:14:21 +01:00
Niklāvs Koļesņikovs
5e0bfa0beb
RLIMITs: add support for generating limits.d files
This commit implements generating /etc/security/limits.d/20-pw-defaults.conf and
/etc/security/limits.d/25-pw-rlimits.conf files. The numbering is arbitrary and
may very well warrant being in the reverse order, however `man 5 limits.conf`
does not appear to specify the parsing order or even say exactly how multiples
matches will resolve, so the value can be adjusted later, if required.

The actual limit values, the match rule and even whether each file is to be
installed can be changed via the build system before compilation. Likewise
the files can be modified or (re)moved during distro package building phase.

The 20-pw-defaults.conf should only be installed on legacy systems lacking both
a modern kernel and up to date systemd, because all it does is set the current
Linux default. Accordingly its not installed by default.

Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
2023-02-14 17:37:59 +02:00
Niklāvs Koļesņikovs
d082ec0809
src/modules/meson.build: fix indentation and remove obsolete comment
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
2023-02-14 17:37:59 +02:00
Dmitry Sharshakov
9399fc318e spatializer: move to sofa_plugin 2023-01-30 21:07:06 +03:00
Dmitry Sharshakov
3e0dc2678b filter-chain: add spatializer
SOFA is a file format used for storing and accessing spatial audio data, namely head-related transfer functions. These can be used to create binaural spatial sound using head- or earphones.

This commit introduces libmysofa as an optional dependency for loading SOFA files and creates a spatializer plugin for the filter-chain

ci: install libmysofa-devel for full build

ci: bump FDO_DISTRIBUTION_TAG
2023-01-30 21:07:06 +03:00
Wim Taymans
fba7083f8c modules: also install module-combine-stream 2023-01-26 11:57:45 +01:00
Wim Taymans
29787b51ef modules: add combine-stream module
The module can:

- Make a sink that sends all or some channels to other sinks.
- Make a source that combines multiple sources into one.

The selection of what streams to combine is implemented with rules so
that the selection is very configurable. By default all Audio/Sink or
Audio/Source nodes are selected.
2023-01-23 17:06:56 +01:00
Barnabás Pőcze
73c5f6e1bf pipewire: module-roc-{sink,source}: port to ROC v0.2.X
Incompatible changes between ROC v0.1.X and v0.2.X require
adjusting the ROC modules' code. The largest change is going
from `roc_address` to `roc_endpoint`. There is also a breaking
change, the removal of `local.ip` parameter from module-roc-sink
as `roc_sender_bind()` has been removed.

The API usage was modelled after https://github.com/roc-streaming/roc-pulse

See #1757
Fixes #2911
2022-12-29 10:13:30 +00:00
Wim Taymans
0f2f113bdc filter-chain: add optimized sum function 2022-12-16 10:19:20 +01:00
Dmitry Sharshakov
7950d3ff0d filter-chain: convolver: resample IR
Ensure correct filtering when node rate does not match filter rate
2022-12-13 10:09:55 +00:00
Wim Taymans
b29200ee82 pulse-server: add a pulse.cmd section
Add a new config section that can contain a set of commands to run after
starting.

There is only load-module available now but it can be used to remove the
dependency on pactl when starting the server.
2022-12-12 16:46:16 +01:00
Wim Taymans
37439d2b73 pulse-server: add gsettings module
Uses a thread to monitor gsettings data. Loads and unload modules
based on gsettings.

This makes paprefs work.
2022-12-07 09:45:43 +01:00
Wim Taymans
0f79014e18 filter-chain: add some optimized mix functions 2022-11-22 17:59:44 +01:00
Wim Taymans
2edfea8b5b module-rtp: add pulse-server modules 2022-10-06 13:18:35 +02:00
Wim Taymans
3e57570e9a module-rtp: add beginnings of rtp-sink 2022-10-05 21:42:36 +02:00
Wim Taymans
d21fc6f378 Start of RTP module 2022-10-05 21:42:36 +02:00
Barnabás Pőcze
68ff3ad841 treewide: meson.build: use host_machine instead of build_machine
At the moment, cross compilation may not work in certain cases because
checks are carried out against the build machine instead of the host machine.
Replace uses of `build_machine` with `host_machine` to fix that.

In native compilation, all three "machine objects" available in meson
are the same, so this change should have no effect in that case.

More: https://mesonbuild.com/Cross-compilation.html
2022-08-17 07:34:20 +00:00
Gleb Popov
4a0395d23e Enable AVB on Linux only. 2022-08-11 17:23:16 +03:00
Wim Taymans
1e71c0e840 meson: also check for roc headers
Fixes #2513
2022-08-10 12:09:54 +02:00
Pauli Virtanen
3730e54484 modules: support getting app_id in pw_check_flatpak
Support getting the Flatpak application ID from the .flatpak-info file,
similarly as what xdg-desktop-portal does.
2022-08-01 19:36:00 +00:00
Wim Taymans
e0d6b2bb4f avb: implement streams
Add in input/output stream, setup the talker/listeners.
Implement IEC61883 audio packets, send and receive data.
Implement talker encoding.

With this, audio can be sent and received from MOTU M64.
2022-07-12 12:27:22 +02:00
Wim Taymans
773bd610aa avb: avbtp -> avb 2022-07-12 12:27:22 +02:00
Wim Taymans
893251c8eb avb: add beginnings of MRP/MMRP/MSRP/MVRP/SRP 2022-07-12 12:27:22 +02:00
Wim Taymans
50199c9824 avb: use descriptors for ADP
Remove some of the json parsing for now, work with descriptors.
Remove some parsing code.
Implement GET_AVB_INFO.
Keep descriptors in a list.
Add some utils.
2022-07-12 12:27:22 +02:00
Wim Taymans
4613c7822f avb: implement some descriptors
Work on raw ethernet frames.
2022-07-12 12:27:22 +02:00
Wim Taymans
07a4c5032e avb: add aecp stubs 2022-07-12 12:27:22 +02:00
Wim Taymans
f470354e67 avbtp: add beginnings of AVB manager module 2022-07-12 12:27:22 +02:00
Wim Taymans
af41d45e1a modules: add pipe tunnel 2022-06-03 10:52:45 +02:00
Wim Taymans
4885baabb1 protocol-pulse: add roc-sink-input
Add a sink-input roc source, like the pulseaudio one.

Fixes #2331
2022-04-25 15:18:47 +02:00
Wim Taymans
368dd51d04 modules: update docs 2022-04-22 17:29:40 +02:00
Carlos Rafael Giani
e8f93c3e1e meson: Add option to enable/disable legacy RTKit module
The RTKit module is being replaced by the RT module. Currently, it is
always built if D-Bus is present. For packagers, it can be beneficial to
be able to disable the legacy module. Add a Meson option to allow for
exactly that. Make it enabled by default to not change default behavior.
2022-03-31 07:07:40 +00:00
Théo Lebrun
344cacd24a module-rt: small fixes
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2022-03-11 18:47:25 +00:00
Théo Lebrun
6798b9a933 module-rt: allow building without RTKit 2022-03-11 18:47:25 +00:00
Pauli Virtanen
680c33d3eb protocol-native: extend v3 protocol with message footers
Extend version 3 protocol with message footers, which are for passing
around global state data that is not addressed to a specific object.

The extension is backward compatible with previous v3 clients, and won't
e.g. result to error spam in logs.

The footer is a single SPA POD, appended after the main message POD.
Because both the protocol message and the message POD record their
length, it's possible to append trailing data. Earlier clients will
ignore any data trailing the message POD.

The footer POD contains a sequence [Id opcode, Struct {...}]*,
so there is room to extend with new opcodes later as necessary.

There are separate marshal/demarshal routines for messages aimed at
resources and proxies.
2022-02-20 16:59:25 +02:00
Barnabás Pőcze
d6c5da5678 pipewire: module-x11-bell: mark connection as terminatable
Since XFixes version 6[1] it is possible to mark
an X connection as terminatable. The X server will
gracefully terminate after a timeout if only
terminatable connections remain.

[1]: https://gitlab.freedesktop.org/xorg/lib/libxfixes/-/merge_requests/1
2022-02-18 12:30:53 +01:00
Joakim Olsson
9386c70b3a module-echo-cancel: Move backends to dynamic libaries
Move all backends to dynamic libaries loaded with spa_plugin_loader so
new backends not needs changes in pipewire or pipewire dependency to
external code

Change-Id: I702ce047598d0c318d6dc6ac8248062a5c12f643
2022-02-15 15:45:46 +00:00
Pauli Virtanen
04cff777af pulse-server: add module-always-sink
It just loads/unloads libpipewire-module-fallback-sink.
2022-02-13 13:45:17 +02:00
Pauli Virtanen
02e6f9fbca module-fallback-sink: add dynamically appearing fallback sink
Add a module for a fallback dummy sink, which appears dynamically when
no other sinks are present.

Enable it for pipewire-pulse, because Pulseaudio will also show
dynamically a dummy sink.
2022-02-13 09:54:55 +00:00
Wim Taymans
143fadf68e pulse-server: also remap module property keys and values
When loading a module, remap the pulseaudio properties to pipewire ones
for consistency.

move the media-roles to remap, because it's more about remapping between
pa and pw.

Fixes #2076
2022-02-04 15:15:42 +01:00
Barnabás Pőcze
15e7a61aa7 treewide: only define feature macros when the feature is available
Most feature checks already use #ifdef, and do not care about
the value of the macro. Convert all feature checks to do that,
and simplify the meson build scripts by replacing

  if cond
    cdata.set('X', 1)
  endif

with

  cdata.set('X', cond)
2022-02-04 00:15:59 +01:00
Barnabás Pőcze
9afffc1815 meson.build: only set HAVE_DBUS once
HAVE_DBUS is already set in the top-level meson.build file.
2022-02-04 00:15:59 +01:00
Wim Taymans
3399d58e85 modules: compile rtkit module instead of using a symlink
The rpath is otherwise not right.

Fixes #2065
2022-01-25 16:42:27 +01:00
Wim Taymans
373432a4e7 pulse-server: implement module-x11-bell
Just load the x11-bell module into the pulse server.

See #1668
2022-01-21 17:01:18 +01:00
Wim Taymans
0cd0ef5912 modules: add x11-bell module
It listens for X11 bell events and plays a sample with libcanberra.

Fixes #1668
2022-01-21 16:30:02 +01:00
Barnabás Pőcze
ec465966bc treewide: meson.build: simplify get_variable() calls
Since 01c6fd0a88 the
minimum required meson version is 0.59.0, and since
meson 0.58.0, `get_variable()` on a dependency object
accepts a positional argument. The "type" of variable
(internal, pkgconfig, etc.) in that case does not need
to be specified explicitly.
2022-01-17 08:28:53 +00:00
Robbert van der Helm
674858cd6e modules: Provide an alias for module-rtkit
So this will now use `module-rt` even with old configurations that still
use `module-rtkit`.
2022-01-16 21:54:32 +01:00
Robbert van der Helm
2b73c86af5 modules: Rename module-rtkit to module-rt
I don't think PipeWire currently has a way to temporarily alias
module-rtkit to module-rt though, so right now this would break realtime
scheduling for people with modified configs that use module-rtkit.
2022-01-15 20:59:41 +01:00