Commit graph

6625 commits

Author SHA1 Message Date
Wim Taymans
12a3ea9539 jack: implement default latency handler
It combines all latency from one direction and sets it as the latency
for the other direction.

Also keep only one latency value per port, in the object.
2021-05-27 15:26:09 +02:00
Wim Taymans
07f8a0d275 impl-port: remove useless code
We already check for 0 as the undefined value in the combine
function.
2021-05-27 15:26:09 +02:00
Wim Taymans
9262f576d5 spa: fix unit test, add new object type 2021-05-27 15:26:09 +02:00
Wim Taymans
f383ac21dd pw-cat: remove debug 2021-05-27 15:26:09 +02:00
Wim Taymans
4af2014168 jack: add latency reporting
Rework the param handling a little.
Keep properties for ports. Use this in the client and port info.
Trigger the latency callback when the port latency changed.
Update the port latency when it changed.
2021-05-27 15:26:09 +02:00
Wim Taymans
bae0622311 filter-chain: pass latency param along
Intercept the latency param and pass it on the right stream.
2021-05-27 15:26:09 +02:00
Wim Taymans
d8e9a43b9c stream: handle Latency param
Handle the latency param and remember the latency. Add the latency
to the delay value in the time.

Also make it possible to add custom Latency params.
2021-05-27 15:26:09 +02:00
Wim Taymans
80d48ad3b6 link: recalc latency when the peer latency changed
Trigger a recalculation of the port latency when the peer port
latency changed.

This makes the latency update from a port propagate through the
pipeline.
2021-05-27 15:26:09 +02:00
Wim Taymans
cd58c51582 port: implement latency_changed event
Emit the latency changed event when the latency was updated.
2021-05-27 15:26:09 +02:00
Wim Taymans
0222e408e0 audioconvert: use the right latency param
We need to use the latency param of the port direction to configure
the other port.
2021-05-27 15:26:09 +02:00
Wim Taymans
b9b89b92b2 spa: add some latency helpers
Add more fields to the latency object.
Add methods to create, parse and process latency info.
2021-05-27 15:26:09 +02:00
Wim Taymans
0779862cda alsa-seq: add port latency reporting 2021-05-27 15:26:09 +02:00
Wim Taymans
cd32404e92 port: implement latency reporting some more
Implement a port recalculate latency method that takes the min
and max latency of all peer ports and sets that as the new port
latency.
When a link is made, let the output and input port recalculate
latencies.
Pass latency param in audioconvert.
2021-05-27 15:26:09 +02:00
Wim Taymans
b588cc6b03 jack: listen to latency updates on ports
Listen for the latency updates on ports and use this to report
latency.
2021-05-27 15:26:09 +02:00
Wim Taymans
1cd6d7b01d spa: Implement latency reporting
Implement latency reporting in alsa
Implement latency reporting on audioconf by passing on the latency
from the follower to outside of the adapter.
2021-05-27 15:26:09 +02:00
Wim Taymans
1a8f274a80 spa: add Latency param and object
Add a new latency param that contains a latency object.
The latency object contains the min and max delay from a port to
the terminal sink/source. It is also possible to express this
delay as a fraction of the quantum to avoid having to recalculate
the latency every time the quantum changes.
2021-05-27 15:26:09 +02:00
Wim Taymans
46ef88e520 spa: save the old change_mask and restore when emitting full
When we add a new listener to an object, it will emit the full state
of the object. For this it temporarily sets the change_mask to all
changes. Restore the previous state after this or else we might not
emit the right change_mask for the next listener.

Consider the case where one there are two listeners on an object.
The object emits a change and the first listener wants to enumerate the
changed params. For this is adds a new listener and then triggers the
enumeration. If we set the change_mask to 0 after adding the listener,
the second listener would get a 0 change_mask and fail to update
its state.
2021-05-27 15:21:44 +02:00
Peter Hutterer
c8c0a152b7 man: drop --name documentation from pipewire.1
Support for this was dropped in 80825aeaea
2021-05-27 11:27:39 +00:00
Peter Hutterer
265cad2704 pw-uninstalled: set PW_UNINSTALLED=1 so we can adjust the shell
This allows for easy configuration of the shell if we're inside
pw-uninstalled's shell, e.g. PS1="$PS1  ${PW_UNINSTALLED:+🪠}"
2021-05-27 11:27:17 +00:00
James Henstridge
733ad43d3f module-portal: direct GetConnectionUnixProcessID call to /org/freedesktop/DBus
The D-Bus specification says that the message bus accepts method calls
on other object paths for backwards compatibility, and may reject
security sensitive calls on unexpected object paths:

