Commit Graph

490 Commits

Author SHA1 Message Date
George Kiagiadakis
8b2d8c90a2 endpoint proxy: don't try to set a control value if the proxy is destroyed 2019-12-12 20:09:17 +02:00
George Kiagiadakis
67cb633fb5 core: change idle_add to take a GDestroyNotify as well and return a source id
to make it more usable and compatible with g_idle_add
2019-12-12 20:07:46 +02:00
George Kiagiadakis
9d93fefa17 cli: add a set-volume command 2019-12-12 01:41:14 +02:00
George Kiagiadakis
8e40b18fb1 softdsp-endpoint: implement volume controls via the exported endpoint
and drop the WpBaseEndpoint controls entirely
2019-12-12 01:37:48 +02:00
George Kiagiadakis
f4c434728a cli: extend with operations to list endpoints and change the default 2019-12-11 23:51:12 +02:00
George Kiagiadakis
aa4fb5b1aa modules: implement module-session, a WpSession provider module
This keeps track of the default endpoint and selects a default
based on endpoint priorities when devices are discovered
2019-12-11 23:45:06 +02:00
George Kiagiadakis
bb7b8daa17 exported: delay export until the core is connected
This is useful to be able to call export() from a module init
function, which is called before the core is connected
2019-12-11 23:43:53 +02:00
George Kiagiadakis
787bd8d576 endpoint: implement get_{name,media_class,direction} 2019-12-11 23:43:13 +02:00
George Kiagiadakis
57ac90b188 config-policy: avoid race condition in the unit tests
Clear self->pending_endpoint before sending the done signal,
because the signal will trigger a new endpoint to be added in the
unit test and this may happen before g_clear_object is called,
in which case adding the new endpoint fails
2019-12-11 19:15:02 +02:00
George Kiagiadakis
57ffc0435f softdsp-endpoint: export Endpoint object on the pipewire registry 2019-12-11 19:05:09 +02:00
George Kiagiadakis
ff36ff31e5 session: ensure the exported properties do not leak object, client & factory ids
These are set by the server on the global properties set
2019-12-11 19:05:09 +02:00
George Kiagiadakis
7b222ebcbd endpoint: export name, media class & direction + finetune the global properties 2019-12-11 19:05:09 +02:00
George Kiagiadakis
a71d433a5e lib: implement WpEndpoint (interface + Proxy + Exported + unit test)
heavily based on the WpSession implementation
2019-12-11 19:05:09 +02:00
George Kiagiadakis
c0455c981d lib: rename WpEndpoint* to WpBaseEndpoint*
to avoid name clashing with the upcoming WpEndpoint interface
that is going to be the common interface of Wp{Proxy,Exported}Endpoint
2019-12-11 19:05:05 +02:00
Julian Bouzas
b999ecf9d4 tests: improved config policy priority test to make sure endpoint role works 2019-12-11 08:55:00 -05:00
Julian Bouzas
1dec637ab5 tests: clear core weak reference when finalizing endpoint-link-fake 2019-12-10 19:35:12 -05:00
Julian Bouzas
e8dad1a4f2 stream: clear proxy when finalizing 2019-12-10 19:34:30 -05:00
George Kiagiadakis
f789c4bce4 link-algorithm: link mono inputs to all available target ports
This avoids hearing mono audio only on the left speaker
2019-12-11 01:55:42 +02:00
George Kiagiadakis
3a4040ddaf config-policy: fix typo in variable check 2019-12-11 01:27:41 +02:00
George Kiagiadakis
133469d566 config-policy: fix stream priority logic when the stream name comes from media.role
the _can_link function was previously assuming that the target
stream is always specified in the configuration file
2019-12-11 01:04:41 +02:00
George Kiagiadakis
dcecc217d6 config-policy: add some more debug statements 2019-12-11 00:45:05 +02:00
George Kiagiadakis
c0bf6dca56 config: remove the stream from the default endpoint-link files
So that we can use media.role to specify the stream
2019-12-11 00:44:25 +02:00
Julian Bouzas
00006854f0 policy: store a core weak reference 2019-12-10 16:13:08 -05:00
Julian Bouzas
aab57d791e tests: make sure core is connected before starting config-policy tests 2019-12-06 13:26:56 -05:00
George Kiagiadakis
9764149e9d ci: pin pipewire to a specific working commit
Big API break happens after this commit and we cannot
keep up right now.
2019-12-06 20:07:46 +02:00
Julian Bouzas
e04f935952 core: return a boolean in sync API 2019-12-06 08:53:57 -05:00
Julian Bouzas
9b255922ff core: remove unnecessary idle callback when connecting 2019-12-06 08:53:51 -05:00
Julian Bouzas
8bdadd5a71 tests: fix config policy role test to work with new priotity logic 2019-12-05 10:51:39 -05:00
Julian Bouzas
34ebbe47d7 config-policy: prioritize role from configuration file
The role defined in the endpoint-link configuration files must have higher
priority than the one set in the endpoint. If none of them are set, the config
policy fallbacks to the lowest one defined in the streams configuration file
2019-12-05 10:50:10 -05:00
Julian Bouzas
9dac5fdaf5 parser-streams: add get_lowest_stream API 2019-12-05 10:46:34 -05:00
George Kiagiadakis
91e309bad0 config: fix typo 2019-12-05 14:27:17 +02:00
George Kiagiadakis
9fa9f1fe44 tools: initial implementation of a wireplumber-cli tool
Currently all it does is that it prints the properties
of all device nodes (Audio/Source & Audio/Sink), which
is useful for editing the configuration files
2019-12-05 13:29:28 +02:00
George Kiagiadakis
7a214e8fab wp_properties_match: use wildcard pattern matching instad of strict string comparison 2019-12-05 12:41:45 +02:00
George Kiagiadakis
a11cd3b651 parser-endpoint-link: make 'properties' subtables of 'match-endpoint' and 'target-endpoint' 2019-12-05 12:21:24 +02:00
George Kiagiadakis
92107e8342 object-manager: keep a reference to self while doing a core sync
Otherwise, if the object manager is destroyed while a sync is in progress,
we get an invalid 'self' pointer on the callback later, which is being
called regardless

