Wim Taymans
1b88e0023b
filter-chain: free plugin when load fails
2021-11-17 12:45:26 +01:00
Wim Taymans
23ac9e5f3c
module-access: improve pipewire.client.access handling
...
If a client (pipewire-pulse) has performed the access check and creates
a client with a specific access path, it will set this in the
pipewire.client.access property. For example, when a flatpak client
connects to pipewire-pulse, it will create a client with the flatpak
pipewire.client.access property.
Check the property after reading it so that we don't blindly grant
complete access to the flatpak client. Instead let the session
manager to assign the permissions.
This fixes a problem where flatpak clients entering pipewire-pulse would
initially get full access and then be downgraded by the session manager.
This would result in the pulse client thinking that it has access to
objects while failing later.
2021-11-16 17:27:05 +01:00
Wim Taymans
a0e0a4d9d2
protocol-native: improve permission debug
2021-11-16 17:26:46 +01:00
Wim Taymans
af2e7b630a
pulse-server: turn error into info
...
Receiving a message from an already removed stream should not result in
an error message.
See #1812
2021-11-16 12:33:23 +01:00
Wim Taymans
c03d10296b
raop: connect TCP socket
...
Connect to the server TCP socket in TCP mode.
Use getaddrinfo to resolve hostname.
2021-11-13 21:00:24 +01:00
Niklāvs Koļesņikovs
ceeaf6c2f9
meson: add -Draop switch for OpenSSL dep control
...
Even though OpenSSL is very common, automagic dependencies
are still not great, so let's have a raop switch to control
that.
2021-11-13 12:07:33 +00:00
Wim Taymans
e52f9f513e
raop: add user agent
2021-11-13 10:13:55 +01:00
Wim Taymans
0573944e59
raop: add authentication
2021-11-13 10:00:50 +01:00
Wim Taymans
5d6690ebe7
raop: only encrypt when enabled
2021-11-12 18:10:39 +01:00
Wim Taymans
4695bd32c4
raop: move some info to debug
2021-11-12 17:56:04 +01:00
Wim Taymans
6ce9260980
pulse-server: implement module-raop-discover
2021-11-12 17:53:24 +01:00
Wim Taymans
fa1f556d93
module-raop-sink: handle 0 block_size
2021-11-12 16:58:27 +01:00
Wim Taymans
ac92f584ab
raop: remove duplicate define
2021-11-12 16:58:27 +01:00
Wim Taymans
7ed9c790e2
raop: More improvements
...
Handle control source io. We don't yet implement retransmission,
though.
Handle latency by exposing the server latency on the stream ports.
Use the Format param event to connect/announce and teardown.
Use the stream state to record/flush.
Fix some leaks.
Remove the state from rtsp-client, we don't need it.
Strip whitespace from header values.
2021-11-12 16:58:27 +01:00
Wim Taymans
27bc5e9ae5
raop: more improvements
...
Create sync and timing packets, reply to timing requests.
Send the right amount of data.
Parse protocol/encryption/codec parameters and use them.
2021-11-12 16:58:27 +01:00
Wim Taymans
9223fc2885
raop: add beginnings of RAOP protocol
2021-11-12 16:58:27 +01:00
KangJing Huang (Chaserhkj)
c21536eec8
module-echo-cancel: Remove intelligibility param with no effect
2021-11-11 16:52:58 +00:00
KangJing Huang (Chaserhkj)
a9a0b0466a
module-echo-cancel: wireup voice detection
2021-11-11 16:52:58 +00:00
Nicolai Syvertsen
a84cfac28a
Only handle -EPIPE eerrors.
2021-11-10 19:26:03 +00:00
Nicolai Syvertsen
7b773433f4
pipewire-pulse: add manager disconnect event
...
Drop client connections when pipewire goes away. pipewire-pulse daemon can remain running and pulseaudio clients will be able to connect again once pipewire is up and running.
2021-11-10 19:26:03 +00:00
Barnabás Pőcze
df3ea8dafa
pipewire: module-profiler: destroy event source
...
Even though all event sources are kept in a list in the current
implementation of the event loop in the SPA support plugin, relying
on it freeing all sources could lead to unbounded memory use
if the profiler module is loaded and unloaded over and over again.
2021-11-10 14:05:35 +00:00
Barnabás Pőcze
d4e4b5df98
pipewire: module-profiler: handle global's destroy event
...
Handle if the global is destroyed (e.g. `pw-cli destroy X`) to
avoid a use-after-free in `pw_global_destroy()` when it is called
with a dangling pointer from `module_destroy()`.
2021-11-10 14:05:35 +00:00
Barnabás Pőcze
336e4d5f03
pipewire: module-echo-cancel: aec-webrtc: use unique_ptr
...
Use `std::unique_ptr<>` to clean up memory in the destructor
instead of manually freeing resources in the destroy callback
and error code paths.
2021-11-09 22:27:31 +01:00
Barnabás Pőcze
5896083545
pipewire: module-echo-cancel: aec-webrtc: use appropriate casts
...
Use the suitable C++ cast instead of C-style casts.
2021-11-09 22:27:03 +01:00
Barnabás Pőcze
144face6ad
pipewire: module-echo-cancel: aec-webrtc: use getters with default
...
Instead of get-check-parse, use `pw_properties_get_bool()`
which does all three in one convenient function.
2021-11-09 22:27:01 +01:00
Barnabás Pőcze
175efc4c1d
pipewire: module-echo-cancel: avoid extra allocation
...
Use `pw_properties_setf()` instead of `calloc()` +
`sprintf()` + `pw_properties_set()` + `free()`.
Furthermore, check the return value of `sscanf()`.
2021-11-09 22:02:55 +01:00
Wim Taymans
c9fc3d7f42
pulse-server: don't process while the stream is created
...
When the stream is still being created, avoid doing any processing
because some things might not be configured yet.
2021-11-09 16:29:46 +01:00
KangJing Huang (Chaserhkj)
bb407e8153
Wire up webrtc aec parameters to args
2021-11-06 05:20:33 -04:00
Wim Taymans
743f699193
pulse-server: try to not put pointers in info messages
...
It's not very helpful, prefer to use human readable strings and move the
more techincal stuff in debug messages.
2021-11-05 16:22:22 +01:00
Wim Taymans
2f3e65c049
pulse-server: leave the draining state
...
Use pw_stream_set_active() to leave the draining state so that our
process methods are called again and we can resume.
2021-11-05 15:47:49 +01:00
Wim Taymans
0cccff517b
pulse-server: send the drained event only once
...
Only send the drained command once. pw-stream keeps on emitting drained
events as longs as the stream is drained.
2021-11-05 15:42:33 +01:00
Wim Taymans
6ca297797f
pulse-server: ensure latency is multiple of frame_size
2021-11-05 13:31:09 +01:00
Wim Taymans
b96f15d2fe
pulse-server: improve latency setup a little
...
Reorganize the latency setup in one place, return a desired device
latency for use as quantum.
PulseAudio assigns half of the (tlength - minreq) latency to the sink
but we can't do that because our sinks have a max-quantum of latency.
Fix this by clamping our calculated sink latency to the quantum
PulseAudio subtracts the sink latency from the tlength in adjust latency
mode, so we need to do the same.
This makes PULSE_LATENCY_MSEC values bahave more like pulseaudio.
See #1769
2021-11-04 18:07:30 +01:00
Wim Taymans
86ca0f8466
acp: improve debug of channel map
...
Increase the size of the channel_map debug printf buffer.
Use a safer version of the snprintf that avoids buffer overruns.
See #1781
2021-11-04 16:41:32 +01:00
Wim Taymans
efd8ac25e3
pulse-server: don't emit _removed without havine emitted _added
...
Don't emit _removed for objects that are still being created because
we did not emit an _added signal for them yet.
2021-11-04 12:50:18 +01:00
Wim Taymans
f70fdf5605
pulse-server: also remove creating objects
...
When an object is created, it is marked creating until all roundtrips
complete. If the object is removed in between, we don't remove it
because find_object does not return creating objects.
Make find_object also return the creating objects to fix this.
2021-11-03 16:57:41 +01:00
Wim Taymans
73bf30efa6
module-zeroconf: translate audio format
...
The audio format in the avahi messages is in pulseaudio format so
translate it to PipeWire format in audio.format.
See #1745
2021-11-03 12:54:58 +01:00
Wim Taymans
3509962f3a
module-session-manager: don't leak the impl structure
...
We need to remove the listener for the object as well so that we
can safely free the impl memory.
2021-10-27 17:41:32 +02:00
Wim Taymans
b5080a0395
node: dispatch RequestProcess event and command
...
The event is send to the driver node.
The command is sent to node directly.
2021-10-27 11:16:53 +02:00
Wim Taymans
a2f06be199
pulse-server: Improve combine sink properties
...
Make streams and sink have the same description so that they show
up as the same node in catia.
2021-10-26 10:50:28 +02:00
Wim Taymans
33653cbabf
protocol-pulse: flush streams on pause
...
To remove any lingering data
2021-10-26 10:49:50 +02:00
Gleb Popov
65aea7c05a
Avoid compiler warning by #ifdef'ing a function used only on Linux.
2021-10-22 19:08:24 +03:00
Gleb Popov
a76ccfe64b
Set PW_KEY_SEC_LABEL property on FreeBSD and avoid compiler warning.
2021-10-22 19:07:45 +03:00
KangJing Huang (Chaserhkj)
22aad6eaff
Tuning some webrtc parameters
2021-10-19 18:59:07 +00:00
KangJing Huang (Chaserhkj)
2bfc03f43c
Allow echo-cancel to select larger buffer sizes
2021-10-19 18:59:07 +00:00
Wim Taymans
100c12460f
client-node: handle events, send them to the server part
2021-10-19 12:28:23 +02:00
Barnabás Pőcze
4c27c3fd43
pulse-server: use for-each loop
...
Use `SPA_FOR_EACH_ELEMENT` to enumate the elements
in the array instead of an "indexed" loop.
2021-10-18 15:36:22 +02:00
Barnabás Pőcze
3fefb55ef2
pulse-server: return NULL instead of 0
...
... to be consistent with the vast majority of the
existing source code.
2021-10-18 15:36:22 +02:00
Barnabás Pőcze
ee7b82ac9e
pulse-server: remove unnecessary NULL check
...
`spa_streq()` already checks for NULL pointers, so the
pointer does not need to be checked before calling it.
2021-10-18 15:36:22 +02:00
Barnabás Pőcze
80ae688cc6
pulse-server: compile extensions separately
...
Avoid including other C source files. Compile them separately.
2021-10-18 15:36:17 +02:00