Commit graph

10195 commits

Author SHA1 Message Date
Wim Taymans 08b0ed6576 0.3.66 2023-02-16 10:18:28 +01:00
Wim Taymans 0511970537 jack: use 32 bits for frame times
JACK uses 32 bits for frame times so truncate our 64 bits position
to get the wraparounds right.
2023-02-16 10:16:36 +01:00
Robert Mader 353c1f709d gstpipewiresrc: make stream errors permanent
When pw_stream receives a proxy error it does not set its state to an
error state on its own, commenting:
```
we just emit the state change here to inform the application.
If this is supposed to be a permanent error, the app should
do a pw_stream_set_error()
```

Until now this was not done in the pipewiresrc, resulting in the
negotiation loop to not bail out after an error as a successive
`pw_stream_get_state()` did not return an error state.

Make the error permanent so negotiation errors make us take the
appropriate error paths.
2023-02-15 14:49:42 +01:00
Wim Taymans 965b220206 module-rtp: clear ringbuffer in resync
When we resync to the timestamp, clear the ringbuffer to avoid playing
old stale samples.
2023-02-15 11:08:08 +01:00
Wim Taymans aa3b776f6f module-rtp: resync after paused state
After the paused state, resync to the new clock time.
2023-02-15 11:06:01 +01:00
Wim Taymans dd0d3ac264 pw-cat: remove useless code
The data stride for encoded formats should be 1 and also placed in the
stride in the buffer (not 0). So there is really no difference with the
regular codepath.
2023-02-14 16:44:52 +01:00
Wim Taymans b9ddd54a98 pw-cat: don't read more than the requested frames 2023-02-14 16:44:52 +01:00
Niklāvs Koļesņikovs 5e0bfa0beb
RLIMITs: add support for generating limits.d files
This commit implements generating /etc/security/limits.d/20-pw-defaults.conf and
/etc/security/limits.d/25-pw-rlimits.conf files. The numbering is arbitrary and
may very well warrant being in the reverse order, however `man 5 limits.conf`
does not appear to specify the parsing order or even say exactly how multiples
matches will resolve, so the value can be adjusted later, if required.

The actual limit values, the match rule and even whether each file is to be
installed can be changed via the build system before compilation. Likewise
the files can be modified or (re)moved during distro package building phase.

The 20-pw-defaults.conf should only be installed on legacy systems lacking both
a modern kernel and up to date systemd, because all it does is set the current
Linux default. Accordingly its not installed by default.

Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
2023-02-14 17:37:59 +02:00
Niklāvs Koļesņikovs d082ec0809
src/modules/meson.build: fix indentation and remove obsolete comment
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
2023-02-14 17:37:59 +02:00
Barnabás Pőcze 2b6541f503 spa: support: send TID to systemd journal
Knowing which thread posted which log message can
be useful, so send the TID to the systemd journal.

The `TID` field is explicitly listed on
https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html#TID=
2023-02-14 11:38:52 +00:00
Wim Taymans 58812103f3 test: add another channelmix test 2023-02-14 11:57:04 +01:00
Wim Taymans 2895961b48 audioconvert: improve channelmix with unknown layouts
Use a 0 mask to handle unknown layouts. When the source or destination
is an unknown layout, pair, distribute or average. When pairing, keep
track how we paired and use that to construct the matrix later.

This fixes [ UNK UNK ] -> [ FL FR ] mapping by pairing.
2023-02-14 11:57:04 +01:00
Barnabás Pőcze e09b97edc4 pipewire: impl-core: actually return created object
Actually return the pointer to the created object
from `impl-core.c:core_create_object()` instead of
returning a NULL pointer.

