Commit graph

6869 commits

Author SHA1 Message Date
Barnabás Pőcze
9aacd36f37 pipewire: properties: take const argument
Since these particular methods never modify the
lists they receive, make the arguments `const`.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
73ea24a356 pulse-server: module-pipe-source: don't queue partial samples
If the number of bytes read is not a multiple of the stride,
then partial samples may be queued. Avoid that by storing the
last partial sample (if any) in a separate buffer,
and only queue full samples.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
8a61374592 pulse-server: module-pipe-source: set error code when entity is not pipe
Previously, the code did not set any error code, leaving res = 0,
when the file existed but it wasn't a pipe. This resulted in no
status code being returned to the client.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
9076e3e80b pulse-server: module-pipe-source: do not unlink fifo if it was there
If the module did not create the FIFO, then it should not remove it.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
7cb7d8b15b pulse-server: module-zeroconf-publish: handle uname() failure gracefully
Only add the "uname=..." entry to the Avahi string list
if `uname()` succeeds.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
9994a763d6 pulse-server: module-zeroconf-publish: remove static
`sysname` need not be static since `avahi_string_list_add_pair()`
creates a copy, and no other parts of the code have reference to
`sysname` that would require static lifetime.

Furthermore, do not hardcode the size of the array.
2021-06-30 14:44:08 +02:00
Wim Taymans
324894e605 keys: add object.register property
Add a new object.register boolean property.

Make adapter and remote-note only register when object.register
is true.

Make stream and filter not register themselves. They are always
exported to a remote server and thus don't need local
registration.

Fixes #1309
2021-06-30 13:49:34 +02:00
Wim Taymans
2c5d89ff19 pw-cli: allow '-' for port/node in create-link
Passing a '-' as the port or node for create-link will omit sending
the property to create-link so we can check if the link factory handles
missing properties too.

See #1365
2021-06-30 11:52:57 +02:00
Wim Taymans
27b9f469b5 impl-port: avoid recalculating latency on destroying port
Fixes a crash.

Fixes #1371
2021-06-30 09:36:36 +02:00
Niklāvs Koļesņikovs
0436793299 doc/meson.build: pruning of unused find_program() 2021-06-29 17:23:37 +00:00
Niklāvs Koļesņikovs
e062c4d8de meson.build: adds summary() to optional programs 2021-06-29 17:23:37 +00:00
Wim Taymans
ae89ae093e acp: strip UCM alibpref from mapping
Strip the alibpref from the device string in the mapping name. This
name is used to generate the node name eventually and we don't want
this random identifier in it.

Fixes #1362
2021-06-29 17:43:00 +02:00
Wim Taymans
d1c6114423 media-session: don't try to link to the same link-group
Avoid linking streams to a node of the same link-group because that
would be a circular link.

Fixes #1360
2021-06-29 14:02:23 +02:00
Wim Taymans
c4971d17c4 keys: add node.link-group property
The node.link-group property marks streams that are internally linked
together in some way. It is used to relate the input and output streams
of some of the module streams.
2021-06-29 13:49:55 +02:00
Wim Taymans
6a0cf77985 NEWS: fix some spelling mistakes 2021-06-29 13:19:53 +02:00
Wim Taymans
5497d2d907 pw-cat: fix format string 2021-06-28 17:21:28 +02:00
Wim Taymans
82f2e85a0f fmt-ops: fix neon stereo resample 2021-06-28 17:20:50 +02:00
Wim Taymans
c43dabcc96 0.3.31 2021-06-28 15:32:38 +02:00
Barnabás Pőcze
84b9644ee3 spa: utils: defs: fix SPA_FOR_EACH_ELEMENT usage example
To iterate over an array of `T`, the iterator must be `(const) T *`,
so that the types are compatible when `T[]` decays into `T *`.

In the example when `struct foo *[]` decays, it becomes `struct foo **`,
which is not compatible with the the type of iterator, `struct foo *`.

Fix that by changing the type of the array to `struct foo[]`.
2021-06-28 15:07:02 +02:00
Wim Taymans
d6a569620c v4l2: DmaBuf and MemFd are mostly the same
If the caller asks for MemFd, pass a DmaBuf because it is mostly
the same for v4l2.

Not very correct but it's not yet trivial to fall back to memfd.
And this way we have something to give to the clients that will work
when the client asks for MemFd or MemPtr.
2021-06-28 14:55:05 +02:00
Wim Taymans
c68a7cd603 pulse-server: silence the ENOTSUP warnings
To stop the device restore extension warnings.
2021-06-28 12:43:31 +02:00
Wim Taymans
0d71068ab2 jack: make JACK use module-rt
It is more like how JACK2 does things.
We get FIFO scheduling by default and we don't get killed by RTKit
when doing long operations, which seem to be the case for many
plugins.
2021-06-28 12:24:03 +02:00
Wim Taymans
de99fc3515 module-rt: use FIFO scheduling
FIFO scheduling is recommended for RT usage these days.
2021-06-28 12:23:57 +02:00
Wim Taymans
4fb878e449 jack: name the thread-loop differently 2021-06-28 12:23:08 +02:00
Wim Taymans
c90bd14ede thread-loop: improve thread name
The thread name can only be 16 chars. We don't need to strdup the
name but copy and trunc into a fixed buffer.
We can also set the thread name right after we created the thread.
Emit a warning when we can't set the thread name
2021-06-28 12:23:08 +02:00
Wim Taymans
82f02dc502 jack: create threads with FIFO scheduling
Make jack_client_create_thread() create FIFO threads, like the
JACK implementation did. We should probably hook that into the
module-rt functions somehow.

