Commit graph

6326 commits

Author SHA1 Message Date
Wim Taymans 44f326013b module-pulse-tunner: add module to tunnel to PulseAudio
Add a module that can make a source or sink that tunnels audio
to or from a (remote) PulseAudio server.
2021-05-12 15:56:59 +02:00
Evgeniy Khramtsov 685ff1dc25 utils: provide strdupa() if not in libc
FreeBSD does not have strdupa(), provide it locally then.

Macro by: Gleb Popov <arrowd@FreeBSD.org>
2021-05-11 21:06:28 +03:00
Wim Taymans c89af625db pipewire.conf: add dummy driver to pipewire.dummy group
So that we can have nodes join to the dummy driver group to let
them be scheduled by it.
2021-05-11 15:47:38 +02:00
Wim Taymans 92196787d6 stream: only trigger in queue when capturing
When we are a driver source, we can start processing of the
graph when we queue a buffer.

Don't do this when we are a driver sink.
2021-05-11 15:47:38 +02:00
Wim Taymans 80cf968ae7 stream: trigger the right process function
Depending on the direction of the stream.
2021-05-11 15:47:38 +02:00
Daniel Stone d08b6fac6b openaptx: Blacklist >= 0.2.1 due to license change
openaptx has recently changed its license to explicitly exclude
'Freedesktop projects' from using it, which would include PipeWire, as
well as shifting to base terms of GPLv3:
    811bc18586

This unilateral license change is legally dubious in many ways.

The original work came from ffmpeg under the LGPL v2.1, to which third
parties may not add additional restrictions (per sections 2 and 7 of the
LGPL v2.1), so LGPLv2.1 + may-not-use restrictions are not permissible
without the explicit consent of the original copyright holder.

The upgrade to LGPL v3.0 without explicit consent from the original
copyright holder is in itself permissible through the upgrade terms of
the LGPL, however the additional restrictions imposed again conflict
with sections 7 and 10 of the GPLv3 (as the base of the LGPLv3, with
those sections not being invalidated by the additional LGPLv3 text).

Though it does not impact the legal validity of the redeclaration of
licensing, the claims that freedesktop.org has violated the terms of the
openaptx license in the past are false; the work was contributed to the
PulseAudio project with an explicit open license, with the original
contributor later attempting to revoke permission for its use, despite
the explicit terms of the license giving no ability to do so as they
lack a change-of-heart provision.

The claims that Collabora violated the license are even more baseless;
they are based on an assertion that when I (acting on behalf of
freedesktop.org rather than Collabora, in my own unpaid time) banned
users from freedesktop.org's GitLab instance due to sustained violations
of the Code of Conduct users agree to when creating an account on that
platform, this somehow constituted a violation of the license. Even if
Collabora were somehow involved in this - which they were not at all -
there is no requirement under open licenses that users be given
unlimited access under all terms to any platform on the internet. Such
terms would mean that open development could only be conducted on
completely unmoderated platforms, which does not stand up to any
scrutiny.

Regardless of the declared license having no legal validity, the LGPL's
explicit provision in both v2.1 and v3.0 for such additional
restrictions to be stripped, and the low likelihood of it ever being
used together with PipeWire as its licensing terms would not be
acceptable to any distribution, enforcing a version check seems like the
safest way to ensure complete legal clarity, not put users or
downstreams in any jeopardy, and comply with the author's stated wishes
for v0.2.1 and above to not be used by PipeWire.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2021-05-11 12:48:24 +00:00
Huang-Huang Bao 03cde9751b
bluez5: guard against device profile
Invalid device profile should not be set.
2021-05-11 19:22:42 +08:00
Sanchayan Maity d8f98df6ed pulse-server: Implement module-pipe-sink 2021-05-11 13:31:41 +05:30
Wim Taymans c50c8d2be9 modules: fix some leaks in error paths
As found by coverity
2021-05-11 09:55:14 +02:00
Peter Hutterer 5bed3f1ff3 ci: hook up shellcheck 2021-05-11 07:01:21 +00:00
Peter Hutterer 20f8838f7b pw-jack: correct nested quotes
Found by ShellCheck, reformatted output:

In pipewire-jack/src/pw-jack.in line 58:
echo "	-s                  samplerate (default "$SAMPLERATE")"
	 SC2027: The surrounding quotes actually unquote this. Remove or escape them.
	 SC2086: Double quote to prevent globbing and word splitting.
2021-05-11 07:01:21 +00:00
Peter Hutterer 056d06da88 pw-jack: remove unecessary $ from arithmetic variables
Found by ShellCheck: SC2004: $/${} is unnecessary on arithmetic variables.
2021-05-11 07:01:21 +00:00
Peter Hutterer c3b87ea4b2 pw-uninstalled: drop handling of VERSION
This functionality was removed in 08543384f1
2021-05-11 07:01:21 +00:00
Peter Hutterer 7594767cf7 ci: re-order dependencies in alphabetical order 2021-05-11 07:01:21 +00:00
Wim Taymans bfbd6d74ef filter-chain: add biquads to filter-chain
Add some biquad filters to the builtin filters.
Add an example 6 band equalizer sink filter chain.
2021-05-10 18:11:20 +02:00
George Kiagiadakis 8911e22793 pipewiresink: release manually acquired buffers back to the pool
When we manually acquire buffers from the pool, we never release them.
But because gst_buffer_pool_acquire_buffer() adds a reference to the pool,
this leaks the pool eventually.

To fix this, just unref the buffer after it has been sent. This releases
it back to the pool and unrefs the pool.

