m-lua-scripting: add bindings required for device monitors

WpDevice, WpSpaDevice, WpNode, WpImplNode, WpObject and object features
This commit is contained in:
George Kiagiadakis
2021-01-20 09:50:59 +02:00
parent c678cbed2c
commit b88ff15725
2 changed files with 214 additions and 8 deletions

View File

@@ -69,9 +69,52 @@ local function Constraint (spec)
return debug.setmetatable(spec, { __name = "Constraint" })
end
local Features = {
PipewireObject = {
MINIMAL = 0x11,
},
ALL = 0xffffffff,
}
local Feature = {
Proxy = {
BOUND = 1,
},
PipewireObject = {
INFO = (1 << 4),
PARAM_PROPS = (1 << 5),
PARAM_FORMAT = (1 << 6),
PARAM_PROFILE = (1 << 7),
PARAM_PORT_CONFIG = (1 << 8),
PARAM_ROUTE = (1 << 9),
},
SpaDevice = {
ENABLED = (1 << 16),
},
Node = {
PORTS = (1 << 16),
},
Session = {
ENDPOINTS = (1 << 16),
LINKS = (1 << 17),
},
Endpoint = {
STREAMS = (1 << 16),
},
Metadata = {
DATA = (1 << 16),
},
}
SANDBOX_EXPORT = {
Features = Features,
Feature = Feature,
Log = WpDebug,
ObjectManager = WpObjectManager_new,
Interest = WpObjectInterest_new,
Constraint = Constraint,
Device = WpDevice_new,
SpaDevice = WpSpaDevice_new,
Node = WpNode_new,
LocalNode = WpImplNode_new,
}