Commit graph

65 commits

Author SHA1 Message Date
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
Julian Bouzas
aa1ce5cdd4 proxy: add API 2019-06-17 10:42:29 -04:00
George Kiagiadakis
5a863fe50c WpPolicy: add a way of signaling policy changes
This can be used by code that depends on policy to re-evaluate
choices they have made in the past that could now change based
on the new policy.
2019-06-14 15:29:57 +03:00
George Kiagiadakis
25d70c5446 lib: add new WpPolicy class and basic policy management functionality 2019-06-13 14:51:20 +03:00
George Kiagiadakis
45dc9786f4 endpoint: ref the endpoint while unregistering
The core may be the last object holding a reference to the endpoint,
so the unregister call may destroy it.
2019-06-11 12:49:11 +03:00
Julian Bouzas
cad748ae91 endpoint: set core to null after unregistering endpoint and not before 2019-06-06 12:51:05 -04:00
George Kiagiadakis
36bc1795ca Relicense to MIT 2019-05-31 12:13:12 +03:00
Julian Bouzas
dcf749bd40 endpoint: fix bug when linking endpoints 2019-05-30 10:22:04 -04:00
George Kiagiadakis
98fe322897 meson: export the module & config dirs to the C code
This allows loading of config and modules when deployed in
the target system without setting environment variables.
2019-05-29 17:36:22 +03:00
George Kiagiadakis
97c9da62ff meson: properly install modules, headers and add {so,}version on the lib 2019-05-29 12:47:26 +03:00
George Kiagiadakis
3aa7d6ce78 lib: remove the session-manager object and register endpoints as globals 2019-05-26 19:21:27 +03:00
George Kiagiadakis
1b6d9720c8 core: allow having a flat list of globals with the same key
and also implement
* global-added/removed signals
* a foreach function to iterate through globals
* registering modules and factories with the same key
2019-05-26 18:58:19 +03:00
George Kiagiadakis
bf60614032 improve debug statements a bit 2019-05-26 12:36:20 +03:00
George Kiagiadakis
940e1e70c0 endpoint: fix clearing the weak ref
g_weak_ref_clear destroys the weak ref, so it will crash
when _finalize() tries to destroy it again
2019-05-25 23:20:54 +03:00
George Kiagiadakis
aa78db35a7 session-manager: add endpoint-added/removed signals 2019-05-25 23:20:33 +03:00
George Kiagiadakis
901593e217 endpoint: improve GVariant format docs 2019-05-25 23:19:28 +03:00
George Kiagiadakis
d2ccd2996b Merge branch 'alsa-endpoints' of gitlab.freedesktop.org:julian/wireplumber 2019-05-25 23:17:20 +03:00
George Kiagiadakis
8e7f84d888 endpoint: add methods to register to the SM and use them in simple-endpoint
This changes the registration point to be the endpoint and not the
session manager, as it seems easier to implement (the implementation
will not need to keep a pointer to the session manager around)
2019-05-24 17:19:58 +03:00
Julian Bouzas
2fd0f63118 factory: don't use smart pointer when creating a factory 2019-05-23 14:09:59 -04:00
George Kiagiadakis
df48fd897d module/factory: add a get_core() method on both 2019-05-22 13:15:49 +03:00
George Kiagiadakis
06db0e414a factory: improve API and hide its implementation (better for introspection) 2019-05-22 13:03:24 +03:00
George Kiagiadakis
1c44476b5e endpoint: add documentation 2019-05-21 18:58:30 +03:00
George Kiagiadakis
5f853d0e53 endpoint: refactor slightly the public API
* Make streams a GVariant array, for future-proofness
* Add API for controls (volume, mute, brightness, contrast, etc...)
* Remove API for profiles (it's not well-thought; may be re-added
  in the future)
2019-05-21 18:27:07 +03:00
George Kiagiadakis
447c968846 Refactor everything!
After discussing things at the AGL May 2019 F2F meeting
and reflecting on the initial design of WirePlumber,
it became clear that it needed a fresh start.
2019-05-17 13:34:07 +03:00
George Kiagiadakis
43365715f7 many crash fixes 2019-04-28 14:20:00 +03:00
George Kiagiadakis
ac65d44bbf session: make the media_class a normal GObject property 2019-04-28 14:18:44 +03:00
George Kiagiadakis
bd1c233f43 Revert "lib: object: allow also using static interfaces using the WpObject API"
This reverts commit daa49af541.
2019-04-28 11:55:46 +03:00
George Kiagiadakis
e16e66de2d lib: object/interface: do not (transfer full) interfaces and objects 2019-04-26 13:19:18 +03:00
George Kiagiadakis
02c69fd2fa proxy: add methods to get info & enum params 2019-04-26 12:36:49 +03:00
George Kiagiadakis
b6d1df6d68 plugin: remove WP_PLUGIN_DEFINE_TYPE - bad idea 2019-04-23 16:30:36 +03:00
George Kiagiadakis
cb1b3ebfad proxy: expose pw properties as a spa_dict and store them in a pw_properties
Exposing a spa_dict is necessary to allow using native pipewire API
that deals with these properties.

The internal structure change avoids mem copies when we need to
return a spa_dict.

This commits also removes exposing internal info structures via the
properties mechanism. This needs more thinking...
2019-04-23 16:28:13 +03:00
George Kiagiadakis
daa49af541 lib: object: allow also using static interfaces using the WpObject API 2019-04-22 18:42:59 +03:00