Commit Graph

11 Commits

Author SHA1 Message Date
Dylan Aïssi
5d9fb9f678 Fix typo: numner to number 2022-12-14 10:51:52 +01:00
George Kiagiadakis
efaaf3b43a lua: add Core.get_vm_type() method 2022-06-28 14:06:48 +03:00
Julian Bouzas
0996f5a5ca spa-json: add wp_spa_json_to_string() API
Since the string length returned by wp_spa_pod_get_data() does not always match
the size of the actual json object because it is stored in contiguous memory, we
cannot always rely on that API to get the json string data.

The new wp_spa_pod_to_string() always allocates a new string with the same
length as the json size, guaranteeing that the string returned always represents
the json object, regardless of whether it is nested or not. It is always
recommented to use wp_spa_pod_to_string() unless you know what you are doing.
2022-06-27 10:07:16 +00:00
Julian Bouzas
04198820f1 device: add new wp_spa_device_managed_object_new_iterator API 2022-06-27 08:52:36 +00:00
George Kiagiadakis
2eed279c9d i18n: remove the module and embed the gettext calls into the lua api
There is no need to have this as an optional module, since libintl
is a hard dependency of both PipeWire and GLib. This way we can keep
things a bit simpler and faster (no string copies and plugin lookups)

Bump meson dependency to 0.59 to benefit of the libintl lookup that
is now built into meson's dependency() function.
2022-05-10 15:16:09 +03:00
Julian Bouzas
07179452e2 m-lua-scripting: add WpSiAdapter APIs 2022-05-05 08:09:21 +00:00
George Kiagiadakis
81af8c2069 lua: sandbox: remove all traces of the minimal_std flag, as it's no longer used 2022-04-23 20:14:59 +03:00
George Kiagiadakis
ecb6100b77 m-lua-scripting: wrap every script in a WpPlugin and expose async activation api
This allows scripts to declare when they have finished their loading,
so we can now also know when wireplumber is done loading and ready to
handle clients

Related to !313
2022-04-23 20:14:59 +03:00
George Kiagiadakis
e1d0240bc9 wplua: split the functionality of the load functions into smaller functions
The load functions used to do 3 things:
- push the sandbox function on the stack
- load the file and push it as a function on the stack
- call the sandbox (or the file)

Now there are separate functions to do these 3:
- wplua_push_sandbox
- wplua_load_*
- wplua_pcall
2022-04-23 20:14:59 +03:00
Pauli Virtanen
bbe9ac00f3 modules: add m-i18n
Add simple gettext i18n module.

Add Lua script API functions I18n.gettext, I18n.ngettext.
2022-04-11 19:20:43 +03:00
George Kiagiadakis
17a257ddbe wplua: move under modules/module-lua-scripting
It's unlikely that wplua will ever be useful outside the context
of module-lua-scripting, so let's move it to keep all the code in one place
2022-03-24 09:47:59 +02:00