There is a bit more work that should be done in the core to avoid leaking
this ref in case pipewire disconnects before the sync is completed
2019-12-05 12:05:34 +02:00
Julian Bouzas
d5c3f7ee87 tests: add config-policy unit test 2019-12-04 16:38:35 -05:00
Julian Bouzas
664db8a200 modules: add config policy module 2019-12-04 16:38:35 -05:00
Julian Bouzas
c8417f8826 endpoint: add get_role API 2019-12-04 16:38:35 -05:00
Julian Bouzas
d6ed17472a modules: always use the node name when creating endpoints 2019-12-04 16:38:35 -05:00
Julian Bouzas
cd3a414e2f softdsp-endpoint: remove persistent hack 2019-12-04 16:38:35 -05:00
Julian Bouzas
7bd9f84e6f endpoint: add keep property 2019-12-04 16:38:35 -05:00
Julian Bouzas
d49ffbef1d endpoint: add get_properties API 2019-12-04 16:38:35 -05:00
Julian Bouzas
b2c4162c2f policy: remove unneeded handle_endpoint callback 2019-12-04 16:38:35 -05:00
Julian Bouzas
ea3b58c2cd properties: add wp_properties_matches API 2019-12-04 16:38:35 -05:00
Julian Bouzas
58f321f815 object-manager: sync object-changed with pipewire's core 2019-12-04 16:38:35 -05:00
Julian Bouzas
61227c9da2 core: add sync API 2019-12-04 16:38:35 -05:00
Julian Bouzas
3cb74e0611 modules: remove simple policy
This will be replaced by a new policy based on configuration files
2019-12-04 16:38:35 -05:00
Julian Bouzas
2578ec4286 src: set the default configuration path when wireplumber starts 2019-12-04 16:38:35 -05:00
Julian Bouzas
77ec4c548c lib: introduce WpConfiguration
The purpose of this change is to have a generic API that allows modules to read
configuration data from files under a specific directory. Since we can have many
types of configuration files, this new class maps file extensions with generic
parsers defined in the modules, giving modules full freedom to parse any kind of
data.
2019-12-04 16:38:35 -05:00
Julian Bouzas
9a9d773b06 wptoml: add new library to parse TOML files 2019-12-04 16:38:35 -05:00