Commit graph

2271 commits

Author SHA1 Message Date
Julian Bouzas
3eaaae3a45 docs: Add filters documentation 2023-09-03 14:33:34 +00:00
Julian Bouzas
56017fdbe6 scripts: use filter-utils to implement smart filter policy 2023-09-03 14:33:34 +00:00
Julian Bouzas
1ba3844f2c scripts: add filter-utils.lua
Utilities Lua script for the policy to easily handle filter nodes.
2023-09-03 14:33:34 +00:00
Julian Bouzas
b984af7c87 scripts: add filters_metadata.lua
Creates a filters metadata to configure filters at runtime.
2023-09-03 14:33:34 +00:00
Julian Bouzas
d383762812 device: remove echo-cancel configuration
This will be possible to do with the new filter-utils.lua design.
2023-09-03 14:33:34 +00:00
Duncan Overbruck
15f5d84d47 tests: add event dispatch order test for same priority events 2023-09-03 17:30:03 +03:00
Duncan Overbruck
bebee99fc8 event-dispatcher: sort same priority events by the order they have been received 2023-09-03 17:30:03 +03:00
George Kiagiadakis
67f9f63520 Merge branch '0.4' into next 2023-09-01 19:12:20 +03:00
George Kiagiadakis
02e1393c9f policy-node: destroy node only after sending an error to the client
if the node is destroyed before, pw_stream shuts down and doesn't
relay the error to the application
2023-09-01 16:23:09 +03:00
Tom A. Wagner
6e81dc7a66 docs: Add missing '\since' attributes to types and functions that have been added in versions later than 0.4.0 2023-08-30 11:20:06 +02:00
Tom A. Wagner
3a4b91fad7 Add enum documentation and Since tag to the generated gir file
Fix gen-api-gtkdoc.py to also parse an enums detailed description, which may contain a `since` attribute.

This makes the enums documentation and `Since` attribute end up in the final .gir file.
2023-08-25 13:50:39 +02:00
Tom A. Wagner
fa22101530 gir: Add object documentation and Since tag to the generated gir file
Fix gen-api-gtkdoc.py to also parse a structs detailed description, which may contain a `since` attribute,
and to generate a gtkdoc definition for those structs in the output wp-gtkdoc.h.

This makes the structs documentation and `Since` attribute end up in the final .gir file.
2023-08-25 11:35:36 +02:00
Julian Bouzas
dcee74fcca scripts: do not store the link in si_flags
Otherwise the link is not destroyed right away when doing silink:remove()
2023-08-15 16:32:19 -04:00
Ashok Sidipotu
591d0b4370 camera-monitors: add a config property for camera discovery timeout 2023-08-15 07:14:59 +00:00
Ashok Sidipotu
2d4cdcd5da wireplumber.conf: run monitors towards the end
This solves the problem of linkables not created for libcamera nodes. It makes
sense to run monitors towards the end when rest of the system is really
waiting for them.
2023-08-15 07:14:59 +00:00
Ashok Sidipotu
359ea7b17d monitor-utils: use uniform naming style for lib apis 2023-08-15 07:14:59 +00:00
Ashok Sidipotu
426e1bbffe camera monitors: introduce cam device arbitration logic 2023-08-15 07:14:59 +00:00
Ashok Sidipotu
7bca8cacde camera monitors: pass device and node properties as event data
This avoids event properties show up in device and node properties.
2023-08-15 07:14:59 +00:00
Ashok Sidipotu
3fe930f15f api.c: add wp_core_test_feature API 2023-08-15 07:14:59 +00:00
Ashok Sidipotu
92de80eb2e wireplumber.conf: add new v4l2 monitor hooks 2023-08-15 07:14:59 +00:00
Ashok Sidipotu
f45d7b43f3 v4l2/monitors: rebase v4l2 monitor into a bunch of hooks 2023-08-15 07:14:59 +00:00
Ashok Sidipotu
86ea1f61f9 wireplumber.conf: add the new libcamera monitor hooks 2023-08-15 07:14:59 +00:00
Ashok Sidipotu
bb0e15e631 libcamera/monitors: rebase libcamera monitor into a bunch of hooks 2023-08-15 07:14:59 +00:00
Ashok Sidipotu
6596d71c4f monitor-utils: introduce monitor utils lua library 2023-08-15 07:14:59 +00:00
Ashok Sidipotu
27c1ea869b event*.c: add a few more log msgs 2023-08-15 07:14:59 +00:00
Ashok Sidipotu
03e6de9894 m-standard-source: handle create-* events 2023-08-15 07:14:59 +00:00
Julian Bouzas
227dd97036 m-lua-scripting: always parse JSON to String if its type is not recognized
This allows parsing JSON strings without quotes.
2023-08-11 14:48:13 -04:00
Stefan Ursella
7ee69a9a47 log: set empty string to not set log_fields
not all functions in glib returns a value for the used log fields
in this case a 'g_return_val_if_fail(..) will only set 4 fields an
set the other field to NULL which leads to a segfault

