mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-04 22:28:03 +02:00
m-lua-scripting: add WpSessionBin add API
Needed when adding streams to softdsp endpoints
This commit is contained in:
parent
5a0a4532d7
commit
ab04334448
1 changed files with 18 additions and 0 deletions
|
|
@ -1134,6 +1134,22 @@ static const luaL_Reg session_item_methods[] = {
|
|||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
/* WpSessionItem */
|
||||
|
||||
static int
|
||||
session_bin_add (lua_State *L)
|
||||
{
|
||||
WpSessionBin *sb = wplua_checkobject (L, 1, WP_TYPE_SESSION_BIN);
|
||||
WpSessionItem *si = wplua_checkobject (L, 2, WP_TYPE_SESSION_ITEM);
|
||||
wp_session_bin_add (sb, g_object_ref (si));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const luaL_Reg session_bin_methods[] = {
|
||||
{ "add", session_bin_add },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
/* WpPipewireObject */
|
||||
|
||||
static int
|
||||
|
|
@ -1217,6 +1233,8 @@ wp_lua_scripting_api_init (lua_State *L)
|
|||
NULL, client_methods);
|
||||
wplua_register_type_methods (L, WP_TYPE_SESSION_ITEM,
|
||||
session_item_new, session_item_methods);
|
||||
wplua_register_type_methods (L, WP_TYPE_SESSION_BIN,
|
||||
NULL, session_bin_methods);
|
||||
wplua_register_type_methods (L, WP_TYPE_PIPEWIRE_OBJECT,
|
||||
NULL, pipewire_object_methods);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue