Commit graph

5091 commits

Author SHA1 Message Date
James Le Cuirot
f613922d0e raop: Fix duplicate Digest string in Authorization response header
We were responding with this, which works, but was probably unintended.

  Authorization: Digest Digest username="iTunes" ...
2022-10-12 07:38:14 +00:00
Dmitry Sharshakov
ec0688fa87 module-rtp-source: reduce log level for RTP packets to trace
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2022-10-12 07:36:13 +00:00
Niklāvs Koļesņikovs
cba334f028 treewide: fix some strict-prototypes Clang warnings/errors
Clang 15 at least with my build configuration emits warnings about
function prototypes that lack argument types. Most notably this
happens with functions that take no arguments which in compiler view
equates to the void type i.e. void f(void) instead of void f(). As I
understand, this will become an error in some future Clang release,
so might as well fix it now.

Since these were discovered not by a linter but by the actual compiler
for my particular build configuration, some f() may have escaped for
now. But at least it's enough to build PipeWire with most optional
features enabled even when -Werror=strict-prototypes is enabled.

For anyone else wanting to have a go at this, these can be upgraded
from warnings to errors by adding -Werror=strict-prototypes to the
custom CFLAGS which probably works with GCC, too, but has only been
done with Clang 15.0.2.

Finally my editor automatically stripped trailing spaces upon saving
the modified files. I assume it's probably not worth keeping those
invisible bytes around but this may have slightly dubious implications
as it did also turn indented empty lines of JACK license header into
regular empty lines.

Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
2022-10-12 07:32:47 +00:00
Wim Taymans
9dd1c78f50 module-rtp: for multicast we need to add the TTL 2022-10-07 16:40:04 +02:00
Wim Taymans
c06f936a88 module-rtp: improve properties 2022-10-07 16:12:22 +02:00
Wim Taymans
37f57dc09f module-rtp: add some more properties 2022-10-07 15:57:12 +02:00
Wim Taymans
0d7e20534f module-rtp: half buffer-time for node latency
Spend half of the allowed latency on buffering and the other half
on the node-latency.
2022-10-07 13:05:17 +02:00
Wim Taymans
b32093b896 module-rtp: receive packets in the RT thread 2022-10-07 13:04:46 +02:00
Wim Taymans
f87654eb17 module-rtp: use MTU to set the latency 2022-10-07 12:59:29 +02:00
Wim Taymans
7fd16b8a77 module-rtp: set higher priotity on sender socket 2022-10-07 12:59:29 +02:00
Wim Taymans
ecc53cfcdb module-rtp: handle non-multicast addresses
Handle errors when creating a session by destroying the session.
2022-10-07 10:33:24 +02:00
Wim Taymans
68b30e36b4 module-rtp: improve debug messages 2022-10-06 17:29:05 +02:00
Wim Taymans
4a41a03f5c module-rtp: fix L24 sample size 2022-10-06 16:16:49 +02:00
Wim Taymans
5b2df0b35c pulse-server: handle unknown format 2022-10-06 16:14:35 +02:00
Wim Taymans
dfb6206207 module-rtp: support more formats 2022-10-06 16:04:15 +02:00
Wim Taymans
2edfea8b5b module-rtp: add pulse-server modules 2022-10-06 13:18:35 +02:00
Wim Taymans
be1159eb66 module-rtp: make sender work
Small cleanups
2022-10-06 11:41:01 +02:00
Wim Taymans
84c666db20 module-rtp: construct and send SAP 2022-10-05 21:42:36 +02:00
Wim Taymans
3e57570e9a module-rtp: add beginnings of rtp-sink 2022-10-05 21:42:36 +02:00
Wim Taymans
1b4ade211d module-rtp: improve debug 2022-10-05 21:42:36 +02:00
Wim Taymans
04cc036f94 module-rtp: add session timeout and bye
Handle recovery better.
2022-10-05 21:42:36 +02:00
Wim Taymans
afc3c12bea module-rtp: add rate control 2022-10-05 21:42:36 +02:00
Wim Taymans
6065c699bf module-rtp: add some properties 2022-10-05 21:42:36 +02:00
Wim Taymans
f20959d62f module-rtp: add receive to ringbuffer 2022-10-05 21:42:36 +02:00
Wim Taymans
6f1e96bb59 module-rtp: work on session setup 2022-10-05 21:42:36 +02:00
Wim Taymans
14194e137f module-rtp: parse some more SDP 2022-10-05 21:42:36 +02:00
Wim Taymans
38f908e758 rtp: add SAP parsing 2022-10-05 21:42:36 +02:00
Wim Taymans
d21fc6f378 Start of RTP module 2022-10-05 21:42:36 +02:00
Sanchayan Maity
05a133f5b5 pw-link: Improve error message if ports are not found
In a scenario where pw-link is called without a session manager running,
the output port on a node will not exist. In such a case, we broke out
of the for loop with all_links_exist set to true and returning EEXIST.

The return of EEXIST gives a confusing error message. Fix this.
2022-10-05 18:08:32 +05:30
Wim Taymans
4574678424 conf: load module-x11-bell if available
Fixes !1375
2022-10-03 12:00:16 +02:00
Wim Taymans
750b4cdf7a filter-chain: increase tail size 2022-10-03 10:50:27 +02:00
Wim Taymans
0096836af0 filter-chain: guard against NULL convolver
The convolver can be NULL when the IR has 0 length.
2022-10-03 10:49:47 +02:00
Wim Taymans
16b7ab29c1 filtet-chain: set errno on errors 2022-10-03 10:49:32 +02:00
Wim Taymans
cc4a635b2f filter-chain: add some more debug 2022-10-03 10:22:50 +02:00
Wim Taymans
94a6426861 filter-chain: iterate the port correctly
Don't use the number of handles to iterate the output ports but the
number of output ports on the node.

Fixes #2737
2022-10-03 09:55:44 +02:00
Wim Taymans
94a857550b filter-chain: alloc port data per handle. 2022-10-03 09:44:32 +02:00
Wim Taymans
9b6e504c19 clean up some more array iterations 2022-10-03 09:20:42 +02:00
Wim Taymans
d22feab92a spa: add macro to simplify array iterations some more
uint32_t i;
	for (i = 0; i < SPA_N_ELEMENTS(some_array); i++)
		.. stuff with some_array[i].foo ...

   becomes:

	SPA_FOR_EACH_ELEMENT_VAR(some_array, p)
		.. stuff with p->foo ..
2022-09-30 16:24:26 +02:00
Wim Taymans
38e8e76f76 modules: disconnect streams before destroy
So that they are both stopped before being destroyed.
2022-09-28 09:13:31 +02:00
Demi Marie Obenour
1e848fc299 SPA POD parser: fix several integer overflows
This fixes several integer overflow problems in the POD parser, as well
as fixing a returns-twice warning from GCC and integer truncation
problems in SPA_FLAG_CLEAR and SPA_ROUND_DOWN_N.  The integer overflows
can result in a tiny POD being treated as a huge one, causing
out-of-bounds reads.
2022-09-27 10:21:17 +00:00
Wim Taymans
323ec0b51b pulse-server: improve maxlength calculations
When no maxlength is given, we use the MAXLENGTH value but we need to
round it DOWN (instead of up) because our buffer is only MAXLENGTH big.
Use CLAMP where we can.
When in capture mode, the maxlength exceeds MAXLENGTH, scale down the
fragsize instead.

Fixes noise in audacious when playing 6 channels sounds. float32 * 6
channels with the maximum buffer size would result in the ringbuffer
being overwritten.
2022-09-26 17:29:17 +02:00
Jonas Holmberg
1a44689d3f module-loopback: Disconnect streams before destroying
Disconnect both streams before destroying any of them so that
playback_process() doesn't get called after the capture stream has been
destroyed.
2022-09-26 16:47:33 +02:00
Wim Taymans
e0d1be32fd pulse-server: don't read more than requested size
When we underrun, don't try to read more than what was requested
even if there is more in the ringbuffer.
2022-09-26 13:30:39 +02:00
Wim Taymans
78bfdd1717 raop: use pw_strip to string header values 2022-09-26 09:31:55 +02:00
Sebastian Koenig
fa20fb2e80 rtsp-client: remove trailing whitespace from header data
Some clients may send headers with trailing whitespace, which can upset
subsequent parsing of the data into numbers.  This patch removes such trailing
whitespace before further processing the header data.
2022-09-26 07:20:27 +00:00
Sebastian Koenig
fd66fb8867 raop: add support for ALAC codec
Some Airplay devices announce themselves as using the ALAC (Apple Lossless Audio
Codec) format, while pipewire only supports the PCM codec.  A look at the
Pulseaudio RAOP reveals that ALAC is supported there, but the encoding looks
exactly like what pipewire does for PCM.  This patch adds support for ALAC, but
it uses the existing PCM infrastructure to send the audio data.
2022-09-26 07:16:52 +00:00
Demi Marie Obenour
c1920163d5 Fix calls to sendmsg()
Align cmsg buffers properly and use MSG_NOSIGNAL.
2022-09-23 16:33:36 +00:00
Demi Marie Obenour
671a7102ff Fix some badly-behaved macros
Some macros evaluated their arguments more than once when it was not
needed, or were missing parentheses.
2022-09-23 11:39:33 -04:00
Demi Marie Obenour
bb4f274ae0 Make all fopen() calls use O_CLOEXEC
by adding "e" to the mode strings.
2022-09-23 15:19:01 +00:00
Demi Marie Obenour
400860f63c Add <stdint.h> includes
This is to make the headers standalone.
2022-09-23 15:19:01 +00:00