15 Commits

Author SHA1 Message Date
George Kiagiadakis
4736d56557 log: implement a log topics system, like pipewire
The intention is to make checks for enabled log topics faster.

Every topic has its own structure that is statically defined in the file
where the logs are printed from. The structure is initialized transparently
when it is first used and it contains all the log level flags for the levels
that this topic should print messages. It is then checked on the wp_log()
macro before printing the message.

Topics from SPA/PipeWire are also handled natively, so messages are printed
directly without checking if the topic is enabled, since the PipeWire and SPA
macros do the checking themselves.

Messages coming from GLib are checked inside the handler.

An internal WpLogFields object is used to manage the state of each log
message, populating all the fields appropriately from the place they
are coming from (wp_log, spa_log, glib log), formatting the message and
then printing it. For printing to the journald, we still use the glib
message handler, converting all the needed fields to GLogField on demand.
That message handler does not do any checks for the topic or the level, so
we can just call it to send the message.
2023-05-16 20:42:28 +03:00
Wim Taymans
8e7331a23d default-routes: save and restore iec958Codecs
Similar to the volume and latencyOffset we need parse, save and restore
the configured iec958Codecs on the node.

Pavucontrol will use the device-restore extension to set the configured
iec958Codecs on the Node/Route. This will make the node enumerate
audio/iec958 formats, which can be matched against streams that can
provide this format to configure passthrough.

Fixes #64
2021-10-04 10:11:03 +00:00
Julian Bouzas
7abd3728e7 build: fix volatile compatible-pointer-types warnings
Happens when compiling with GCC 11
2021-08-18 09:17:05 -04:00
Jason Francis
ed8346e77d docs: Add brief descriptions to all functions
This ensures all of these functions are picked up by g-ir-scanner.
2021-06-02 17:38:34 +00:00
George Kiagiadakis
b812e912d2 docs: fix C API documentation to work nicely with doxygen & sphinx 2021-05-25 14:19:53 +03:00
Raghavendra
d692f06f0d docs: api: Replace hotdoc specific commands with Doxygen specific commands 2021-05-25 14:19:53 +03:00
George Kiagiadakis
7eed2acd76 lib: documentation fixes 2021-03-04 19:10:10 +02:00
Julian Bouzas
dc2ad1f25d rename all foo_iterate APIs to foo_new_iterator
Avoids confusion with LUA iterate API
2021-02-05 11:33:23 -05:00
George Kiagiadakis
674e53c221 spa-device: handle DeviceEvent and configure node props
Depends on DeviceEvent type-info, available on pipewire master as of today
2021-01-21 09:42:07 +02:00
George Kiagiadakis
3762388831 spa-type: refactor
* Use a more complete API to introspect SPA types
* Avoid the need for the Tables enumeration; the tables
  are now registered with a string
* Avoid the need for initialization, work directly on spa_types
  and other static data
* Allow working with Object pods that are not Params;
  the PARAMS table was previously hardcoded in the pod implementation
* Add a different dynamic type registration system, closer to
  how spa type works. The only regression is that we can no longer
  register additional custom object fields (custom SPA_PROP_* for example),
  but this feature can be re-added later
2021-01-15 16:30:01 +02:00
Julian Bouzas
bd19c2ddef spa-type: fix param profile's last Id 2020-12-30 12:35:26 -05:00
George Kiagiadakis
78fe4dc30e spa-type: add the AUDIO_CHANNEL table 2020-04-22 13:44:40 +03:00
Julian Bouzas
03c15a8132 spa-type: add format, param-port-config and param-profile tables 2020-04-21 16:10:38 -04:00
George Kiagiadakis
9ca342f89f debug: update all library code to use the new debug system
+ enable the new log writer on the executables
+ enable structured logging in the tests
2020-04-14 18:31:17 +03:00
Julian Bouzas
b79fcf9418 lib: add spa type API 2020-04-09 13:09:57 -04:00