Raghavendra
c791ed3a62
m-lua-scripting: add WpPipewireObject api
2021-02-16 20:15:13 +05:30
George Kiagiadakis
f4b899c9e3
config: move loading of all audio support modules in 90-enable-audio-all
...
This file is meant to provide the equivalent of pipewire-media-session's
'with-pulseaudio' flag file
2021-02-15 20:17:15 +02:00
George Kiagiadakis
be78fbbc7d
config: split configuration for endpoints support in config.lua.d
2021-02-15 20:11:52 +02:00
George Kiagiadakis
115c9c3e4f
monitors: drop the monitor- prefix from the filenames and s/bluez5/bluez/
2021-02-15 19:55:06 +02:00
George Kiagiadakis
f2f889a3e0
config: make the monitor properties & rules available in global tables
...
This allows altering monitor properties or adding rules in different
lua files that get loaded before 90-enable*.lua
2021-02-15 19:48:06 +02:00
George Kiagiadakis
1d40e7713f
config: load reserve-device only if alsa.reserve is true
...
and also make the default of alsa.reserve to be false, for easier scripting
2021-02-15 19:43:07 +02:00
George Kiagiadakis
4538d43bcb
monitor-bluez: fix source priority assignment
...
pipewire/pipewire!456
2021-02-15 19:24:42 +02:00
George Kiagiadakis
4ae15a14ac
monitors: sanitize node names to match media-session's behavior
2021-02-15 19:18:07 +02:00
George Kiagiadakis
e92351b23b
wplua: gvariant_to_lua: convert dictionary keys to integers if possible
...
When we convert from a lua table to a GVariant dictionary, it is not
possible to maintain the hybrid string & integer keys approach that Lua
has for tables, so we convert all keys to strings and a table becomes a{sv}
When we convert back from a{sv} to a table, it is desirable to get back
the integer keys wherever possible.
The use case is to pass "arrays" (i.e. tables with integer keys) from
the configuration files to the lua scripts, without losing the properties
of the "array"
2021-02-15 18:50:56 +02:00
George Kiagiadakis
73a07d0097
monitor-alsa: sync logic, properties and configuration with media-session
2021-02-15 18:49:57 +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
413ff73bab
wplua: remove VARDICT handling in gvariant->lua conversion
...
G_VARIANT_TYPE_DICTIONARY also catches the VARDICT case
2021-02-15 14:43:18 +02:00
George Kiagiadakis
4fdccf5292
config: mimick media-session's v4l2-monitor.conf
2021-02-15 14:43:18 +02:00
George Kiagiadakis
100e6dc360
monitor-v4l2: copy properties and rules logic from media-session
2021-02-15 14:43:18 +02:00
George Kiagiadakis
989708a880
config: immitate media-session's bluez-monitor.conf
2021-02-15 14:43:18 +02:00
George Kiagiadakis
d9bf776cb8
monitor-bluez: copy all properties and the rules functionality from media-session
2021-02-13 11:55:00 +02:00
George Kiagiadakis
41a4c89a41
lua/config: load split config files in alphanumeric order
2021-02-13 11:55:00 +02:00
George Kiagiadakis
0196b49453
tests/lua: test monitor configuration rules code
2021-02-13 11:55:00 +02:00
George Kiagiadakis
807103e9df
lua/api: add wp_object_interest_matches() binding
2021-02-13 11:55:00 +02:00
George Kiagiadakis
47b6417bbe
object-interest: allow matching against WpProperties objects
2021-02-13 11:55:00 +02:00
Julian Bouzas
b1e1e5ced0
scripts: add portal access script
...
Includes a plugin to handle the portal permission store dbus interface
2021-02-12 14:28:45 -05:00
Julian Bouzas
fdc8053d9f
scripts: add flatpak access lua script
...
Replaces old module-client-permissions module
2021-02-12 14:28:38 -05:00
Julian Bouzas
cbe90a5c75
wplua: handle more GVariant cases
2021-02-12 14:28:38 -05:00
Julian Bouzas
f693e1a4c7
m-lua-scripting: add WpClient LUA api
2021-02-12 14:28:32 -05:00
George Kiagiadakis
6376bc6e4b
Revert "meson: relax meson version dependency when building with system lua"
...
meson can't find project options before executing the project() command :(
This reverts commit 8bff0cc630
.
2021-02-11 16:14:40 +02:00
George Kiagiadakis
8bff0cc630
meson: relax meson version dependency when building with system lua
2021-02-11 16:07:16 +02:00
George Kiagiadakis
a0fb8872a2
lua/pod: optimize push_primitive_values()
2021-02-05 20:15:32 +02: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
e916ff6b76
lua/pod: simplify spa_pod_object_new()
2021-02-05 19:49:25 +02:00
George Kiagiadakis
38039bdfe1
lua/pod: optimize lookups in primitive_lua_type and fix some mistakes
...
Use the numeric values of the spa types instead of their string representation
2021-02-05 19:33:55 +02:00
George Kiagiadakis
2ca3564b67
lua/pod: lookup the object type and values table only once when constructing objects
2021-02-05 19:23:09 +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
George Kiagiadakis
d0113e54cb
m-lua-scripting/pod: push pod constructors using luaL_newlib instead of manually
2021-02-05 12:11:15 +02:00
George Kiagiadakis
55f186ccec
modules: remove m-node-suspension
2021-02-05 12:05:54 +02:00
George Kiagiadakis
148a33187e
m-lua-scripting/api: fix om:lookup() to return nil when no object was found
2021-02-05 12:03:41 +02:00
George Kiagiadakis
d94b0a2f0c
scripts: add suspend-node.lua to replace m-node-suspension
...
... plus the necessary API for it to work
2021-02-05 12:03:07 +02:00
George Kiagiadakis
7b37b31af9
wplua: fix enum <-> lua conversion
...
Sometimes the GEnumClass is not instantiated, so _peek() doesn't work
We need to acquire a strong ref to make sure it is
2021-02-05 12:00:24 +02:00
George Kiagiadakis
7ca6717ff9
create-endpoint.lua: fix some issues
2021-02-05 11:58:53 +02:00
George Kiagiadakis
2efa85e3fd
create-endpoint.lua: fix indentation
2021-02-05 11:33:15 +02:00
George Kiagiadakis
ce66025846
node: change send_command() to take a string
...
Use the spa type system to locate the enumeration value that corresponds
to that string and send that
2021-02-05 11:05:26 +02: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
Julian Bouzas
81163a52c0
m-lua-scripting: add WpSpaPod api
2021-02-05 08:47:27 +00:00
Julian Bouzas
a634bf88fd
wplua: fix vtables lookup in boxed __index function
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
651b4b7377
m-lua-scripting/api: add wp_object_manager_iterate_filtered()
2021-02-04 17:31:25 +02:00
George Kiagiadakis
096a9b4c15
proxy: add a method to query the interface type
2021-02-04 16:51:25 +02:00
George Kiagiadakis
e0f1c8710f
daemon: add a mode to execute lua scripts from the command line
...
This can be useful for quick testing of scripts, or to build small
utilities that do something in pipewire utilizing our lua API
2021-02-04 16:44:56 +02:00