https://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-messages
2021-05-27 11:24:04 +00:00
Wim Taymans
de270ba87a README: Fix new IRC server link 2021-05-26 15:48:13 +02:00
Wim Taymans
653c60b7cc Change IRC server name 2021-05-26 15:41:38 +02:00
Wim Taymans
751f9a9ea0 dbus: make sure we don't unref a NULL dbus connection
See #1213
2021-05-26 10:52:38 +02:00
Wim Taymans
492caf4456 pulse-server: handle errors during create
If a stream is being created and an error occurs we always need to
reply with the pending create_tag.

Fixes #624
2021-05-26 10:44:59 +02:00
Wim Taymans
4e4294dc13 pulse-server: handle NULL dbus connection
Fixes #1224
2021-05-26 10:23:17 +02:00
Wim Taymans
f007ca475c pw-cli: handle failure to create context
Fixes #1234
2021-05-26 10:18:15 +02:00
Wim Taymans
8027c9225e context: log some more errors when config file fails 2021-05-26 10:17:40 +02:00
Peter Hutterer
e83f039833 alsa: free the strdup'd substring on error
n is the return value of pa_split()

Found by scan-build
2021-05-26 10:03:49 +02:00
Peter Hutterer
bc64b32798 bluez: fix a memleak on error
If the allocation failed, our strdup'ed path would leak.

Found by scan-build
2021-05-26 10:03:43 +02:00
Peter Hutterer
b64f0d581f doc: switch from .md to .dox files and impose some general structure
This is an attempt of breaking up the documentation, currently spread across
several pages. We're left with a few high-level topics with various things
grouped underneath those.

Further refinement is necessary, but this can now be done in incremental steps
over massive reworks.
2021-05-26 10:02:10 +02:00
Peter Hutterer
13bb152840 doc: fix a copy/paste-o 2021-05-26 10:02:10 +02:00
Peter Hutterer
46a39e0ba7 doc: switch the spa documentation to doxygen 2021-05-26 10:02:10 +02:00
Peter Hutterer
9ed9980fa2 doc: change the tutorials to doxygen sources
While doxygen can handle markdown pages, support for it is very limited:
markdown pages can only be included as a whole page, they get an automatic
title (custom titles are possible but aren't standard markdown) and it's not
possible to use \subpage without messing with the markdown again. Any markdown
page will thus end up as separate item in the doxygen output, not really
suitable for generating a good page hiearchy.

Let's switch the tutorial to use doxygen directly instead of markdown, short
of using code/endcode instead of markdown's ``` there isn't that much
difference anyway but it allows us to structure things nicer in the online
docs.
2021-05-26 10:02:10 +02:00
Peter Hutterer
fce28ac59b doc: remove duplicate tutorial reference 2021-05-26 10:02:10 +02:00
Peter Hutterer
6cf819ab1c doc: namespace the pipewire md files 2021-05-26 10:02:10 +02:00
Peter Hutterer
b00e524341 doc: rename design.txt to design.md
It's a valid markdown file, let's have only one file type here.
2021-05-26 10:02:10 +02:00
Peter Hutterer
f8243f3cc1 doc: move spa/foo.md to spa-foo.md
Flatten the hierarchy a bit to make it easier to handle.
2021-05-26 10:02:10 +02:00
Peter Hutterer
5e5b9e3050 conf: PIPEWIRE_CONFIG_DIR should take precedence if set
This matches the behavior of most applications - check environment variables
first, then fall back to the various built-in options (in our case xdg, /etc/
/usr/share, in that order).
2021-05-26 07:54:29 +00:00
Peter Hutterer
25a58fd939 examples: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
e1211e6a94 tools: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
0b5f19f1d2 pipewire: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
049eaac821 modules: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
07503410c7 stream: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
2cb7b19b7d pulse-server: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
f3f915e897 pipewire-alsa: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
5596e350ea pipewire-jack: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
4dd886188a alsa: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
6d19dd0162 pulse-server: if all transport methods failed, fail server creation
No point in keeping a server running if it doesn't listen to anything.
2021-05-26 07:46:55 +00:00
modula t
3aacc719b2 fix floating point exception when s->clock.position' is less than s->offset` 2021-05-26 07:46:14 +00:00
Peter Hutterer
851a64d8c8 doc: add spa to doxygen output
This requires a helper script: doxygen doesn't differ between static methods
and static inline methods. EXTRACT_STATIC defines whether it parses *any*
static method but we're currently using all C files as input files as well. We
cannot convince doxygen to just parse static inline functions in header files
so for SPA we hack around this: meson passes the spa headers to a shell script
with simply copies those changed to `/* static */ inline void (foo)` and doxygen
then runs on those header files.

The result: we get all spa functions added to your doxygen output at the cost
of a few sed calls.
2021-05-26 07:44:55 +00:00