Commit Graph

18 Commits

Author SHA1 Message Date
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
9ab1780594 core & proxy: add some more assertions and debug messages for troubleshooting 2019-10-02 21:20:19 +03:00
George Kiagiadakis
340b52fbee proxy: fix crash that happens when a client exits very quickly after starting
This is very easy to reproduce when the pipewire-alsa integration
is installed and you do 'arecord -l'; the alsa plugin connects and
disconnects again before the proxy is ready.

In this case we have to skip remote-global-added and we also have
to be careful with the references: the global-removed callback is
called earlier, so the core's reference to the proxy is gone and
the GTask is the only thing holding a reference to the proxy.
When we unref the GTask, the proxy is also unrefed, so we have
to keep an additional reference in order to avoid crashing
when accessing the hash table below.
2019-09-17 16:19:13 +03: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
Julian Bouzas
54721da7c4 Fix doc warnings 2019-07-12 08:20:08 -04:00
Julian Bouzas
e73553088b proxy: remove unneeded destroy signal 2019-06-27 07:23:20 -04:00
Julian Bouzas
ded3106efc core: handle global references in a simpler way 2019-06-26 12:35:55 -04: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
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
Julian Bouzas
a471a2df13 proxy: remove unneeded core reference 2019-06-18 10:18:21 -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
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
25d70c5446 lib: add new WpPolicy class and basic policy management functionality 2019-06-13 14:51:20 +03:00
George Kiagiadakis
36bc1795ca Relicense to MIT 2019-05-31 12:13:12 +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
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