linking: rename props to 'node.dont-fallback', 'node.dont-move' and 'node.linger'

This makes those properties more consistent with 'node.dont-reconnect'.
This commit is contained in:
Julian Bouzas 2024-02-01 11:08:35 -05:00 committed by George Kiagiadakis
parent 1c46115433
commit b3a71e3f1c
5 changed files with 16 additions and 16 deletions

View file

@ -99,7 +99,7 @@ properties on the nodes.
  an error to the client. The logic is implemented in the ``linking/prepare-link.lua``
  Lua script.
- **target.dont-move**:
- **node.dont-move**:
  Boolean indicating whether the stream node should not be movable or not at runtime
  using the metadata. If a stream node is not movable, it means that users cannot
@ -109,7 +109,7 @@ properties on the nodes.
  always move, and therefore link the stream node to a new target if it is defined and
  updated in the ``target.object`` metadata key.
- **target.dont-fallback**:
- **node.dont-fallback**:
  Boolean indicating whether the stream node should not fallback to a different
  target if its defined target does not exist (the one defined with the ``target.object``
@ -119,17 +119,17 @@ properties on the nodes.
  stream node, WirePlumber will always fallback to the default or best target if
  the defined target was not found.
- **target.linger**:
- **node.linger**:
  Boolean indicating whether the stream node should linger or not if its defined
  target was not found and the ``target.dont-fallback`` is set to true. Therefore, if
  target was not found and the ``node.dont-fallback`` is set to true. Therefore, if
  this property is set to ``true``, the defined target was not found, and the
  ``target.dont-fallback`` is set to true, WirePlumber won't send a "defined target not found"
  ``node.dont-fallback`` is set to true, WirePlumber won't send a "defined target not found"
  error to the client, and won't destroy the stream node. This is useful if we want
  the stream to wait (without processing any data) until its defined target becomes
  available. By default it is set to ``false``, so if the property is not present in the
  stream node, WirePlumber will always destroy the node and send an error to the client
  if its target was not found and ``target.dont-fallback`` was set to true.
  if its target was not found and ``node.dont-fallback`` was set to true.
Linking settings

View file

@ -35,8 +35,8 @@ SimpleEventHook {
tostring (si_props ["node.name"]), tostring (si_props ["node.id"])))
local metadata = settings.allow_moving_streams and cutils.get_default_metadata_object ()
local dont_fallback = cutils.parseBool (si_props ["target.dont-fallback"])
local dont_move = cutils.parseBool (si_props ["target.dont-move"])
local dont_fallback = cutils.parseBool (si_props ["node.dont-fallback"])
local dont_move = cutils.parseBool (si_props ["node.dont-move"])
local target_key
local target_value = nil
local node_defined = false
@ -115,7 +115,7 @@ SimpleEventHook {
event:set_data ("target", target)
elseif target_value and dont_fallback then
-- send error to client and destroy node if linger is not set
local linger = cutils.parseBool (si_props ["target.linger"])
local linger = cutils.parseBool (si_props ["node.linger"])
if not linger then
local node = si:get_associated_proxy ("node")
lutils.sendClientError (event, node, "defined target not found")

View file

@ -48,7 +48,7 @@ SimpleEventHook {
return
end
local dont_fallback = cutils.parseBool (si_props ["target.dont-fallback"])
local dont_fallback = cutils.parseBool (si_props ["node.dont-fallback"])
local target_picked = false
local allow_fallback
@ -76,7 +76,7 @@ SimpleEventHook {
event:set_data ("target", target)
elseif is_smart_filter and dont_fallback then
-- send error to client and destroy node if linger is not set
local linger = cutils.parseBool (si_props ["target.linger"])
local linger = cutils.parseBool (si_props ["node.linger"])
if not linger then
local node = si:get_associated_proxy ("node")
lutils.sendClientError (event, node, "smart filter defined target not found")

View file

@ -399,8 +399,8 @@ function CreateDeviceLoopbackSource (dev_name, dec_desc, dev_id)
["bluez5.loopback"] = true,
["stream.dont-remix"] = true,
["node.passive"] = true,
["target.dont-fallback"] = true,
["target.linger"] = true
["node.dont-fallback"] = true,
["node.linger"] = true
},
["playback.props"] = Json.Object {
["node.name"] = string.format ("bluez_source.%s", dev_name),

View file

@ -30,9 +30,9 @@ function configProperties (node)
["priority.session"] = np ["priority.session"],
["device.id"] = np ["device.id"],
["card.profile.device"] = np ["card.profile.device"],
["target.dont-fallback"] = np ["target.dont-fallback"],
["target.dont-move"] = np ["target.dont-move"],
["target.linger"] = np ["target.linger"],
["node.dont-fallback"] = np ["node.dont-fallback"],
["node.dont-move"] = np ["node.dont-move"],
["node.linger"] = np ["node.linger"],
}
for k, v in pairs (np) do