Commit Graph

11055 Commits

Author SHA1 Message Date
Barnabás Pőcze
3c6d1686ca meson.build: add "-Werror=return-type" 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
edbf2dcb4d meson.build: require strict prototypes 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
12a8a916dd meson.build: make old stype defs/decls errors 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
8c17a6626d treewide: mark some functions static
These were found by enabling the "missing-declarations" warning.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
ab6ff1bcde spa: libcamera: use init list when calling generateConfiguration()
Pass an initializer list to `Camera::generateConfiguration()` instead
of constructing a vector and adding the single element "manually".
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
6275269f09 spa: bluez: remove some unused variables 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
f6ea5421e6 spa: bluez: do not open-code asprintf() 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
605404c781 spa: bluez: device_stop_timer(): remove redundant decl
Also move the declaration of `media_codec_switch_free()`
up to the beginning of the file, near the other decls.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
0ed8880489 spa: bluez: modemmanager: do not use old style declaration 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
abbdcf1854 spa: bluez: mark modemmanager stub functions static inline 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
ac5dfbe197 pipewire-jack: include "jack/intclient.h"
So that definitions are checked against declarations.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
0eb463ab98 pipewire: module-client-device: include "client-device.h" in "resource-device.c"
So that definitions are checked against declarations.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
eaad2b5a87 pipewire: module-avb: include "avb.h" in "descriptors.h"
So that the "avb.h" header file is self-sufficient.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
c57afbccc1 pipewire: module-avb: add some missing declarations 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
5b05c1c430 pipewire: module-avb: include "avb.h" in "avb.c"
So that definitions are checked against declarations.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
db510e769a pipewire: module-avb: add missing "stddef.h" include in "avb.h"
Including "stddef.h" is needed for `size_t`.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
12be42ed6b pipewire: module-netjack2-manager: remove unused module_schedule_destroy() 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
34809d3081 pipewire: module-netjack2-driver: remove unused module_schedule_destroy() 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
0a00d9c4d7 pipewire: module-ffado-driver: remove unused module_schedule_destroy() 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
0f70256230 pulse-server: include "reply.h" in "reply.h"
So that definitions are checked against declarations.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
3b4a255dec pulse-server: format_info_from_spec(): remove redundant decl 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
1bb714b95e pipewire: utils: make_random(): do not use errno
The function already returns `ssize_t`, so do not use `errno`
to communicate the reason for failure, instead, return the
negative errno.

`pw_getrandom()` was inconsistent in this regard because
sometimes it simply returned a negative errno without
setting `errno`. This change fixes that as well.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
5c0a60af27 pipewire: utils: include "private.h"
So that the definition of `pw_random_init()` is
checked against the declaration.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
3feb6762e4 pipewire: utils: pw_random_init(): do not use old style declaration 2023-07-03 19:40:25 +02:00
Barnabás Pőcze
f8344a3908 pipewire: impl-module: only stat if necessary
On some filesystems, the directory entry type is immediately
available, so use that to check if the entity is a directory,
and only use `stat()` when the entity type cannot be determined
from the directory entry.
2023-07-03 19:40:25 +02:00
Barnabás Pőcze
f82f215bf7 pipewire: modules: add missing "config.h" include in "flatpak-utils.h" 2023-07-03 19:40:25 +02:00
Barnabás Pőcze
54a9b30ed3 pipewire: proxy: remove pw_proxy_get_core()
The above function is not declared in any header files,
nor used by anything, so remove it.
2023-07-03 19:40:25 +02:00
Barnabás Pőcze
aed06dff67 pipewire: thread: include "private.h"
So that the definition of `pw_thread_fill_attr()` is
checked against the declaration.
2023-07-03 19:40:25 +02:00
Barnabás Pőcze
3bb32fb592 pipewire: pw_context_find_export_type(): remove redundant decl
This function is already declared in "context.h".
2023-07-03 19:40:25 +02:00
Barnabás Pőcze
e917dc65a0 pipewire: include "i18n.h"
So that definitions are checked against the declarations.
2023-07-03 19:40:25 +02:00
Barnabás Pőcze
5deb6ccede pipewire: conf: add missing include guard 2023-07-03 19:40:25 +02:00
Wim Taymans
927eb64177 alsa: use get_avail() recover logic
Always use get_avail() and then only fetch the hires timestamp when
enabled to enhance the delay reporting. This way we also recover from
errors from snd_pcm_avail() instead of ignoring them.

