Commit graph

854 commits

Author SHA1 Message Date
Peter Hutterer
0880ff9a84 spa: add spa_strendswith (copy from protocol-pulse)
Useful function, let's make it generally available.
2021-06-25 08:42:24 +00:00
Barnabás Pőcze
887876bea8 pulse-server: add missing forward declarations
Part of !776.
2021-06-25 03:24:00 +02:00
Barnabás Pőcze
378ba0d51b pulse-server: clean up includes
* use <> for pipewire includes
* add missing includes
* move "manager.h"

Part of !776.
2021-06-25 03:23:54 +02:00
Barnabás Pőcze
0e48ae9f50 pulse-server: remove unnecessary struct member and includes
Part of !776.
2021-06-25 03:23:51 +02:00
Barnabás Pőcze
480fcbbba9 pulse-server: module-zeroconf-publish: use <> for system include
Part of !776.
2021-06-25 03:23:45 +02:00
Barnabás Pőcze
e966b1d6f2 pulse-server: split out message-handler
Part of !776.
2021-06-25 03:23:41 +02:00
Barnabás Pőcze
c9f5deb81d pulse-server: split out module handling
Part of !776.
2021-06-25 03:23:37 +02:00
Barnabás Pőcze
c49ae39888 pulse-server: split out extension handling
Part of !776.
2021-06-25 03:23:35 +02:00
Barnabás Pőcze
d366487116 pulse-server: split out server creation and socket handling
Part of !776.
2021-06-25 03:23:32 +02:00
Barnabás Pőcze
49d31ea0af pulse-server: split out reply, operation, client, stream
Part of !776.
2021-06-25 03:23:27 +02:00
Barnabás Pőcze
b2ec1fb60a pulse-server: split out message handling
Part of !776.
2021-06-25 03:23:24 +02:00
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