ACIL FM
Dark
Refresh
Current DIR:
/usr/share/wireplumber/scripts
/
usr
share
wireplumber
scripts
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
access
-
chmod
Open
Rename
Delete
monitors
-
chmod
Open
Rename
Delete
create-item.lua
3.23 MB
chmod
View
DL
Edit
Rename
Delete
fallback-sink.lua
2.32 MB
chmod
View
DL
Edit
Rename
Delete
intended-roles.lua
2.03 MB
chmod
View
DL
Edit
Rename
Delete
policy-bluetooth.lua
10.88 MB
chmod
View
DL
Edit
Rename
Delete
policy-device-profile.lua
5.07 MB
chmod
View
DL
Edit
Rename
Delete
policy-device-routes.lua
13.74 MB
chmod
View
DL
Edit
Rename
Delete
policy-endpoint-client-links.lua
5.51 MB
chmod
View
DL
Edit
Rename
Delete
policy-endpoint-client.lua
6.95 MB
chmod
View
DL
Edit
Rename
Delete
policy-endpoint-device.lua
6.07 MB
chmod
View
DL
Edit
Rename
Delete
policy-node.lua
29.58 MB
chmod
View
DL
Edit
Rename
Delete
restore-stream.lua
12.66 MB
chmod
View
DL
Edit
Rename
Delete
static-endpoints.lua
910 B
chmod
View
DL
Edit
Rename
Delete
suspend-node.lua
1.46 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /usr/share/wireplumber/scripts/intended-roles.lua
-- WirePlumber -- -- Copyright © 2021 Asymptotic -- @author Arun Raghavan <arun@asymptotic.io> -- -- SPDX-License-Identifier: MIT -- -- Route streams of a given role (media.role property) to devices that are -- intended for that role (device.intended-roles property) metadata_om = ObjectManager { Interest { type = "metadata", Constraint { "metadata.name", "=", "default" }, } } devices_om = ObjectManager { Interest { type = "node", Constraint { "media.class", "matches", "Audio/*", type = "pw-global" }, Constraint { "device.intended-roles", "is-present", type = "pw" }, } } streams_om = ObjectManager { Interest { type = "node", Constraint { "media.class", "matches", "Stream/*/Audio", type = "pw-global" }, Constraint { "media.role", "is-present", type = "pw-global" } } } local function routeUsingIntendedRole(stream, dev) local stream_role = stream.properties["media.role"] local is_input = stream.properties["media.class"]:find("Input") ~= nil local is_source = dev.properties["media.class"]:find("Source") ~= nil local dev_roles = dev.properties["device.intended-roles"] -- Make sure the stream and device direction match if is_input ~= is_source then return end for role in dev_roles:gmatch("(%a+)") do if role == stream_role then Log.info(stream, string.format("Routing stream '%s' (%d) with role '%s' to '%s' (%d)", stream.properties["node.name"], stream["bound-id"], stream_role, dev.properties["node.name"], dev["bound-id"]) ) local metadata = metadata_om:lookup() metadata:set(stream["bound-id"], "target.node", "Spa:Id", dev["bound-id"]) end end end streams_om:connect("object-added", function (streams_om, stream) for dev in devices_om:iterate() do routeUsingIntendedRole(stream, dev) end end) devices_om:connect("object-added", function (devices_om, dev) for stream in streams_om:iterate() do routeUsingIntendedRole(stream, dev) end end) metadata_om:activate() devices_om:activate() streams_om:activate()
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply