Barnabás Pőcze
5318c0eeca
pulse-server: split out media roles
...
Part of !776 .
2021-06-25 03:23:20 +02:00
Barnabás Pőcze
62832609c1
pulse-server: split out utils
...
Part of !776 .
2021-06-25 03:23:18 +02:00
Barnabás Pőcze
8a0f52ab78
pulse-server: split out pending-sample
...
Part of !776 .
2021-06-25 03:23:15 +02:00
Barnabás Pőcze
bee97b09e2
pulse-server: split out sample, sample-play
...
Part of !776 .
2021-06-25 03:23:12 +02:00
Barnabás Pőcze
bc4370e195
pulse-server: split out D-Bus parts
...
Part of !776 .
2021-06-25 03:23:09 +02:00
Barnabás Pőcze
acffe1b90b
pulse-server: split out "collect" functions
...
Part of !776 .
2021-06-25 03:23:04 +02:00
Barnabás Pőcze
4496c33751
pulse-server: split out volume handling
...
Part of !776 .
2021-06-25 03:23:01 +02:00
Barnabás Pőcze
43e2c64307
pulse-server: split out format handling
...
Part of !776 .
2021-06-25 03:22:59 +02:00
Barnabás Pőcze
8ac60cb0ae
pulse-server: split out commands
...
Part of !776 .
2021-06-25 03:22:56 +02:00
Barnabás Pőcze
738b764253
pulse-server: do not define NAME in header
...
Part of !776 .
2021-06-25 03:22:54 +02:00
Barnabás Pőcze
8208e60b33
pulse-server: add include guard to defs.h
...
Part of !776 .
2021-06-25 03:21:38 +02:00
Sanchayan Maity
badb76147f
module-protocol-pulse: Add module-roc-source
2021-06-24 11:04:23 +00:00
Sanchayan Maity
e60498df51
module-protocol-pulse: Add module-roc-sink
2021-06-24 11:04:23 +00:00
Wim Taymans
f85b0bfd16
pulse-server: Avoid overflow in stream read/write index
...
Keep separate counters for the ringbuffer and stream read/write
indexes.
The ringbuffer has 32 bits indexes while the pulse server is required
to keep 64 bit read/write indexes.
Also handle invalid seek flags.
Fixes #1331
2021-06-21 10:50:23 +02:00
Barnabás Pőcze
80e3da9b01
pulse-server: add missing minus sign
...
Noticed by @QuLogic.
Fixes: 87c00a6f00 ("pulse-server: add missing EWOULDBLOCK check")
2021-06-19 17:28:03 +00:00
George Kiagiadakis
59407d2f08
includes: update all references to extensions to point to pipewire/extensions
...
This also brings the advantage that all tools, examples, modules, components
can also be compiled standalone out-of-tree using libpipewire from the system
2021-06-18 17:54:18 +03:00
Wim Taymans
bbbc79647f
pulse-server: return INTERNAL error for ENFILE/EMFILE
2021-06-18 15:56:55 +02:00
Wim Taymans
def0caf281
pulse-server: handle out-of-files better
...
When we don't have enough files to accept the connection, clear the
_IN flag so that we don't try to accept if over and over again.
When a client disconnects, set the flag again so that we try to
accecpt new connections again.
See #1305
2021-06-18 15:26:20 +02:00
Wim Taymans
38c721993f
pulse-server: limit the amount of connections
...
Set to 64, like pulseaudio. We might want to configure this.
See #1305
2021-06-17 18:36:28 +02:00
Barnabás Pőcze
58e254ec63
pulse-server: module-zeroconf-publish: remove unnecessary emit
...
Since !737 it is not required of modules to emit the "loaded"
event if they can load immediately, therefore remove the
unnecessary `module_emit_loaded()` call.
Furthermore remove redundant log messages as well.
2021-06-16 16:40:57 +02:00
Wim Taymans
f43c57afdb
pulse-server: add context listener last
...
Add if after we have done everything else because if there is an
error we don't remove it and there will be an invalid hook registered
in the context.
2021-06-16 12:17:39 +02:00
Sanchayan Maity
96c77e1f2f
pulse-server: Implement module-pipe-source
2021-06-16 08:05:51 +00:00
Sanchayan Maity
d5ee0ad8cc
module-pipe-sink: Fix usage of spa_strerror
...
spa_strerror() works with negative error codes and async spa results.
2021-06-16 13:30:48 +05:30
Sanchayan Maity
4be1981f54
module-protocol-pulse: Clean up unused #define ERROR_RETURN
2021-06-15 10:54:48 +05:30
Wim Taymans
b6559289f1
pulse-server: fix compilation on some compilers
2021-06-14 15:43:32 +02:00
Wim Taymans
1bc383a7b7
pipewire-pulse: also store format/channels for sources
2021-06-12 20:30:49 +02:00
Wim Taymans
ba402209ba
pulse-server: use PulseAudio name for format and channels
...
Use the pulseaudio names for the format and channels, like the real
pulseaudio.
2021-06-12 20:29:51 +02:00
Sanchayan Maity
cf93fd7f9a
module-protocol-pulse: Add Avahi zeroconf publish module
2021-06-12 17:56:49 +00:00
Sanchayan Maity
e66125ede0
module-protocol-pulse: Factor out some common code
...
Factor out some of the common code that will be required for zeroconf
support next.
2021-06-12 17:56:49 +00:00
Barnabás Pőcze
bd6f63fecd
pulse-server: improve module loading
...
Modules no longer need to emit the "loaded" event manually
if they can load immediately. In that case, the module loading
code will take care of emitting the event. If they can't,
they must return an async spa result, and emit the "loaded" event
when they see fit.
Fixes #1232
2021-06-11 20:50:30 +02:00
Barnabás Pőcze
4d02233ff3
pulse-server: don't broadcast remove event when a module wasn't loaded
2021-06-11 20:50:30 +02:00
Barnabás Pőcze
f26358e958
pulse-server: module-simple-protocol-tcp: remove unnecessary struct member
2021-06-11 20:50:30 +02:00
Barnabás Pőcze
3eaea123f9
pulse-server: module-simple-protocol-tcp: add module listener
2021-06-11 20:50:30 +02:00
Barnabás Pőcze
12359b490d
pulse-server: module-null-sink: provide fallback name
...
If no `sink_name` has been specified, use "null-sink" to avoid a
NULL pointer dereference later in the function.
2021-06-11 20:50:30 +02:00
Barnabás Pőcze
09c162c8bf
pulse-server: module-null-sink: add missing version to events struct
2021-06-11 20:50:30 +02:00
Barnabás Pőcze
6f5b089767
pulse-server: clear hook list when module is freed
...
Moreover, rename the hook list to "listener_list".
2021-06-11 20:50:30 +02:00
Barnabás Pőcze
d9befc0792
pulse-server: eliminate some memory leaks in modules
2021-06-11 20:50:30 +02:00
Barnabás Pőcze
1d5fb2a7db
pulse-server: remove unnecessary struct members
2021-06-11 20:50:30 +02:00
Barnabás Pőcze
cd0eb829dd
pulse-server: remove redundant log messages from modules
...
The same information is printed in
* `on_module_loaded()`,
* `module_load()`, and
* `module_unload()`.
2021-06-11 20:50:30 +02:00
Nicolai Syvertsen
01875ad223
pipewire-pulse: set description
...
Some applications like TeamSpeak crash when this isn't set.
2021-06-10 22:21:26 +02:00
Arun Raghavan
08daf3f4f4
pulse-server: Add a module-echo-cancel
...
Fairly straightforwad module to load libpipewire-module-echo-cancel
2021-06-05 17:54:02 +00:00
Wim Taymans
2a8b7594bc
pulse-server: avoid overflow
...
Make sure the requested bytes never go below 0.
See #1258
2021-06-04 09:13:43 +02:00
Barnabás Pőcze
e65afe8fa2
pulse-server: module-combine-sink: remove hooks
...
Remove hooks when the module is unloaded to avoid
use-after-free issues. Remove the cleanup source as well.
Fixes #1259 .
2021-06-04 06:55:08 +00:00
Wim Taymans
669fbf10c1
fix some leaks in error paths
2021-06-03 20:33:59 +02:00
George Kiagiadakis
131832d441
pulse-server: suffix TAG_USEC constants with LL, as they must be 64-bit
...
Fixes protocol errors on arm
2021-06-03 17:36:19 +03:00
Peter Hutterer
71e0cfb5fa
pipewire: allow NULL pointers in pw_free_strv()
...
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
2021-06-02 10:56:46 +00:00
Peter Hutterer
e0471c6757
pipewire: allow NULL pointers in pw_properties_free()
...
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
Patch generated with concinelle with a few manual fixes.
2021-06-02 10:56:46 +00:00
Barnabás Pőcze
4c13eced55
pulse-server: detach clients from server
...
When the server or client goes away, detach the client
from the server to avoid potential use-after-free issues
that might occur if the client causes the
unloading of the server it is connected to.
E.g.:
pactl load-module module-protocol-native-tcp port=4713
pactl -s localhost:4713 unload-module module-native-protocol-tcp
See #1240 .
2021-06-01 22:11:49 +02:00
Wim Taymans
3889ea5277
pulse-server: add ref to client while processing
...
Add a ref to the client while processing messages. This way we don't
destroy the client if we destroy the server it is on.
Fixes #1240
2021-06-01 17:48:24 +02:00
Wim Taymans
102b77ea03
pulse-server: don't request already requested data
...
When we are flushing, don't ask for already requested bytes
or else we end up with too much data in our buffer.
Fixes #1243
2021-06-01 16:59:00 +02:00