24 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
Julian Bouzas
9004362cda lib: remove WpEndpoint and WpSiEndpoint APIs 2023-04-17 07:48:18 -04:00
George Kiagiadakis
85d0ecfb40 si-interfaces: improve documentation on latest api additions 2022-05-10 15:16:09 +03:00
Julian Bouzas
1675b37617 si-adapter: add ports state change signal 2022-05-05 08:09:21 +00: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
Julian Bouzas
51964d30cf si-interfaces: add WpSiAdapter interface to set and get session item fortmat 2021-05-12 10:36:31 -04:00
Julian Bouzas
d68636f9b3 si-interfaces: rename WpSiPortInfo to WpSiLinkable 2021-05-11 10:56:44 -04:00
Julian Bouzas
ebf52adb21 si-interfaces: make WpSiLink work with WpSiPortInfo instead of WpSiEndpoint 2021-03-26 16:16:02 -04:00
Julian Bouzas
64cf2bd644 si-interfaces: rename WpSiEndpointAcquisition to WpSiAcquisition
The get_endpoint_acquisition() vmethod has also been moved to WpSiPortInfo, and
therefore renamed to get_acquisition().
2021-03-26 16:16:02 -04:00
Julian Bouzas
13fc0adb22 m-si-standard-link: use a weak reference for in and out endpoints
Allows checking if the endpoints are still valid before releasing the
acquisition. Sometimes the endpoints are destroyed before the link, and
releasing acquisition is not needed. There is no way to check that with raw
pointers.
2021-03-26 16:15:38 -04:00
Julian Bouzas
12b2c00d0b lib: remove WpEndpointStream API
Add all that goes with it.
2021-03-18 12:10:37 -04:00
George Kiagiadakis
7eed2acd76 lib: documentation fixes 2021-03-04 19:10:10 +02:00
George Kiagiadakis
9612d35ca4 si-interfaces: drop the multi-endpoint interface
It's not well-defined; we'll come back to that later
2020-05-04 09:35:22 +03:00
Julian Bouzas
791e9170aa si-interfaces: transfer full when returning from _get_stream_parent_endpoint 2020-05-03 19:54:31 +03:00
George Kiagiadakis
45059cb348 si-interfaces: add default implementations of optional methods
Implementations are not required to provide implementations for these
if they don't need them
2020-04-22 13:49:37 +03: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
George Kiagiadakis
0e855d854a modules: implement si-standard-link, the default WpSiLink implementation 2020-04-11 11:05:09 +03:00
George Kiagiadakis
9ac59f05e0 endpoint-link: use the session item's activation state to implement the link's state 2020-04-09 19:27:33 +03:00
George Kiagiadakis
cbc2e51d14 lib: implement proxy & impl for PW_TYPE_INTERFACE_EndpointLink 2020-03-31 19:26:56 +03:00
George Kiagiadakis
405e8ba0d5 session-item / endpoint: implement exporting a WpSiEndpoint
* introduces API to export session items
* introduces small changes in the WpSiEndpoint & WpSiStream
  interfaces to make it nicer to work with
* ports WpImplEndpoint to use PW_TYPE_INTERFACE_Endpoint
  to export. Depends on:
  https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/246
  (was merged after 0.3.2)
2020-03-29 15:18:20 +03:00
George Kiagiadakis
51f7897aa1 modules: implement the "adapter" session item, as a reference 2020-03-29 15:02:59 +03:00
George Kiagiadakis
374c3dc9e2 lib: initial version of the WpSessionItem interfaces 2020-03-29 15:02:59 +03:00