Commit graph

96 commits

Author SHA1 Message Date
George Kiagiadakis
3d46253dd6 proxy: hide the bind() API and fix attaching the listener in wrap mode
In case the proxy was created with wp_proxy_new_wrap(), the event
listener was not attached on the pw_proxy
2019-08-29 21:21:51 +03:00
George Kiagiadakis
ac7086d156 modules: port to new WpProxy API 2019-08-29 21:21:33 +03:00
George Kiagiadakis
ff59fc06db lib: properties: add update() and copy_from_dict() API 2019-08-29 19:41:04 +03:00
George Kiagiadakis
7608ae37b5 lib: implement WpProxyClient 2019-08-27 18:28:58 +03:00
George Kiagiadakis
789194b5c3 Merge remote-tracking branch 'origin/master' into proxy-refactoring 2019-08-27 18:10:41 +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
Julian Bouzas
dcbf823a5a endpoint: add direction property and remove it from subclasses 2019-08-27 10:05:59 -04:00
Julian Bouzas
de97be850a adapter: do not use hardcoded format 2019-08-26 10:31:44 -04:00
George Kiagiadakis
bdce3b4de5 proxy: refactor the proxy class to hide pipewire API and make things easier 2019-08-25 12:44:47 +03:00
George Kiagiadakis
2031809d60 lib: add new WpProperties object to wrap pw_properties & spa_dict 2019-08-24 16:19:12 +03:00
Julian Bouzas
aa07ec09e4 remote-pipewire: add find_factory API 2019-08-19 10:41:33 -04:00
George Kiagiadakis
d4f882d731 Update for the pw_global "parent" concept removal 2019-08-19 15:24:00 +03:00
Julian Bouzas
f5a51c6a81 remote-pipepwire: add module_load, load_spa_handle, add_spa_lib and export APIs 2019-08-13 14:26:38 -04:00
Julian Bouzas
759aa450af remove remote-endpoints and use the new pipewire API 2019-08-13 14:26:38 -04:00
George Kiagiadakis
baaccc92f7 proxy: fix the naming of variables that point to the instance and private structures 2019-07-25 12:27:40 +03:00
Julian Bouzas
dbd763bc9c proxy: throw an error if the proxy is destroyed during async constructions 2019-07-25 12:24:47 +03:00
George Kiagiadakis
1ed004c3c1 policy: implement a basic policy based on role priorities
* Every client has a priority based on its role
* For playback, we allow only a single client to play at a time
* For capture, we allow all clients to capture simultaneously
* Every time the "selected" device changes (either because devices
  are discovered/removed or because the user changed the selection),
  the clients are re-linked to the new "selected" device.
* When a playback client quits and there are others waiting unlinked,
  the highest priority one is linked automatically.
* This also properly fixes re-linking the correct client(s) to the
  correct device(s) when wireplumber exits and restarts.
2019-07-12 19:28:27 +03:00
Julian Bouzas
54721da7c4 Fix doc warnings 2019-07-12 08:20:08 -04:00
Julian Bouzas
682bc6a6eb proxy: allow derived classes to finish its creation 2019-07-10 11:22:29 -04:00
Julian Bouzas
27a31498c0 endpoint: add wp_endpoint_unlink API 2019-07-10 11:18:09 -04:00
Julian Bouzas
5d1397cf56 endpoint: destroy the link before removing them from the lists 2019-07-10 11:18:09 -04:00
Julian Bouzas
3cecccd681 endpoint: allow derived classes of endpoint-link to finish async construction 2019-07-10 11:18:09 -04:00
Julian Bouzas
1231001961 proxy-link: add new API 2019-07-10 11:18:06 -04:00
Julian Bouzas
cf0e68a0f4 factory: remove unneeded sync construction API 2019-06-28 12:34:03 -04:00
Julian Bouzas
5429d57cb1 endpoint-link: make contruction async 2019-06-28 12:33:00 -04:00
Julian Bouzas
e73553088b proxy: remove unneeded destroy signal 2019-06-27 07:23:20 -04:00
Julian Bouzas
495a74d0e6 endpoint: remove unneeded ref/unref 2019-06-26 12:36:59 -04:00
Julian Bouzas
ded3106efc core: handle global references in a simpler way 2019-06-26 12:35:55 -04:00
George Kiagiadakis
39b5bc8b15 Merge branch 'async-endpoints' into 'master'
Async endpoints

