Commit graph

110 commits

Author SHA1 Message Date
Julian Bouzas
907a67fcb1 modules: add new API module to monitor files 2021-08-10 11:50:51 +03:00
Julian Bouzas
8b95b4ae23 tests: skip test if specific spa lib is not installed
Avoids tests failing if pipewire was built without the spa lib
2021-07-19 09:40:19 -04:00
Julian Bouzas
70197f498c tests: fix coverity scan side effect in assertion issues 2021-06-25 08:50:08 -04:00
George Kiagiadakis
c24db9f353 tests: add pipewire env variables when running tests, tidy up common_env
Related to pipewire!767
2021-06-18 19:34:25 +03:00
George Kiagiadakis
b6a5750595 Revert "tests: enable G_SLICE=debug-blocks in all tests"
This breaks the valgrind test setup, as this G_SLICE overrides
G_SLICE=always-malloc from valgrind_env

This reverts commit a0d0069f18.
2021-06-10 14:52:30 +03:00
George Kiagiadakis
a0d0069f18 tests: enable G_SLICE=debug-blocks in all tests
This can catch allocation mistakes in the g_slice allocator
2021-06-09 12:21:56 +03:00
George Kiagiadakis
82c054f1bd meson: use environment() objects to define env for tests
it's just a nicer syntax
2021-06-09 12:03:14 +03:00
Julian Bouzas
0f01c8b6da tests: si-standard-link: remove unneeded core syncs 2021-06-08 13:23:44 -04:00
George Kiagiadakis
ae99e50182 tests: si-audio-adapter: test is.device property 2021-05-27 17:01:55 +03:00
George Kiagiadakis
b5ad7b3996 tests: si-standard-link: fix racy test
- use si-audio-adapter, to keep the original test's spirit
  of linking two terminal nodes, not two intermediate ones
- setup null sink to be a virtual device sink with 2 channels
  and the audiotestsrc to be a stream, so that it is also configured
  to have 2 channels via si-standard-link's logic
- don't use a second client core, as it introduces races;
  we don't need that anymore because we don't export endpoint-links
2021-05-27 16:55:26 +03:00
Julian Bouzas
265abd444b tests: enable si-standard-link test and port it to new API 2021-05-24 11:07:56 -04:00
George Kiagiadakis
ac9e1e89c4 wp: remove WpSession and WpEndpointLink
We have ended up not using them, so let's not carry them
in the ABI of 0.4

We can always revert that, but let's first decide how
these objects should be used
2021-05-21 19:57:31 +03:00
Julian Bouzas
05aba22c5a si-audio-adapter: remove unneeded 'preferred.n.channels' property 2021-05-12 10:36:24 -04:00
Julian Bouzas
888667d784 modules: remove role and priority properties from si-audio-adapter and si-node 2021-05-11 10:56:50 -04:00
Julian Bouzas
d68636f9b3 si-interfaces: rename WpSiPortInfo to WpSiLinkable 2021-05-11 10:56:44 -04:00
Julian Bouzas
5c781db216 m-audio-endpoint: remove target property
Links between endpoints and device nodes are done externally in LUA
2021-04-09 14:19:25 -04:00
Julian Bouzas
b2c9084413 modules: remove unneeded si-audio-convert module 2021-04-08 14:07:05 -04:00
Julian Bouzas
d38092a35c m-si-audio-endpoint: fix port configuration and target linking 2021-04-08 14:07:05 -04:00
Julian Bouzas
471f84c735 m-si-audio-endpoint: make target property optional
Allows using the endpoint even if a target is not set.
2021-04-08 14:07:01 -04:00
Julian Bouzas
bce0b79980 tests: si-standard-link: sync core before finishing
Makes sure core has finished any pending task before finishing the test.
2021-04-08 11:04:21 -04:00
Julian Bouzas
fb1daa0bf2 modules: use dots instead of dashes for session item properties
Keeps consistency with PipeWire
2021-04-02 11:22:22 -04:00
Julian Bouzas
b7e347d92c modules: remove endpoint impl on si-node, si-audio-convert and si-audio-adapter 2021-03-26 16:16:02 -04:00
Julian Bouzas
59cb837075 tests: si-standard-link: use new si-audio-endpoint 2021-03-26 16:16:02 -04:00
Julian Bouzas
325522ae51 modules: add si-audio-endpoint session item 2021-03-26 16:16:02 -04:00
Julian Bouzas
d71cace24f m-si-convert: rename to si-audio-convert
Because it is only meant to be used with audio nodes
2021-03-18 15:00:22 -04:00
Julian Bouzas
340213272e m-si-adapter: rename to si-audio-adapter
Because it is only meant to be used with audio nodes
2021-03-18 14:47:22 -04:00
Julian Bouzas
120aab04ae session-item: refactor and inherit from WpObject
This adds WP_SESSION_ITEM_FEATURE_ACTIVE and WP_SESSION_ITEM_FEATURE_EXPORTED
features, so _activate and _export APIs have been removed. Modules and unit
tests have also been updated.
2021-03-18 14:30:05 -04:00
Julian Bouzas
39ef6df7ce m-si-adapter: rename algorithms to audio-utils 2021-03-18 12:10:37 -04:00
Julian Bouzas
b10a5b6b49 m-si-simple-node-endpoint: rename to si-node 2021-03-18 12:10:37 -04:00
Julian Bouzas
12b2c00d0b lib: remove WpEndpointStream API
Add all that goes with it.
2021-03-18 12:10:37 -04: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
0d072874a1 lib: introduce WpComponentLoader and remove WpModule
The component loader is a more generic and extensible mechanism
of loading components; modules are one type of component...
The idea is to make scripts and config files also be components,
loaded by plugins that inherit WpComponentLoader
2021-02-03 17:16:51 +02:00
George Kiagiadakis
f61e292959 plugin: inherit from WpObject
* use the activate/deactivate system from WpObject,
  which allows async activation and error reporting
