pipewire/spa/plugins/bluez5
Wim Taymans d4581755e6 spa: Improve JSON error reporting
Add struct spa_error_location that holds information about some parsing
context such as the line and column number, error and line fragment
with the error.

Make spa_json_get_error() fill in the spa_error_location instead. Add
some error codes to the error state and use this to add a parsing reason
to the location.

Add a debug function to log the error location in a nice way. Also
add a FILE based debug context to log to any FILE.

Replace pw_properties_check_string() with
pw_properties_update_string_checked() and add
pw_properties_new_string_checked(). The check string behaviour can still
be done by setting props to NULL but the main purpose is to be able to
avoid parsing the json file twice in the future.

When using the old pw_properties_update_string(), log a warning to the
log when we fail to parse the complete string.

Use the new checked functions and the debug functions to report about
parsing errors in the tools and conf parsing.

This gives errors like:

```
> pw-loopback --playback-props '{ foo =  [ f : g ] }'
error: syntax error in --playback-props: Invalid array separator
line:      1 | { foo =  [ f : g ] }
col:      14 |              ^
```
2024-03-27 15:42:29 +01:00
..
a2dp-codec-aac.c bluez5: deprioritize AAC-ELD since it's untested 2024-02-01 08:06:06 +00:00
a2dp-codec-aptx.c bluez5: aptx-ll: produce 7.5ms packets 2024-02-05 19:34:47 +02:00
a2dp-codec-caps.h bluez5: support Google's Opus A2DP vendor codec 2024-02-04 12:58:40 +02:00
a2dp-codec-faststream.c pod-builder: move some code around to help gcc 13 2023-04-20 17:52:27 +02:00
a2dp-codec-lc3plus.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
a2dp-codec-ldac.c pod-builder: move some code around to help gcc 13 2023-04-20 17:52:27 +02:00
a2dp-codec-opus-g.c bluez5: support Google's Opus A2DP vendor codec 2024-02-04 12:58:40 +02:00
a2dp-codec-opus.c bluez5: disambiguate the two Opus codecs 2024-02-04 12:57:31 +02:00
a2dp-codec-sbc.c bluez5: SBC-XQ does not need its own endpoint 2024-02-04 12:57:31 +02:00
backend-hsphfpd.c spa: move dbus helpers out of bluez plugin 2024-02-05 13:03:20 +00:00
backend-native.c spa: move dbus helpers out of bluez plugin 2024-02-05 13:03:20 +00:00
backend-ofono.c spa: move dbus helpers out of bluez plugin 2024-02-05 13:03:20 +00:00
bap-codec-caps.h bluez5: bap: support ChannelAllocation parameter from BlueZ 2024-01-08 10:09:13 +00:00
bap-codec-lc3.c bluez5: lc3: clean up some sanity checks 2024-02-05 08:59:18 +00:00
bluez-hardware.conf bluez5: add quirk for SoundCore mini2 2024-01-14 13:21:34 +02:00
bluez5-dbus.c bluez: print a nicer warning when the bluez service is not available 2024-03-25 14:54:30 +00:00
bluez5-device.c spa: bluez: fix whitespaces 2024-02-05 20:01:21 +01:00
codec-loader.c bluez5: support Google's Opus A2DP vendor codec 2024-02-04 12:58:40 +02:00
codec-loader.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
dbus-monitor.c bluez5: fix glib signal disconnect 2023-04-14 20:06:57 +03:00
dbus-monitor.h chore: fix warnings shown by Clang 16 2023-05-09 08:31:56 +00:00
decode-buffer.h bluez5: split rate control out of decode-buffer 2023-04-03 16:35:22 +00:00
defs.h bluez5: further HFP cleanups 2024-01-25 08:43:45 +00:00
hci.c spa: bluez: use some more spa_auto* 2023-07-30 13:45:49 +02:00
iso-io.c spa: bluez: fix whitespaces 2024-02-05 20:01:21 +01:00
iso-io.h bluez5: output silence if no data for some ISO sinks 2023-04-14 22:29:03 +03:00
media-codecs.c bluez5: aptx-ll: produce 7.5ms packets 2024-02-05 19:34:47 +02:00
media-codecs.h bluez5: aptx-ll: produce 7.5ms packets 2024-02-05 19:34:47 +02:00
media-sink.c bluez5: support Google's Opus A2DP vendor codec 2024-02-04 12:58:40 +02:00
media-source.c spa: export log topic enumerations 2024-01-04 10:02:55 +00:00
meson.build bluez5: support Google's Opus A2DP vendor codec 2024-02-04 12:58:40 +02:00
midi-enum.c spa: export log topic enumerations 2024-01-04 10:02:55 +00:00
midi-node.c spa: export log topic enumerations 2024-01-04 10:02:55 +00:00
midi-parser.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
midi-server.c spa: use only static log topics 2024-01-04 10:02:55 +00:00
midi.h spa: bluez: include gio/gunixfdlist.h 2023-02-16 20:55:55 +01:00
modemmanager.c spa: move dbus helpers out of bluez plugin 2024-02-05 13:03:20 +00:00
modemmanager.h spa: bluez: modemmanager: do not use old style declaration 2023-07-03 19:40:31 +02:00
org.bluez.xml bluez5: add GDBus-based object monitor framework 2023-01-24 08:27:56 +00:00
player.c spa: move dbus helpers out of bluez plugin 2024-02-05 13:03:20 +00:00
player.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
plugin.c spa: export log topic enumerations 2024-01-04 10:02:55 +00:00
quirks.c spa: Improve JSON error reporting 2024-03-27 15:42:29 +01:00
rate-control.h bluez5: split rate control out of decode-buffer 2023-04-03 16:35:22 +00:00
README-MIDI.md bluez5: fixup BLE MIDI selinux README 2023-01-24 08:27:56 +00:00
README-OPUS-A2DP.md bluez5: clarify OPUS-A2DP spec 2022-09-03 19:08:27 +00:00
README-SBC-XQ.md bluez5: add SBC XQ readme 2021-01-07 09:54:16 +01:00
rtp.h Add bluez5 plugins 2018-01-16 15:19:55 +01:00
sco-io.c bluez5: use nonblocking i/o for SCO 2023-03-18 16:08:36 +02:00
sco-sink.c bluez5: sco-sink: more accurate latency values 2024-01-28 18:00:04 +02:00
sco-source.c bluez5: support api.bluez5.internal flag also for sco 2024-01-26 11:58:30 +00:00
test-midi.c bluez5: a few more -Werror=strict-prototypes fixes 2023-01-24 11:14:27 +02:00
upower.c spa: move dbus helpers out of bluez plugin 2024-02-05 13:03:20 +00:00
upower.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00