| 1 |
.. _lua_local_module_api: |
| 2 |
|
| 3 |
Local Modules |
| 4 |
============= |
| 5 |
|
| 6 |
The `LocalModule` object (which binds the :c:struct:`WpImplModule` C API) provides a way |
| 7 |
to load PipeWire modules in the WirePlumber process. Instantiating the object |
| 8 |
loads the module, and when the last reference to the returned module object is |
| 9 |
dropped, the module is unloaded. |
| 10 |
|
| 11 |
Constructors |
| 12 |
~~~~~~~~~~~~ |
| 13 |
|
| 14 |
.. function:: LocalModule(name, arguments, properties) |
| 15 |
|
| 16 |
Loads the named module with the provided arguments and properties (either of |
| 17 |
which can be ``nil``). |
| 18 |
|
| 19 |
:param string name: the module name, such as ``"libpipewire-module-loopback"`` |
| 20 |
:param string arguments: should be either ``nil`` or a string with the desired |
| 21 |
module arguments |
| 22 |
:param table properties: can be ``nil`` or a table that can be |
| 23 |
:ref:`converted <lua_gobject_lua_to_c>` to :c:struct:`WpProperties` |
| 24 |
:returns: a new LocalModule |
| 25 |
:rtype: LocalModule (:c:struct:`WpImplModule`) |
| 26 |
:since: 0.4.2 |