* drop 'module' property, use 'core' from WpObject
2021-02-03 17:16:51 +02:00
George Kiagiadakis
596990d718 modules: remove modules that are obsoleted by the lua scripts
+ their configuration
+ their unit tests
2021-01-30 12:58:26 +02:00
George Kiagiadakis
c78373b1fc modules: delete the old dbus-reservation module 2021-01-26 16:28:22 +02:00
George Kiagiadakis
ef908439c4 modules: implement a new reserve-device module
This one offers API to interract on a lower level with
the D-Bus reservation API and uses GDBus high level bindings only.

Also, this one implements the full Acquire procedure, calling
RequestRelease() on the peer and requesting the name again with
REPLACE_EXISTING
2021-01-26 16:28:22 +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
George Kiagiadakis
af01155093 Merge branch 'master' into next-lua 2020-12-21 18:56:52 +02:00
George Kiagiadakis
e48cb30828 Fix compiler warnings that appear with the warning flags enabled
Fixes #20
2020-12-20 22:16:37 +02:00
George Kiagiadakis
ccdc354445 modules: port modules and their tests to the new proxy APIs
Disable m-session-settings for now, as it needs further work
2020-11-15 20:26:15 +02:00
Julian Bouzas
321545a32c modules: refactor dbus reservation
The Dbus device reservation has been moved into a separate module, and has also
been refactored to allow reserving a device name before an actual device is
created. Devices now are created and destroyed by the monitor depending on
whether PipeWire owns the device or not. This also simplifies a lot the device
activation module to always enable devices when they are created, and never
worry about checking whether a device is acquired by PipeWire or not.
2020-10-22 14:33:59 -04:00
Julian Bouzas
7d35191091 m-config-endpoint: refactor and rename to endpoint-creation
Allows implementing device specific endpoint creation logic, which is currently
needed for bluetooth endpoints as they need to be created differenly.
2020-10-05 11:35:24 -04:00
Julian Bouzas
236f6f8fc5 m-si-adapter: use the adapter's name as stream name 2020-10-05 11:35:24 -04:00
Julian Bouzas
b2438f2cef m-si-adapter: set the configured flag when configuration was successful 2020-10-05 11:35:24 -04:00
George Kiagiadakis
b59ff48156 si-convert: improve node properties for convert nodes
* do not copy the full alsa node properties set
* use a node description that makes the nodes look better in JACK
* use . instead of / as a separator for the node.name, like elsewhere
* add audio.convert spa lib association in the tests that use si-convert;
  previously it used to work because library.name was present in the
  properties copied from the adapter (and it so happens that the adapter
  lives in the audioconvert spa plugin as well ...)
2020-06-29 13:05:44 +03:00
George Kiagiadakis
707518937a tests/config-policy: add "node.autoconnect" on nodes to pass the test 2020-06-16 19:15:09 +03:00
Julian Bouzas
cd3401bcb5 dbus-device-reservation: add owner-appeared/owner-vanished signals, and remove acquired callback 2020-06-07 16:28:44 -04:00
Julian Bouzas
d3cb1bd84d modules: rename config-static-nodes to config-static-objects 2020-06-02 12:24:47 -04:00
Julian Bouzas
c97eccea16 tests: dbus-device-reservation: free the string properties 2020-06-01 20:05:03 -04:00
Julian Bouzas
5323ee14a5 dbus-device-reservation: emit forced 'release' signal when name is lost and pending task is NULL 2020-06-01 20:05:03 -04:00