Fixes #1349
2021-06-28 12:22:49 +02:00
Sanchayan Maity
d8b5ab13a5 modules: Allow roc source/sink to be used as native modules
Move the implementation of roc source and sink so that they can be used
as pipewire native modules and make the pulse module implementation use
those.
2021-06-28 12:21:34 +05:30
Barnabás Pőcze
d06a2e2140 spa: meson.build: look for libcamera under another name
libcamera commit ec7afef665a87eb389a5a4cb9ff35e9c24bbcc29 (2021-06-24)
changed the name of the generated pkg-config file from 'camera.pc'
to 'libcamera.pc'.

First look for the libcamera dependency under the new name 'libcamera',
and if that's not found, look for it under the older name 'camera'.

Fixes #1355
2021-06-27 18:24:15 +00:00
Pauli Virtanen
2b515b5e50 dbus: keep a ref to DBusConnection if reconnecting is not handled
Several places in the code don't handle reconnecting DBus connections
yet. In those cases, a ref to the DBusConnection handle needs to be
kept, so that there's no use-after-free if it gets freed by spa_dbus
if the connection is broken.

Adjust spa_dbus so that others keeping additional refs is safe.
2021-06-26 16:11:40 +03:00
Evgeniy Khramtsov
cb6dbd165a pulse-server: move defines to the common utils.h
Previous commit was an older version that got accidentally pushed.

Improves: 3ba62287ad
2021-06-25 19:08:26 +03:00
Evgeniy Khramtsov
3ba62287ad pulse-server: add missing definitions for FreeBSD
Define struct statfs and LOCAL_PEERCRED for FreeBSD.

Fixes: 62832609c1
2021-06-25 18:53:02 +03:00
Wim Taymans
417c9ab887 modules: add an example sink and source 2021-06-25 16:44:26 +02:00
Wim Taymans
aa4de60032 modules: pulse-tunnel can use RT_PROCESS
It writes samples to a ringbuffer and will not do any rt-unsafe
methods.
2021-06-25 15:51:30 +02:00
Niklāvs Koļesņikovs
de72ed5590
meson.build: adds V4L2 header and enablement reporting via summary()
Until now the 'v4l2' feature was not actually checking that its
required header has been found, this commit adds a check for
<linux/videodev2.h> and correctly reports both header status and whether
the feature itself ends up enabled (depends on libudev).
2021-06-25 15:13:07 +03:00
Niklāvs Koļesņikovs
b55bafae09
meson.build: move libcamera and libdrm summary() to 'Backend' section 2021-06-25 15:13:07 +03:00
Niklāvs Koļesņikovs
38d5de789d
meson_options.txt: disable vulkan option since it's not ready for use
According to George Kiagiadakis it being set to auto is an accident,
because the Vulkan support does not [yet] provide anything useful.
2021-06-25 15:12:27 +03:00
Ivan
0a02396995 meson: Make summary() respect vulkan headers detection
Fix false positive that caused by summary() checking only for vulkan
library but not headers.
2021-06-25 11:27:31 +00:00
Wim Taymans
0c14ec769f pulse-server: improve sink/source state
When a sink is RUNNING but there is nothing linked to the input it must
be the monitor that is keeping it active, report IDLE for the sink in
that case.

When a source is RUNNING but there is nothing linked to the output it
must be the sink part that is keeping it active, report IDLE for the
source.

Fixes #1345
2021-06-25 13:23:22 +02:00
Peter Hutterer
eb262beb22 doc: document the echo-cancel module 2021-06-25 08:42:24 +00:00
Peter Hutterer
4e3d155dc1 doc: document the access module 2021-06-25 08:42:24 +00:00
Peter Hutterer
b23dfc4dc1 doc: make the pipewire keys show up in the doxygen output 2021-06-25 08:42:24 +00:00
Peter Hutterer
f181232a61 doc: add the documentation infrastructure for pipewire modules
All empty pages for now but at least this makes them show up in the
documentation.
2021-06-25 08:42:24 +00:00
Peter Hutterer
9956637ce5 doc: drop unused variable from meson.build 2021-06-25 08:42:24 +00:00
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
Niklāvs Koļesņikovs
71d39e90ed meson: adds post meson setup/--reconfigure summary for auto features
As suggested by George Kiagiadakis, adds calls to summary() function
for each feature that is by default set to auto, so that an overview
of their effective state is printed at the end of meson setup or
meson --reconfigure command.

Currently ordering is a bit messy but tidying it up would detach
the summary() functions from the dependencies they rely on and could
be done later along with meson_options.txt re-ordering so that the
two match as much as possible.
2021-06-25 08:31:12 +00:00
Stefano Ragni
243d534476 dbus: fix bus type reported in logs 2021-06-25 08:26:00 +00:00
Peter Hutterer
c69ebf6361 meson.build: define cpp dependency as non-native
meson.build:93: WARNING: add_languages is missing native:,
  assuming languages are wanted for both host and build.

Doesn't matter for our use-case (compilation check only), so let's define it
as non-native.
2021-06-25 08:25:02 +00:00
Peter Hutterer
5e76f39e9d meson.build: move -D_GNU_SOURCE to the other hardcoded args
No need for this to be on its own line
2021-06-25 08:25:02 +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