Commit Graph

13 Commits

Author SHA1 Message Date
Julian Bouzas
c61d1e4245 component-loader: make wp_core_load_component() API asynchronous
This change completely refactors the way components are loaded in wireplumber:
- The module_init() function must return a GObject now. This object is either
a WpPlugin or a WpSiFactory in the current modules.
- When the component loader initializes a module, it automatically registers
the WpPlugin or WpSiFactory with their respective methods. There is no need
to register the WpPlugin or WpSiFactory in the module now.
- The wp_core_load_component() API has been refactored to be asynchronows. This
allows the component loader to automatically activate WpPlugin objects, and
therefore allows the application to directly get the WpPlugin without having
to find it. This simplifies a lot of things.
- The 'ifexists' and 'nofail' component flags now work even if the respective
WpPlugin could not be activated.
- The code that loads components in main.c has also been simplified a lot,
and the option to load dangling components has also been removed.
2023-04-17 07:48:18 -04:00
George Kiagiadakis
7b8e3e8088 m-mixer-api: fix channelVolumes array iteration in set-volume
Fixes: #250
2022-05-02 11:02:40 +03:00
Julian Bouzas
86d85584b2 m-mixer-api: unset iterator value before breaking or returning from loop 2021-12-20 09:54:05 +00:00
Julian Bouzas
7abd3728e7 build: fix volatile compatible-pointer-types warnings
Happens when compiling with GCC 11
2021-08-18 09:17:05 -04:00
Julian Bouzas
51128f0521 m-mixer-api: only add 'mute' if correctly parsed 2021-06-25 08:50:08 -04:00
George Kiagiadakis
7355215cf1 pipewire-object: change params-changed signal to take a string param name
To be consistent with the rest of the API where strings are used
to identify param types
2021-06-09 13:29:34 +03:00
Julian Bouzas
fc41af5c98 m-mixer-api: make sure the enum param iterator is valid
Some audio nodes such as null-audio-sink nodes don't support Props or Route enum
params.
2021-05-19 18:26:17 -04:00
George Kiagiadakis
07a8b5035e m-mixer-api: track monitorVolumes and allow modifying them
This only applies to non-device nodes, because monitorVolumes
are not exposed on device Routes
2021-04-26 17:35:32 +03:00
George Kiagiadakis
8861595d55 m-mixer-api: allow calling the action signals even when the plugin is not enabled 2021-04-15 17:00:15 +03:00
George Kiagiadakis
c7e32a638a m-mixer-api: add configurable support for the cubic volume scale
This is also what pulseaudio uses, so now the volumes in wpctl match what
pulseaudio tools report and they make a lot more sense from the user's POV
2021-04-09 15:52:17 +03:00
George Kiagiadakis
010cd308da m-mixer-api: also add channel-independent volume for ease of use 2021-04-09 15:52:17 +03:00
George Kiagiadakis
0aefd52593 m-mixer-api: fix getting volume info from nodes that don't have volumeBase & step
and optimize a little bit so that can stop iterating params
as soon as the info is known
2021-04-09 15:52:17 +03:00
George Kiagiadakis
523bc7a36d modules: add module-mixer-api
This module provides an API to get/set volume controls on nodes,
using the same logic as pipewire-pulse, which means it will use
the device Route props when a node is associated with a device
that has this capability
2021-04-09 15:52:17 +03:00