Jul 22 13:41:37 Cynap-Pro-01121508 systemd-coredump[7247]: Process 496 (wireplumber) of user 4242 dumped core.

                                                           Stack trace of thread 496:
                                                           #0  0x00007f6b2ce58e99 __strlen_avx2 (libc.so.6 + 0x150e99)
                                                           #1  0x00007f6b2cf3ebe5 g_log_writer_journald (libglib-2.0.so.0 + 0x5fbe5)
                                                           #2  0x00007f6b2d0a9316 wp_log_fields_write_to_journal (libwireplumber-0.5.so.0 + 0x2b316)
                                                           #3  0x00007f6b2d0a96f5 wp_log_writer_default (libwireplumber-0.5.so.0 + 0x2b6f5)
                                                           #4  0x00007f6b2cf3cf3e g_log_structured_array (libglib-2.0.so.0 + 0x5df3e)
                                                           #5  0x00007f6b2cf3d0ae g_log_structured_array (libglib-2.0.so.0 + 0x5e0ae)
                                                           #6  0x00007f6b2cf3d4b7 g_logv (libglib-2.0.so.0 + 0x5e4b7)
                                                           #7  0x00007f6b2cf3d7ef g_log (libglib-2.0.so.0 + 0x5e7ef)
                                                           #8  0x00007f6b29efafef get_node_by_id (libwireplumber-module-cb-ipc.so + 0x24fef)
                                                           #9  0x00007f6b29efb032 wp_cb_ipc_get_app_properties (libwireplumber-module-cb-ipc.so + 0x25032)
2023-08-01 08:30:05 +00:00
Stefan Ursella
72edbb1ba4 m-mixer-api: track monitorMute and allow modifying them 2023-07-31 13:26:28 +02:00
Stefan Ursella
407c2f04de scripts: run find-best-profile hook before running apply-profile hook 2023-07-17 17:33:40 +02:00
George Kiagiadakis
98cd13284c tests: wait for the cores to connect before starting
Otherwise we end up executing the test without
an established connection
2023-07-04 15:09:31 +03:00
George Kiagiadakis
f94519a67a tests: upgrade failure notices to criticals
It's not very clear that these are the cause of failure when you look
at the logs
2023-07-04 14:57:26 +03:00
George Kiagiadakis
84d3382292 config: make it possible to have feature profiles
A profile is a list of features set to required/optional/disabled
which governs which components are getting loaded, given a static
components list with well-defined dependencies
2023-06-23 20:15:26 +03:00
George Kiagiadakis
840a2304b4 core: load components internally and refactor main to just activate it
+ move the export-core creation and media-session check to be built-in components
+ add WpCore API to find the export core
2023-06-23 18:01:26 +03:00
George Kiagiadakis
6bab78bf3f object: make wp_object_get_core() return itself if it's the core 2023-06-23 18:01:26 +03:00
George Kiagiadakis
11add27f81 core: refactor to subclass from WpObject 2023-06-23 18:01:26 +03:00
George Kiagiadakis
9970450bfa object.h: don't include core.h 2023-06-23 18:01:26 +03:00
George Kiagiadakis
417b0dff4c m-std-event-source: don't push events during the core dispose sequence 2023-06-23 18:01:26 +03:00
George Kiagiadakis
a982b7917c tests: reduce logs coming from libpipewire
These tests are meant to catch wireplumber issues, so the libpipewire
logs are not very interesting and just make it hard to go through
the interesting bits
2023-06-23 18:01:26 +03:00
Duncan Overbruck
760ce55de1
device/state-routes.lua: fix finding stored routes
This wrongly stored the matched route in a new variable instead of the
locally declared variable it supposed to use.
2023-06-23 13:13:44 +02:00
Duncan Overbruck
7eb6ff3b9e
device/state-routes.lua: fix check for empty selected-routes
This hook and previous hooks hooks default to setting the
selected-routes event property to an empty table, not nil.
2023-06-23 13:13:44 +02:00
Ashok Sidipotu
b0460d8050 src/scripts: add few comments 2023-06-22 16:28:56 +05:30
George Kiagiadakis
a0497b4256 Merge branch '0.4' into next 2023-06-21 20:59:04 +03:00
George Kiagiadakis
2840964f37 internal-comp-loader: fix error ownership in parsing step 2023-06-20 17:20:01 +03:00
George Kiagiadakis
19cfd37da6 comp-loader: register the component & feature only if it activates successfully
Fixes #470
See also !503
2023-06-20 17:20:01 +03:00
George Kiagiadakis
357105fa94 gitlab-ci: bump ubuntu image to 22.04 LTS
Required for more recent glib
2023-06-20 12:39:29 +03:00
George Kiagiadakis
db5bd534ce tests: do not explicitly free f->base.conf_file
This is done inside wp_base_test_fixture_teardown() now, as it should.
2023-06-20 12:39:29 +03:00
George Kiagiadakis
e738076cb0 conf: refactor component loading to use a dependency system
Each component can now list required and optional dependencies,
using the component feature names to match other components.
In addition, each component feature can be declared as required, optional
or disabled, making optional components easier to deal with.
The component flags (ifexists, nofail) have been removed.

Using virtual components, this system also allows easier customization
of which components should be loaded for a specific configuration,
without requiring the user to copy the list of components and edit it.

Also bump the required glib version to 2.68 for g_assert_cmpstrv()
2023-06-20 12:39:29 +03:00
George Kiagiadakis
9c2d25b985 tests: add component loader unit test 2023-06-20 12:39:29 +03:00
George Kiagiadakis
8a8cd97ca8 core: make the object registration functions public
This allows registering arbitrary objects on the core's registry and
finding them later, without having to add API for each and every object.

I think this is useful enough to have it public, even though it's
probably not going to be used that much... The rationale here is to
allow registering custom component loaders without having to make them
subclass WpPlugin or to create custom API for registering component
loaders specifically.

Also, remove the wp_plugin_register() and wp_si_factory_register()
functions, since they are not going to be used much in the future.
The idea is to let the component loader do the registration under the
scenes, as the component is getting loaded.
2023-06-20 12:39:29 +03:00