This should make the recover after mmap_begin obsolete but we'll leave
that just to be safe.
2023-07-03 17:08:08 +02:00
Wim Taymans
c34a987076 pulse-server: add option to disable fix_ flags
Document the pulse.fix properties.
Add an option to disable handling of the FIX flags when the pulse.fix.
property is set to an invalid value/0.

See #3317
2023-07-03 16:39:32 +02:00
Pauli Virtanen
ff5f6d908b bluez: allow buffers with maxsize < duration*frame_size
Buffer sizes smaller than one cycle are possible, so don't assert that.
Instead, just provide as much samples as fits to the buffer.

If we are driver when this happens, emit a warning (once).  Similarly to
ALSA, as driver we produce only one buffer at cycle start, and no new
buffers in process. If the whole cycle doesn't fit into the buffer,
recording probably will be broken and we want some debug when there will
be a bug report about that.
2023-07-03 13:56:20 +00:00
Wim Taymans
4bb85ef6c9 module-rtp: don't use sap port as src port
We bind to the src addr (the interface addr) and so we need a new unused port.
2023-07-03 12:35:36 +02:00
Wim Taymans
eaaa0cd99e modules: improve some docs 2023-06-30 21:44:49 +02:00
Wim Taymans
c13696aca1 filter-chain: simplify biquads 2023-06-30 17:49:29 +02:00
Wim Taymans
d5d8ebeaac pw-cat: only override properties when not already set
This makes it possible to override any of the properties with -P such as
the graph rate.
2023-06-30 16:24:13 +02:00
Wim Taymans
f612ffe8e4 pulse-server: use the fixed rate for graph rate
We need to use the format rate for calculating the buffer size and
latency but the fixated rate for the graph rate.

See #3317
2023-06-30 12:34:25 +02:00
Wim Taymans
91ac3acf3d pulse-server: debug the fixed format/rate/channel 2023-06-30 12:34:25 +02:00
Barnabás Pőcze
0e823d8a0f pipewire: core: static assert member order requirement
The pw_proxy member of pw_core must be the first because the
pw_core object is freed via pw_proxy_destroy() -> pw_proxy_unref().
2023-06-29 23:57:49 +02:00
Barnabás Pőcze
4bec3b56d4 pipewire: pw_proxy_init(): take pointer to core
`pw_proxy::core` must be initialized for `pw_proxy_init()`
to succeed, so take it as a parameter instead of relying
on the caller to initialize that field beforehand.
2023-06-29 23:57:49 +02:00
Barnabás Pőcze
e299534929 pipewire: log: do not generate parentheses around variable decls
It causes "warning: unnecessary parentheses in declaration of ..."
warnings in C++.
2023-06-29 23:57:49 +02:00
Barnabás Pőcze
8847b537a4 pipewire: core: remove redundant member
`pw_core::core` was initialized to point to itself, it
wasn't changed, and nothing really used it. And the only
user already had a pointer to the core object. So remove it.
2023-06-29 23:57:49 +02:00
Barnabás Pőcze
2abd3432b8 pulse-server: module-combine-sink: remove redundant member
`module_combine_sink_data::info` member has not been used
since 782e0dfb1f, so remove it.
2023-06-29 23:57:48 +02:00
Barnabás Pőcze
4a555ed6ff spa: bluez: backend-native: fix a memory leak
In `_transport_create()`, if `spa_bt_transport_create()` failed
then `pathfd` would be leaked.
2023-06-29 23:57:48 +02:00
Barnabás Pőcze
2efccb3d01 pipewire: impl-metadata: replace open-coded vasprintf()
Simply use `vasprintf()` instead of manual `vsnprintf()` and `malloc()` calls.
2023-06-29 23:57:48 +02:00
Barnabás Pőcze
3506b7534c pipewire: parse_pw_debug_env(): split in place
There is no need to use `pw_split_strv()` since the string
is owned by the function, it can be split in place, so do that.
2023-06-29 23:57:48 +02:00
Barnabás Pőcze
656d8bbc72 pipewire: parse_pw_debug_env(): simplify empty string check 2023-06-29 23:57:48 +02:00
Wim Taymans
2963e7fd4c alsa: disable htimestamp when it seems to error too much 2023-06-29 16:40:21 +02:00