This has no significant effect to the stream, since the underlying
pw buffers are actually pooled in the pw_stream. It just prevents leaking.
2021-05-10 17:25:57 +03:00
George Kiagiadakis b86e5cabfa pipewiresink: use all the available dest memory when copying buffer
When pipewiresink needs to copy data, it has to resize the destination
buffer (to a smaller size) in order to send the correct data size to
pipewire. When this dest buffer is reused later, it will still have
this smaller size as its total size and the copy may discard data
from upstream if the new upstream buffer is bigger than the last one
that was copied on the same dest buffer.
2021-05-10 17:12:12 +03:00
Wim Taymans 0999f3cf93 alsa-plugin: handle context create error 2021-05-10 13:28:36 +02:00
Wim Taymans 7b759e7961 filter-chain: remove some lines from the config 2021-05-10 13:11:36 +02:00
Wim Taymans 1bfde16a89 filter-chain: update properties on the right stream
The filter properties are on the input stream.
2021-05-10 11:29:43 +02:00
Wim Taymans 64f694c02f filter-chain: add ladspa header 2021-05-10 11:05:06 +02:00
Wim Taymans d69673816f filter-chain: use more convenient param Props field
Is more convenient for custom properties without an id.
2021-05-10 11:01:13 +02:00
Wim Taymans 4cde1182d4 spa: add params property
Some properties can be part of a params field in the Props object
and contain the string key and the pod value to be configured. This
is easier to use than using the regular id.

Add the fact that the property is also part of params in the PropInfo.
2021-05-10 11:01:13 +02:00
Wim Taymans 2414d3501c pulse-server: add ladspa sink and source
To make an rnnoise filtered source:

pactl load-module module-ladspa-source source_name=rnnoise_mic label=noise_suppressor_mono plugin=/usr/lib64/ladspa/ladspa/librnnoise_ladspa.so

To make an equalizer sink:

pactl load-module module-ladspa-sink sink_name=eq_out label=mbeq plugin=/usr/lib64/ladspa/mbeq_1197.so
2021-05-10 11:01:13 +02:00
Wim Taymans c73946a64f filter-chain: add rnnoise example source 2021-05-10 11:01:13 +02:00
Wim Taymans b2053b9d49 filter-chain: support absolute plugin path 2021-05-10 11:01:13 +02:00
Wim Taymans 00e85a252c filter-chain: add builtin plugins
Add a simple mixer builtin plugin.
Free memory on module unload.
2021-05-10 11:01:13 +02:00
Wim Taymans 3c7222d84b filter-chain: fix setting control values
Add support for getting the control ports from a node. Use this to
configure the control port values.
2021-05-10 11:01:13 +02:00
Wim Taymans aec4358d72 filter-chain: copy media name 2021-05-10 11:01:13 +02:00
Wim Taymans a595f88cf1 filter-chain: add example
run with pipewire -c filter-chain/demonic.conf
2021-05-10 11:01:13 +02:00
Wim Taymans f9a29c5424 filter-chain: use node name and port name for control
Address controls with node_name:port_name to access all properties
in the graph.
2021-05-10 11:01:13 +02:00
Wim Taymans 4d1fa14774 filter-chain: use the right index for notify ports 2021-05-10 11:01:13 +02:00
Wim Taymans 417a5779e7 filter-chain: use a port structure to hold port info 2021-05-10 11:01:13 +02:00
Wim Taymans ca9225b5aa filter-chain: use the right description when linking 2021-05-10 11:01:13 +02:00
Wim Taymans 641e685d5b filter-chain: add more debug 2021-05-10 11:01:13 +02:00
Wim Taymans 8ec0f1eb4b filter-chain: parse and handle links 2021-05-10 11:01:13 +02:00
Wim Taymans 4d680a816f filter-chain: use dependencies to build scheduling plan 2021-05-10 11:01:13 +02:00
Wim Taymans 2714ba47ac filter-chain: control is just an object 2021-05-10 11:01:13 +02:00
Wim Taymans 1088f875d4 filter-chain: add some more debug 2021-05-10 11:01:13 +02:00
Wim Taymans 5df221cf9a filter-chain: implement inputs and outputs
When inputs/outputs are specified, find the node:port and link them.
Fall back to the first/last node for input/output if no node is given.
Fall back to all input/output ports when no ports are given.
2021-05-10 11:01:12 +02:00
Wim Taymans aa0fdaf454 module-filter-chain: rename
This does not have to be ladspa specific so rename it.
2021-05-10 11:01:12 +02:00
Wim Taymans eaeb9e9b5d module-ladspa-filter: expose controls 2021-05-10 11:01:12 +02:00
Wim Taymans 3f5ebdedca module-ladspa-filter: change to graph syntax
Expand the syntax to allow a graph of nodes and links later.
2021-05-10 11:01:12 +02:00
Wim Taymans 22373de5b4 module-ladspa-filter: use custom keys and propinfo
Use custom keys and propinfo to map the name to the key. This allows
us to specify ranges and other context for the properties.
2021-05-10 11:01:12 +02:00
Wim Taymans 97002a4451 module-ladspa-filter: update props when they change 2021-05-10 11:01:12 +02:00
Wim Taymans 69d36675d1 modules: ladspa-filter improvements
Parse initial control values
Reset to default when value is null
Implement port selection by name.
2021-05-10 11:01:12 +02:00
Wim Taymans a36e5b2c0d modules: more ladspa improvements
Run multiple instances to fill requested channels.
Improve media name.
2021-05-10 11:01:12 +02:00
Wim Taymans 3272344df4 modules: parse and set control values 2021-05-10 11:01:12 +02:00
Wim Taymans 0a966d4637 modules: improvements 2021-05-10 11:01:12 +02:00
Wim Taymans 356c7ade1c modules: add begining of ladspa filter
Can be used to build chains or sink/source.
2021-05-10 11:01:12 +02:00