Commit graph

902 commits

Author SHA1 Message Date
George Kiagiadakis
e9c38f365e plugin: debug activation & deactivation 2021-01-21 09:42:07 +02:00
George Kiagiadakis
997e2c7539 wplua: object: unset GValues used when calling action signals 2021-01-21 09:42:07 +02:00
George Kiagiadakis
7b4829f808 config: add lua-based device monitors 2021-01-21 09:42:07 +02:00
George Kiagiadakis
b88ff15725 m-lua-scripting: add bindings required for device monitors
WpDevice, WpSpaDevice, WpNode, WpImplNode, WpObject and object features
2021-01-21 09:42:07 +02:00
George Kiagiadakis
c678cbed2c impl-node: derive from WpProxy 2021-01-21 09:42:07 +02:00
George Kiagiadakis
18229e8265 spa-device: derive from WpProxy and manage child objects internally
port module-monitor to follow the changes
2021-01-21 09:42:07 +02:00
Julian Bouzas
9d6e220ec9 m-default-metadata: handle default nodes 2021-01-19 08:58:08 -05:00
George Kiagiadakis
c42a4def01 config: rename desktop profile to desktop-ep
A new desktop profile without endpoints will be added.
The goal is to be compatible with media-session in the short term
2021-01-15 16:41:22 +02:00
George Kiagiadakis
aa93ecf793 spa-pod: add the ability to specify Id properties as strings
Use the unused 'K' format letter in the varargs builder & parser methods
2021-01-15 16:30:02 +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
7488ec0e25 Merge remote-tracking branch 'origin/master' into next-lua 2021-01-15 16:28:04 +02:00
Julian Bouzas
d96c856f28 m-lua-scripting: handle default endpoints from the metadata 2021-01-15 08:59:13 -05:00
Julian Bouzas
7ec169f231 m-config-policy: handle default endpoints from the metadata 2021-01-15 08:58:52 -05:00
Julian Bouzas
9cb79dc3d6 modules: replace session-settings with default-metadata 2021-01-14 13:34:01 -05:00
Julian Bouzas
453f9a34d2 wpctl: implement set-default using the metadata API 2021-01-14 12:56:51 -05:00
Julian Bouzas
f0d744016b meson: fix lua dependency on Arch Linux 2021-01-14 12:56:47 -05:00
Julian Bouzas
f01dd10aaf metadata: refactor API to quickly find a specific value 2021-01-11 13:11:37 -05:00
Julian Bouzas
bef0b178ed state: use GKeyFile API to keep state in disk 2021-01-08 14:34:13 -05:00
Julian Bouzas
2ec43ea885 wp: remove initialization of wireplumber types 2021-01-05 08:43:03 -05:00
Julian Bouzas
866ede214e session: remove default-endpoint-changed signal 2021-01-04 12:46:53 -05:00
Julian Bouzas
bd19c2ddef spa-type: fix param profile's last Id 2020-12-30 12:35:26 -05:00
George Kiagiadakis
b1a0f76807 config: implement the functionality of config-policy in Lua
Still missing a way to get the default endpoints, but this
is going to change and use the metadata API
2020-12-22 11:37:31 +02:00
George Kiagiadakis
680b0a7d93 m-lua-scripting: expose session, endpoint, endpoint-link APIs
... and make WpIterator Lua-friendly so that it can be used
with the generic for loop
2020-12-22 11:35:04 +02:00
George Kiagiadakis
86f97b17c6 wplua: expose table to/from properties conversion functions 2020-12-22 11:33:35 +02:00
George Kiagiadakis
b94e54c469 object, pw-obj-mixin: fix warnings 2020-12-21 18:58:20 +02:00
George Kiagiadakis
af01155093 Merge branch 'master' into next-lua 2020-12-21 18:56:52 +02:00
George Kiagiadakis
2f0799642d config: disable audio sink "streams"; they fail on latest pipewire
Fixes #22
2020-12-21 18:48:21 +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
bb9b59181b meson: enable compiler flags for warnings, if supported
Use the same set of warning flags that pipewire uses

See #20
2020-12-20 22:16:37 +02:00
George Kiagiadakis
879f771d7f modules: implement module-lua-scripting
a module that allows loading and executing Lua
scripts from a configured directory
2020-12-20 18:10:22 +02:00
George Kiagiadakis
d0d2f2a59e wplua: use only the basename of the files for debug/error messages 2020-12-18 18:26:31 +02:00
George Kiagiadakis
067da200fc wplua: use the error handler also when loading chunks
... and improve its output
2020-12-18 18:25:43 +02:00
George Kiagiadakis
0054559b91 wplua: implement __tostring for GObject 2020-12-18 18:24:27 +02:00
George Kiagiadakis
da375a7408 wplua: use the registry to store vtables & closures 2020-12-16 23:19:07 +02:00
George Kiagiadakis
70931969b4 wplua: remove TypeClass, push constructors as ClassName_new 2020-12-16 23:14:58 +02:00
George Kiagiadakis
5edfc090c6 wplua: allow checking for a specific GType with isobject/isboxed 2020-12-16 23:12:41 +02:00
George Kiagiadakis
630a6f5e1c configuration: convert file paths from relative to absolute if necessary 2020-12-16 09:43:32 +02:00
George Kiagiadakis
55a6d20def configuration: implement grouping files in subdirectories
This patch allows configuring an "extension" string that filters
files not only by extension, but also by a subdirectory of the
standard configuration path(s).

The "extension" can now have the following format:
  "subdirectory/path/extension"
which is split on the last '/' and looks for files that end with
".extension" in "WIREPLUMBER_CONFIG_DIR/subdirectory/path/"

If no subdirectory is specified, the code behaves just like it did
before.
2020-12-16 09:40:55 +02:00
George Kiagiadakis
65b817f6fc wplua: add proper GError domain & error codes 2020-12-15 18:36:14 +02:00
George Kiagiadakis
8b4c5af49c wplua: implement sandboxing of scripts
All loaded scripts can now be run in a protected environment
so that they cannot do any harm to the host or to each other
2020-12-15 18:28:28 +02:00
George Kiagiadakis
b9ca4e1425 wplua: convert WpProperties to table and vice versa 2020-12-15 10:27:40 +02:00
George Kiagiadakis
7d692e0246 wplua: new simple engine to integrate GObject with Lua 2020-12-11 17:07:20 +02:00
George Kiagiadakis
404d016852 meson: add dependency on lua 5.3 2020-12-01 11:18:15 +02:00
George Kiagiadakis
a2181fc3f4 Merge remote-tracking branch 'origin/master' into next 2020-12-01 11:16:13 +02:00
George Kiagiadakis
accb91ddb1 tools: port wpctl to the new APIs 2020-12-01 11:00:51 +02:00
George Kiagiadakis
20da8a946d tests: endpoint: re-enable the params unit test 2020-11-25 22:44:29 +02:00
George Kiagiadakis
3d032cc288 lib: delete WpProps
This is no longer useful, we are going to use WpSpaPod directly
in combination with the param caching for WpPwObjectMixin
2020-11-25 22:44:29 +02:00
George Kiagiadakis
bd65517b7d pw-object-mixin: refactor, implement param caching and features for impl objects
Now the WpPipewireObject interface is directly implemented by the mixin
and there is another interface that users of the mixin must implement
in order for the mixin to work proprely.

A lot of manual stuff that proxy classes had to do before are now
in the mixin. Also most of the data that would normally reside in Private
structures is now in the mixin data structure (stored as qdata on the object).
This is achieving the best amount of code reuse so far.

For impl objects (WpImpl*) there are also default implementations of the
standard pipewire object methods and the INFO & PARAM_* features are
more coherently enabled during the whole lifetime of these objects.
2020-11-25 22:44:29 +02:00
George Kiagiadakis
7f40a8152d iterator: add version field in the methods struct
Similar to how pipewire interfaces are versioned.
Keeps the struct extensible without breaking ABI.
2020-11-16 11:16:35 +02:00
George Kiagiadakis
3935308250 meson: bump project & API versions 2020-11-16 11:06:11 +02:00