mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-08 02:18:03 +02:00
m-lua-scripting: add get_n_streams endpoint API
This commit is contained in:
parent
2052eb2b1f
commit
862e253607
1 changed files with 9 additions and 0 deletions
|
|
@ -744,6 +744,14 @@ static const luaL_Reg impl_session_methods[] = {
|
|||
|
||||
/* WpEndpoint */
|
||||
|
||||
static int
|
||||
endpoint_get_n_streams (lua_State *L)
|
||||
{
|
||||
WpEndpoint *ep = wplua_checkobject (L, 1, WP_TYPE_ENDPOINT);
|
||||
lua_pushnumber (L, wp_endpoint_get_n_streams (ep));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
endpoint_iterate_streams (lua_State *L)
|
||||
{
|
||||
|
|
@ -763,6 +771,7 @@ endpoint_create_link (lua_State *L)
|
|||
}
|
||||
|
||||
static const luaL_Reg endpoint_methods[] = {
|
||||
{ "get_n_streams", endpoint_get_n_streams },
|
||||
{ "iterate_streams", endpoint_iterate_streams },
|
||||
{ "create_link", endpoint_create_link },
|
||||
{ NULL, NULL }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue