Commit graph

31 commits

Author SHA1 Message Date
Julian Bouzas
a9ac1fdc06 update to the latest pipewire API 2020-01-13 15:07:08 -05:00
Julian Bouzas
df6d1e7e2b tests: add config-static-nodes unit test 2020-01-09 08:50:03 -05:00
Julian Bouzas
d3d977cbe4 config-policy: add timeout when waiting on conditional variables 2019-12-27 08:38:07 -05:00
Julian Bouzas
d485c1192a base-endpoint: add _get_global_id API 2019-12-16 13:37:05 -05:00
Julian Bouzas
7ac9c6359c modules: only allow 'sink' and 'source' strings when parsing direction in config files 2019-12-16 13:37:05 -05:00
Julian Bouzas
0ad0c9fb9d base-endpoint: add _get_priority API 2019-12-16 13:37:05 -05:00
Julian Bouzas
3fe1e96e2e config-policy: remove parsing of streams file
This is now done by the config endpoint module
2019-12-16 13:37:05 -05:00
Julian Bouzas
acda80d77c modules: add config endpoint module 2019-12-16 13:36:56 -05: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
aab57d791e tests: make sure core is connected before starting config-policy tests 2019-12-06 13:26:56 -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
d5c3f7ee87 tests: add config-policy unit test 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
George Kiagiadakis
6e4752a736 tests: add unit test for WpSession (proxy + exported) 2019-12-04 18:50:43 +02:00
George Kiagiadakis
ce3883c1a2 lib: add WpSpaProps, a helper to deal with SPA_PARAM_Props & SPA_PARAM_PropInfo 2019-12-04 18:49:14 +02:00
George Kiagiadakis
6f358e9a3a adapter: select a reasonable device format instead of letting pipewire choose its own 2019-11-18 11:02:03 +02:00
George Kiagiadakis
e7e5c66853 lib: introduce WpObjectManager
* rework how global objects are stored in the core
* rework how users get notified about global objects
  and proxies of remote global objects

The purpose of this change is to have a class that can manage
objects that are registered in the core or signalled through the
registry. This object can declare interest on certain types
of global objects and only keep & signal those objects that it is
interested in. Additionally, it can prepare proxy features and
asynchronously deliver an 'objects-changed' signal, which is
basically telling us that the list of objects has changed.

This is useful to simplify port proxies management in WpAudioStream.
Now the stream object can declare that it is interested in ports
that have "node.id" == X and the object manager will only maintain
a list of those. Additionally, it will emit the 'objects-changed'
signal when the list of ports is complete, so there is no reason to
do complex operations and core syncs in the WpAudioStream class
in order to figure out when the list of ports is ready.

As a side effect, this also reduces resource management. Now we
don't construct a WpProxy for every global that pipewire reports;
we only construct proxies when there is interest in them!

Another interesting side effect is that we can now register an
object manager at any point in time and get immediately notified
about remote globals that already exist. i.e. when you register
an object manager that is interested in nodes, it will be immediately
notified about all the existing nodes in the graph. This is useful
to avoid race conditions between connecting the signal and objects
beting created in pipewire
2019-11-13 15:49:39 +02:00
Bastien Nocera
e8fadbcbda build: Fix build after recent PipeWire header changes
PipeWire headers were recently cleaned up to reduce the number of
included headers. This leads to a number of functions and types not
being included when needed in wireplumber.
2019-11-06 16:18:30 +02:00
George Kiagiadakis
5a70ed31a8 tests: proxy: fix failure due to property key change in pipewire 2019-10-10 12:30:45 +03:00
Julian Bouzas
ac53b1165b test: move wireplumber tests into a 'wp' subfolder 2019-09-09 08:52:36 -04:00
George Kiagiadakis
371e4cf9f3 core: allow passing properties to the pw_core and pw_remote constructors 2019-09-07 18:21:17 +03:00
George Kiagiadakis
a63f2bb99b lib/wp: merge both WpRemote & WpRemotePipewire in WpCore
In practice we always create a remote and connect to pipewire.
Any other scenario is invalid, therefore, it is not justified
to be confused with so many classes for such small functionality.
This simplifies a lot the modules code.

Also, this commit exposes the pw_core and pw_remote objects
out of WpCore. This is in practice useful when dealing with low-level
pw and spa factories, which are used in the monitors. Let's not
add API wrappers for everything... Bindings will never use this
functionality anyway, since it depends on low level pipewire C API.
2019-09-07 17:55:46 +03:00
George Kiagiadakis
7608ae37b5 lib: implement WpProxyClient 2019-08-27 18:28:58 +03:00
George Kiagiadakis
a5e867172d tests: proxy: add unit test for WpProxyNode and enum_params in particular 2019-08-27 17:40:28 +03:00
George Kiagiadakis
31a7537110 tests: proxy: improvements in the fixture and basic test
* move the watchdogs in the fixture setup
* use a new GMainContext on each fixture to avoid test dependencies
* test wp_proxy_sync
2019-08-27 17:40:28 +03:00
George Kiagiadakis
e5a05dcc2b proxy-*: improve proxy subclasses
* add proxy sync method
* add wrapers for enum/set/subscribe_params
* move the info structure handling to the subclasses
* expose info->props as WpProperties
2019-08-27 17:40:28 +03:00
George Kiagiadakis
2e28c9aea1 tests: add unit test for WpProxy
This also adds a "test server" helper, which is used to
start a local pipewire server in the same process, for testing
functionality that requires a server.
2019-08-25 12:45:24 +03:00
George Kiagiadakis
8cf8b0b886 tests: add unit test skeleton and a test for WpProperties 2019-08-24 16:19:12 +03:00