Commit graph

26 commits

Author SHA1 Message Date
Wim Taymans
5e1e3fca1e modules: handle format parsing errors 2025-10-23 18:01:35 +02:00
Sam James
2cec77e7df *: unify config.h handling
config.h needs to be consistently included before any standard headers
if we ever want to set feature test macros (like _GNU_SOURCE or whatever)
inside. It can lead to hard-to-debug issues without that.

It can also be problematic just for our own HAVE_* that it may define
if it's not consistently made available before our own headers. Just
always include it first, before everything.

We already did this in many files, just not consistently.
2025-05-30 10:24:13 +00:00
Wim Taymans
e3a7035e8f spa: make helper to init spa_audio_info_raw from dict
Make a function that can initialize raw audio info from a dict and fill
in the defaults. We can use this in many of the modules when the audio
format is parsed.
2024-09-18 15:48:27 +02:00
Wim Taymans
e2991f6398 json: add helper function to parse channel positions
Use the helper instead of duplicating the same code.

Also add some helpers to parse a json array of uint32_t

Move some functions to convert between type name and id.
2024-09-18 09:54:34 +02:00
Pauli Virtanen
ec5684302c doc: in user-facing config examples, indicate which file it goes into
Add suggestions for config fragments in config file examples, as
applicable.
2024-09-16 15:51:59 +00:00
Wim Taymans
cd81b5f39a spa: add spa_json_begin_array/object and relaxed versions
Add spa_json_begin_array/object to replace
spa_json_init+spa_json_begin_array/object

This function is better because it does not waste a useless spa_json
structure as an iterator. The relaxed versions also error out when the
container is mismatched because parsing a mismatched container is not
going to give any results anyway.
2024-09-16 09:50:33 +02:00
Pauli Virtanen
fdcb02ed75 modules: add Module Name section to the module reference docs 2023-11-20 08:41:13 +00:00
Pauli Virtanen
eca773fc12 modules: strip "PipeWire Module:" from Doxygen page name
Make them appear nicer in the output.
2023-11-19 16:39:15 +00:00
Wim Taymans
07e6f44e58 modules: clean up USAGE arguments
use () to mark optional arguments to avoid confusion with arrays.
Add some more optional arguments.
2023-03-22 16:35:55 +01:00
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Wim Taymans
ca1b32393d pipewire: expose pw_impl_module_schedule_destroy()
And then remove the custom code in the example sink/source.
2023-01-20 16:10:06 +01:00
Wim Taymans
f472fd736d fix includes
Only include debug we need. We usually only need the debug types.
2023-01-18 13:12:16 +01:00
Wim Taymans
60cbc44526 modules: improve docs 2022-06-23 12:48:45 +02:00
Wim Taymans
c8b8b24a9c modules: fix format parsing
Use the same logic for parsing the format.
2022-06-23 12:39:51 +02:00
Wim Taymans
a84412ccb7 modules: improve parsing of rate and channels 2022-06-04 18:54:50 +02:00
Wim Taymans
1e46d114d0 modules: update docs 2022-04-24 11:29:46 +02:00
Wim Taymans
d1207422e0 make NODE_WANT_DRIVER=true the default
So that all nodes attach to some driver to be scheduled.

For the virtual sink/sources this is a normal thing and we can remove
the custom settings.

For normal stream, this now makes it possible to link pw-play directly
to pw-record and have it transport data.

Fixes #1761
2022-04-21 10:14:53 +02:00
Wim Taymans
cc39644253 modules: add pid to unique name
So that modules loaded from different processes don't generate the
same node names.
2022-04-01 15:22:48 +02:00
Wim Taymans
4ae94a6ca6 modules: use NODE_WANT_DRIVER=true instead of NODE_GROUP
For the modules that require a driver, don't add ourselves to
the pipewire.dummy group but instead just use the NODE_WANT_DRIVER
property to be assigned to a driver.

This makes it possible for the nodes to move to another driver than the
dummy driver (which has very high priority) and it avoids resampling in
cases where the nodes are linked to an audio source or sink.
2022-03-30 14:56:28 +02:00
Wim Taymans
7e42c905a8 remove the rate_match io
Now that the stream provides us with a requested size, we don't need to
use the rate_match anymore.
2022-03-29 09:57:49 +02:00
Barnabás Pőcze
4d4c6f20df pipewire: remove work queue checks
Since now `pw_context_get_work_queue()` cannot
fail, the checks can be removed.
2022-02-18 12:30:53 +01:00
Peter Hutterer
32fb369b66 modules: switch more modules to the new property helpers 2021-10-13 07:12:00 +00:00
Peter Hutterer
14112fd168 modules: use the new topic-based logging from various pipewire modules 2021-09-28 09:35:39 +02:00
Wim Taymans
abf37f618e modules: ensure node.name and description are set
Most apps need this and some even crash when they are not set.
2021-08-20 09:26:17 +02:00
Wim Taymans
6e44c081b0 modules: silence some useless warnings
Fixes #1423
2021-07-19 18:30:22 +02:00
Wim Taymans
417c9ab887 modules: add an example sink and source 2021-06-25 16:44:26 +02:00