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
cf102c5604
tests: session-item: add registration test
...
Also simplifies all tests using base-test-fixture.h
2021-03-18 14:30:11 -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
George Kiagiadakis
941b0324e5
object-interest: remove type checks
...
They are not strictly necessary and just make our life harder
2021-03-02 18:25:34 +02:00
George Kiagiadakis
905636dc8d
lua/api: improve getting optional Interest arguments
...
Add the ability to construct an Interest argument without
using the Interest keyword, so instead of:
om:lookup(Interest { type = "session" })
we can now write:
om:lookup { type = "session" }
... and also remove lookup_filtered from ObjectManager
2021-03-02 13:11:54 +02:00
George Kiagiadakis
e9e73a2141
examples: add bt-profile-switch example
2021-03-01 18:10:40 +02:00
George Kiagiadakis
51e24c58b5
m-lua-scripting/pod: retrieve Ids in Array & Choice as strings, if possible
...
When an Array or Choice that contains Spa:Id appears as a value for an object
field, it is possible to retrieve the Id type from that object field type.
2021-02-23 13:56:38 +02:00
George Kiagiadakis
5302700c6d
m-lua-scripting/pod: s/id_type/object_id/ as commented on !125
2021-02-23 12:47:24 +02:00
Julian Bouzas
bd65f9578d
m-lua-scripting: add support for choices when creating object pods
2021-02-23 10:41:46 +00:00
Julian Bouzas
0694889245
m-lua-scripting: refactor array and choice pod constructors to accept Id names
2021-02-23 10:41:46 +00:00
Julian Bouzas
910ff838e4
m-lua-scripting: allow constructing pod Ids with the Id name
2021-02-23 10:41:46 +00:00
Julian Bouzas
cd2e648b3c
m-lua-scripting: set id_type field when parsing pod objects
2021-02-23 10:41:46 +00:00
Julian Bouzas
2465088c5a
m-lua-scripting: set pod_type and value_type fieds when parsing non-primitive pods
2021-02-23 10:41:46 +00:00
Julian Bouzas
8fa6116786
m-lua-scripting: start indices from 1 when parsing pods
...
For consistency with LUA
2021-02-23 10:41:46 +00:00
George Kiagiadakis
b485f0a67d
test-endpoint: fix failure with pipewire master
2021-02-23 12:30:08 +02:00
George Kiagiadakis
e6112d7579
examples: interactive.lua: add a shebang and update running instructions
2021-02-18 14:53:33 +02:00
George Kiagiadakis
7c1fc1c567
wplua: table_to_properties: use luaL_tolstring to do string conversions
...
The advantage is that luaL_tolstring behaves the same as the native lua
tostring() function, while lua_tostring() does not. In particular, boolean
values are converted properly to "true" and "false" now, while they were
not converted with lua_tostring()
Add a unit test too
2021-02-16 16:53:22 +02:00
George Kiagiadakis
b3ff7347cd
wplua: improve GVariant array conversion
...
* index array items from 1
* handle any kind of value, not just GVariant basic types
* unit test
2021-02-15 14:43:18 +02:00
George Kiagiadakis
dacf19d9c7
wplua: improve gvariant <-> lua conversion functions
...
* Add more generic lua -> gvariant conversion
* Cleanup the gvariant -> lua function and rename it
2021-02-15 14:43:18 +02:00
George Kiagiadakis
0196b49453
tests/lua: test monitor configuration rules code
2021-02-13 11:55:00 +02:00
Julian Bouzas
cbe90a5c75
wplua: handle more GVariant cases
2021-02-12 14:28:38 -05:00
George Kiagiadakis
6039223642
tests/wplua: set WIREPLUMBER_CONFIG_DIR to an invalid directory
...
... because loading a script first looks in that directory, so it's
easy to make tests break by a conflicting file in the system config dir,
for instance, /etc/wireplumber/scripts/pod.lua
2021-02-05 19:49:52 +02:00
George Kiagiadakis
33e546d79b
lua/pod: convert Id object fields to strings, if possible
2021-02-05 18:58:02 +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
Julian Bouzas
b32072a2ed
tests: wplua: add pod.lua script to validate pod API
2021-02-05 08:47:27 +00:00
George Kiagiadakis
b58eff2b69
tests: wplua: add a script tester to validate lua scripts
2021-02-05 08:47:27 +00:00
George Kiagiadakis
e3a60c6233
examples: add an example interactive lua script
2021-02-04 17:32:59 +02:00
George Kiagiadakis
460ff6591d
wplua: allow exchanging arguments and results with scripts
2021-02-03 17:16:51 +02:00
George Kiagiadakis
81d6f055a0
wplua: add GVariant dictionary conversion functions
2021-02-03 17:16:51 +02:00
George Kiagiadakis
a67116b0b9
wptoml: remove, it's not used anymore
...
and drop cpptoml dependency as well
2021-02-03 17:16:51 +02:00
George Kiagiadakis
9fa17e04b4
object-interest: add a NOT_EQUALS verb
2021-02-03 17:16:51 +02:00
George Kiagiadakis
94d527e187
wplua: add flags to modify the sandbox behavior
...
with ISOLATE_ENV, it isolates the global environment between scripts
just like it did before; without it, it uses a common environment
with MINIMAL_STD, it restricts even further the available library
functions; useful for configuration files that don't need to do
actual scripting, just to define some tables
2021-02-03 17:16:51 +02: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