Commit graph

14 commits

Author SHA1 Message Date
Wim Taymans
5e1e3fca1e modules: handle format parsing errors 2025-10-23 18:01:35 +02:00
Wim Taymans
fdc74df383 modules: use timer-queue in avahi-poll
Pass the pw_context to get to the shared queue and loop.
Patch up the users of avahi-poll.

Fixes #4913
2025-09-26 13:39:49 +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
Gleb Popov
44d92c21e5 Use if_indextoname() instead of less portable ioctl(SIOCGIFNAME) 2024-09-23 08:09:45 +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
Wim Taymans
5fff2c47a6 modules: improve docs some more for snapcast-discover
Fixes #4243
2024-08-29 10:18:36 +02:00
Wim Taymans
2ef3ced380 modules: improve snapcast discover docs
Fixes #4223
2024-08-23 15:50:53 +02:00
Wim Taymans
959491966a modules: fix doc
Fixes #4134
2024-07-22 13:21:27 +02:00
Wim Taymans
8cff77706a module-snapcast: don't hardcode the JSON message id
Use a counter to make it increment for each message.
2024-07-09 09:10:31 +02:00
Wim Taymans
f5512e8b88 module-protocol-simple: use interface address as server address
Move the address:port parsing code to the net helper. Add a default
address option.

Pass the interface address to protocol-simple and use this as the
default address for listening.

This makes sure that when the user passes tcp:3400 that we don't end up
publishing 0.0.0.0:3400 but the actual address of the interface we are
listening on so that the snapcast discover can use this to notify the
snapcast server.

Fixes #4093
2024-07-06 10:12:27 +02:00
Wim Taymans
26c1993e8a snapcast-discover: add snapcast discover module
The module detects remote snapcast servers and creates a new sink
with protocol-simple for each server.

It sets up a new stream on the server for the sink with JSON-RPC.
2024-05-23 12:41:53 +02:00