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.
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.
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>
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.
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.
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.
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.
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
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.
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
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
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.
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.
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.