See merge request gkiagia/wireplumber!13
2019-06-26 09:22:52 +00:00
Julian Bouzas
4333c94531 endpoint: add async initable interface boilerplate 2019-06-24 10:52:02 -04:00
Julian Bouzas
6fbf2527fb factory: add async support 2019-06-24 10:51:40 -04:00
George Kiagiadakis
f412166315 remote-pipewire: emit global-added for all proxy types 2019-06-24 17:20:42 +03:00
George Kiagiadakis
661010a36b Merge branch 'registry' into 'master'
Registry

See merge request gkiagia/wireplumber!12
2019-06-24 10:25:41 +00:00
George Kiagiadakis
1f82868e0c remote-pipewire: do not leak the GSource 2019-06-24 11:10:21 +03:00
Julian Bouzas
d84217c1e9 remote-pipewire: add registry listener 2019-06-20 12:55:32 -04:00
Julian Bouzas
83394022cb proxy: don't remove the listener on destruction as it is not needed 2019-06-20 11:59:51 -04:00
Julian Bouzas
236ea5e0f2 proxy: add wp_proxy_sync API and DONE signal 2019-06-20 11:59:51 -04:00
George Kiagiadakis
1e6c7488bd proxy: avoid crashing when the WpProxy is unrefed in the "destroyed" signal handler 2019-06-20 18:55:50 +03:00
George Kiagiadakis
0c9d6e8282 meson: add option to disable gobject introspection
Fixes #1
2019-06-20 15:48:29 +03:00
George Kiagiadakis
ee00a24688 core: destroy globals in _dispose() so that the global-removed signal is dispatched
signal emission apparently does not work in _finalize()

Fixes some critical warnings from remote-endpoint.c because disconnection
from the destroyed endpoints did not happen
2019-06-20 13:00:16 +03:00
Julian Bouzas
fc7ebc2c31 proxy: add global_id property 2019-06-19 09:07:00 -04:00
George Kiagiadakis
b770cf6a3e core: remove_global: remove object from the list before triggering the notification
This avoids being able to find the same object on the globals list
from code that is connected to the signal.
2019-06-18 19:39:52 +03:00
George Kiagiadakis
ca1453febd endpoint: add some useful API for querying info about streams & controls 2019-06-18 17:42:06 +03:00
George Kiagiadakis
ecad76d995 policy: consume floating reference of GVariant in _find_endpoint() 2019-06-18 17:41:34 +03:00
Julian Bouzas
a471a2df13 proxy: remove unneeded core reference 2019-06-18 10:18:21 -04:00
Julian Bouzas
922065f97d proxy: add destroyed signal 2019-06-18 10:09:40 -04:00
George Kiagiadakis
e603ed4215 lib: add some debug statements to debug the destruction sequence 2019-06-18 10:33:38 +03:00
George Kiagiadakis
64affcaf49 proxy: maintain a weak ref to the core
avoids criticals and crashes when the core is destroyed earlier
2019-06-18 10:21:58 +03:00
George Kiagiadakis
ab73fd6eb0 endpoint: maintain a weak ref to the core since construction time
+ add a method to retrieve the core
+ change the register function to not require the core as a parameter
2019-06-18 09:23:40 +03:00
George Kiagiadakis
7b9e8a030e lib: add a new WpRemote base class and move the pw_remote glue into a new WpRemotePipewire
This is a cleaner way to interface with the remote pipewire daemon.
The WpRemote base class can be subclassed also for interfacing
with other daemons (hardware-specific managers, etc)
2019-06-17 20:28:06 +03:00