This has not caused issues because the return value
is not checked anywhere.
2023-02-13 19:55:45 +01:00
Wim Taymans 2865e40618 filter: support pw_filter_trigger_process()
Add pw_filter_trigger_process() as a way to implement a driver node.
Also add a function to check if a filter is a driver.
2023-02-13 17:58:42 +01:00
Wim Taymans c6a977f793 filter: change_mask is 64 bits 2023-02-13 17:21:58 +01:00
Wim Taymans 2469a69f98 filter: clean up param indexes
Prefix param index with PORT_ and NODE_ depending on what they are used
for.
2023-02-13 17:19:25 +01:00
Wim Taymans 68f6d4d6de log: improve format debug log
Use the format debug log instead of generic pod log
2023-02-13 17:15:04 +01:00
Wim Taymans b93c3fb0c5 spa: improve param doc 2023-02-13 17:15:04 +01:00
Yuri Chornoivan 7de00c87e2 i18n: Update Ukrainian translation 2023-02-11 19:03:23 +00:00
Quentin c2329a2ed6 Update Occitan translation 2023-02-10 23:15:23 +00:00
Dmitry Sharshakov 57f19959a7 meson: drop unnecessary option
Co-authored-by: Barnabás Pőcze <pobrn@protonmail.com>
2023-02-10 09:21:58 +00:00
Dmitry Sharshakov 3d971b4024 meson: allow building libcamera from source as a subproject
Many distributions provide outdated libcamera versions. This change should also help making changes to libcamera itself.

System libcamera is kept a default to avoid breaking existing build processes relying to packaged libcamera.
2023-02-10 09:21:58 +00:00
Dmitry Sharshakov 6d712d17e7 meson: libcamera: remove libdrm dependency
Seems to no longer be used in plugin headers, thus not a direct dependency.
2023-02-10 09:21:58 +00:00
Barnabás Pőcze 1cde814cdf spa: libcamera: remove unused libcamera-client.c 2023-02-09 22:02:48 +01:00
Wim Taymans 274b63e972 jack: improve frame to and from time functions
Also support times and frames before the current one by doing a signed
diff.
Also take into account the rate adjusted period time.
2023-02-09 16:44:47 +01:00
Pauli Virtanen b94cb5d99d bluez5: fix BAP current profile
Fix BAP profiles again: make sure the current profile is indicated
properly.
2023-02-07 22:54:37 +02:00
Wim Taymans 344be779b1 filter-chain: support single copy plugin
When input and output are linked with a copy function, don't disable the
node but add it to the valid graph inputs.
2023-02-07 14:14:55 +01:00
Wim Taymans 72242dc91f filter-chain: add invert plugin
To invert the polarity of a signal.

See #3008
2023-02-07 13:46:06 +01:00
Wim Taymans fda829a1fa conf: fixup config comments
Use () to mark optional fields to avoid confusion with [] for arrays.
Add contition fields where available.
2023-02-07 10:35:43 +01:00
Wim Taymans 5552ff7fdd conf: add conditions to modules, exec and objects
Make it possible to conditionally load modules, objects and exec by
adding match rules for context properties.

This makes it possible to only load a module when  property is set,
which makes it possible to unset a property in a local config to disable
module loading. One example is the x11 modules, which can then be
disabled on a per user bases based on config overrides.
2023-02-07 09:50:46 +01:00
Wim Taymans b9999b292d channelmix: improve mixing setup
Handle MONO layout as a real layout, not just like FC. This means it
does not share the FC mixing weights.
Only distribute and combine MONO channels when the target is also
MONO, enable normalization in this case.
Otherwise downmix and upmix the mono channels like any other channel,
which will make it respect the upmix and other settings.
Change some tests with this new way of doing things.

Fixes #3010
2023-02-06 21:05:23 +01:00
Pauli Virtanen 987b772b97 bluez5: don't claim sbc is supported when there's no A2DP at all
Handle failure to register legacy A2DP endpoints.
2023-02-06 06:35:40 +00:00
Pauli Virtanen cfee662f0b bluez5: fix BAP profiles for source/duplex cases
Codec switching does not currently work properly for source/duplex.
With BAP it's also possible only when we're BAP client.

When we can't codec switch, emit the "codecless" BAP profile.
2023-02-06 06:35:40 +00:00
Huang-Huang Bao 4b60569c4a gst: correct buffer & meta offset calculation
The offset in GstVideoMeta point to location of merge-mapped buffer memories (see "gst_buffer_find_memory()") instead of raw memory location for each plane, make adjustment to comply this rule.

Also some cleanups.

Fixes 023577e391
2023-02-06 06:34:14 +00:00
Thomas Weißschuh 4f9f32084c module-combine-stream: add missing proxy event version 2023-02-06 06:07:13 +00:00
Pauli Virtanen 417f1dc02a bluez5: fix dependency checking
Don't do subdir_done() in bluez5/meson.build, since the presence of
dependencies is supposed to be checked in spa/meson.build.
2023-02-05 09:36:45 +00:00
Wim Taymans 73cc5d1dde libcamera: map controls to standard ids
Map the control id from libcamera to standard pipewire ones and
vice versa.
2023-02-05 10:27:47 +01:00
Wim Taymans 50a1e2db22 utils: remove () around variable declaration
c++ warns about this.
2023-02-05 10:27:12 +01:00
Barnabás Pőcze 06df127ad9 pipewire: mem: refuse invalid file mapping
Refuse to map a file if the specified `offset + size` would
be bigger than the size of the file. This prevents receiving
SIGBUS when the consumer tries to make an incorrect mapping.

See #2617 #2914 #3007
2023-02-03 22:44:32 +01:00
Dmitry Sharshakov d42656c0d9 filter-chain: add example configs for spatializer 2023-02-03 13:49:18 +03:00
Wim Taymans caf58ecffb keys: don't use macro to define keys
Make PW_ENABLE_DEPRECATED use the symbol directly without using the
PW_DEPRECATED macro to work around rust compiler bug.

See #2952
2023-02-03 10:26:47 +01:00
Wim Taymans 5ee7be9534 conf: revert to 32 min-quantum
ae077a4967 accidentally changed the
default min-quantum to 16, revert it back to 32 because 16 is really
low.

See #2791
2023-02-03 09:12:51 +01:00
Huang-Huang Bao 023577e391 gst: add buffer video meta support
Fixes video buffer strides handling.
This enables passing of image datas with right line padding.
2023-02-03 07:23:35 +00:00
Thomas Weißschuh 38f88d3d25 thread-loop: constify timespec argument
This makes it easier for the user to see that pw_thread_loop_get_time()
does not modify the timespec so that it can be reused over multiple
calls.
2023-02-03 00:28:56 +00:00
Frédéric Simonis 04e769ff35 Add source example for the loopback module 2023-02-02 19:10:42 +00:00
Wim Taymans 8ffb74c8e2 alsa: keep more headroom when rate matching
When we are rate matching, keep some more headroom to make sure we
have enough data for the adaptive resampler.

Fixes crackling when following the dummy node and probably also when
following another capture device.
2023-02-02 20:06:58 +01:00
Wim Taymans 7e2dab876a module-rtp-sink: handle buffer offset and size correctly 2023-02-02 16:08:40 +01:00
Wim Taymans aed394cf89 module-rtp: use timestamps as ringbuffer index
Use the timestamps directly as the ringbuffer index. We can save some
conversions to bytes and there is a direct mapping to RTP timestamp,
clock position and ringbuffer index.

Simplify the source a little. Remove the buffering state, we always
start with read and write pointers separted by the target buffering.
2023-02-02 15:54:53 +01:00
Wim Taymans 16e995be26 module-rtp: remove some useless debug 2023-02-02 12:12:01 +01:00
Wim Taymans b50fa83325 module-rtp-sink: improve sync
Always write to index of the clock, not just for the first packet.
This ensure the timestamp on the packet always matches the time it was
processed in the graph.
2023-02-01 20:06:19 +01:00