Ashok Sidipotu
d9d3a49f5a
settings: remove unnecessary log message
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
85900fba64
m-lua-scripting: support dangling components
...
- Dangling components are those not present in the json config files but present
in the wireplumber lookup folders.
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
6f039003ec
component-loader: support dangling components
...
- Dangling components are those not present in the json config files but present
in the wireplumber lookup folders.
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
904751ede1
main.c: refactor the init transition with priority tag
...
- Support `priority` tag in definition of wireplumber components in json
config files.
- Support loading dangling components. These are components which are
NOT present in the json config files but present in the wireplumber
lookup folders.
- Simplify the init transition by removing the unneeded steps.
2023-04-17 07:48:18 -04:00
Julian Bouzas
78b0dd58db
conf: move endpoints into wireplumber.settings
2023-04-17 07:48:18 -04:00
George Kiagiadakis
497f30453d
lib: event-hook/dispatcher: constness and staticness fixes
2023-04-17 07:48:18 -04:00
Julian Bouzas
1da43c6031
settings: append matches if the rule name matches
2023-04-17 07:48:18 -04:00
Julian Bouzas
36cba7fe55
config: comment all remaining rules
2023-04-17 07:48:18 -04:00
Julian Bouzas
6afca096e8
policy-device-profile.lua: use default rules if none are defined
2023-04-17 07:48:18 -04:00
Julian Bouzas
56087777f6
bluez.lua: use default rules if none are defined
2023-04-17 07:48:18 -04:00
Julian Bouzas
ed79e9a4d0
alsa.lua: use default rules if none are defined
2023-04-17 07:48:18 -04:00
Julian Bouzas
4bb949fd89
access-default.lua: use default rules if none are defined
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
119b99dc23
event-dispatcher: Add a trace log msg to indicate the events created
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
0fadd4f4fd
wpexec: Add support for event dispatcher
...
-Scripts loaded with wpexec will also need 'module-standard-event-source'
to be able to convert the pipewire signals to wireplumber events.
-Simplify the init transition states.
2023-04-17 07:48:18 -04:00
Julian Bouzas
a8d6d50e2a
config: use wireplumber nomenclature for the setting names
2023-04-17 07:48:18 -04:00
Julian Bouzas
fe21c2f8b2
config: comment persistent.settings to false as it is its default value
2023-04-17 07:48:18 -04:00
Julian Bouzas
6a612db57a
config: make remaining non rule settings optional
2023-04-17 07:48:18 -04:00
Julian Bouzas
f1fbeaa661
m-lua-scripting: add fallback value for parse_{array|object}_safe() APIs
2023-04-17 07:48:18 -04:00
Julian Bouzas
f416482f65
config: always comment the default values
...
This allows users to know what values are set by default.
2023-04-17 07:48:18 -04:00
Julian Bouzas
f6c4590299
config: consider dependency valid if not defined in WpSettings
...
Needed so that the configuration is fully commented.
2023-04-17 07:48:18 -04:00
Julian Bouzas
c5c36b26ba
config: move all components into wireplumber.conf
2023-04-17 07:48:18 -04:00
Julian Bouzas
8df09a872b
config: fix flags for libpipewire-module-rt
2023-04-17 07:48:18 -04:00
Julian Bouzas
5dcb4f0037
config: use the pipewire directory
2023-04-17 07:48:18 -04:00
Julian Bouzas
d79d3e1465
policy-device-endpoint.lua: remove unused move configuration
2023-04-17 07:48:18 -04:00
Julian Bouzas
a23168af52
policy-hooks.lua: set move configuration to true by default
2023-04-17 07:48:18 -04:00
Julian Bouzas
048a975818
common-utils.lua: use different timeout callbacks for different states
...
This allows saving different states at the same time.
2023-04-17 07:48:18 -04:00
Julian Bouzas
c64139afbe
conf: comment persistent.settings as it is disable by default
2023-04-17 07:48:18 -04:00
Julian Bouzas
3c26f278cd
module-settings: refactor to only load state file when plugin is enabled
...
Also fixes issues with persistent.settings not working if no changes have
happened.
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
f4382da5ba
policy-hooks.lua: An example of user injectible hook
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
bbe3b919d3
policy-{node|hooks}.lua: Fix issues in Zoom Desktop Video Sharing.
...
Fixes #339
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
40a1c3b948
m-lua-scripting: Return the event in the push_event API
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
68eaede3e4
event-dispatcher: Group after-events-with-event hooks of a session item
...
after-events-with-event hooks are rendered based on the priority, this means
when a rescan event happens, all the findDefinedTarget hooks(of different
session items) are run first and then all the findDefinedTarget hooks, so on.
This kind of scheduling of hooks was removing the established link between zoom
voice engine and digial mic. Also It is slightly difficult to follow the flow in
the logs.
Instead of arranging the hooks flately based on priority, better scheme to
prioritize them in two layers. First all the hooks for an event or session items
are grouped and with in that group, priority of the hook is honored.
src/scripts/policy-hooks.lua # modified: src/scripts/policy-node.lua #
2023-04-17 07:48:18 -04:00
Julian Bouzas
89dcd64003
settings: make sure WpSpaJson is valid after doing wp_iterator_next()
2023-04-17 07:48:18 -04:00
Julian Bouzas
b84261773a
settings: make sure WpSpaJson is not NULL when checking its type
2023-04-17 07:48:18 -04:00
Julian Bouzas
d0e27ac82e
settings: remove wp_settings_get_all() API
...
Not used anymore. It is better to use parse_object_safe() Lua API instead.
2023-04-17 07:48:18 -04:00
Julian Bouzas
61fe102c28
main: parse component flags in a more robust way
2023-04-17 07:48:18 -04:00
Julian Bouzas
90eb2c831f
main: always expect component deps to be a JSON array
...
Makes the configuration simpler
2023-04-17 07:48:18 -04:00
Julian Bouzas
0491fd172f
main: use smart pointers to avoid wp_spa_json_unref()
2023-04-17 07:48:18 -04:00
Julian Bouzas
42fc17b234
config: clean and comment all configuration that is not needed by default
...
Most of the configuration settings have a default value when they are loaded by
the Lua scripts if they are not present, so we leave them commented in the
configuration. This will make the configuration smaller when supporting layered
configuration, as all the commented sections will be part of the override files.
2023-04-17 07:48:16 -04:00
Ashok Sidipotu
e1ff6bf4bf
main.c: Allow for array of dependencies
...
A Wireplumber component can now be loaded dependent on an array of
wireplumber settings.
2023-04-17 07:47:09 -04:00
Ashok Sidipotu
efb0c5a635
Wireplumber Settings: Port the latest changes from master
...
Port them from Lua config to JSON config.
2023-04-17 07:47:09 -04:00
Ashok Sidipotu
6762de3990
policy-{bluetooth|device-profile|device-routes}.lua: Optimize for Event stack
...
- Sharpen the hooks.
- Make settings live, apply them when they are changed.
- Move some of the common functions to common_utils.lua
2023-04-17 07:47:09 -04:00
Ashok Sidipotu
8e7611fa9f
m-default-nodes{-api}: Correct the critical log msg
2023-04-17 07:47:09 -04:00
Ashok Sidipotu
66c63a91a9
monitors: Align nomenclature of the settings and rules
2023-04-17 07:47:09 -04:00
Ashok Sidipotu
335fe69461
restore-stream.lua: optimize for event-stack
...
- Sharpen the hooks.
- Make settings live, apply them when they are changed.
- Move common funtions to common-utils.lua
2023-04-17 07:47:09 -04:00
Ashok Sidipotu
4dd8dd6ce5
policy-node.lua: apply policy settings live
...
Also change the setting names as per nomenclature.
2023-04-17 07:47:09 -04:00
Julian Bouzas
d28d7d4278
settings: use WpSpaJson instead of raw string in WpSettingsChangedCallback
...
Avoids users to construct a WpSpaJson every time the callback is triggered.
2023-04-17 07:47:09 -04:00
Julian Bouzas
a512ddaaf3
scripts: use the WpSettings safe APIs
...
Avoids Lua errors if a setting cannot be parsed or does not exist.
2023-04-17 07:47:09 -04:00
Julian Bouzas
a77fe0b021
settings: add APIs to parse all types safely
2023-04-17 07:47:09 -04:00
Ashok Sidipotu
a060c6a130
m-default-nodes{-api}: optimize for event-stack
...
- Sharpen the hooks, so that they are called only when needed.
- Make settings live, apply them when they are changed.
- Remove the state saver after events hook, call it directly.
- Remove the settings bookkeeping as the gobject properties.
- Remove the scheduling of default-nodes-changed signal via core.
2023-04-17 07:47:09 -04:00