Commit Graph

22 Commits

Author SHA1 Message Date
George Kiagiadakis
9330208ada proxy/core: refactor object creation
* core no longer exposes create_remote/local_object
* node, device & link have constructor methods
  to enable the create_remote_object functionality
* added WpImplNode to wrap pw_impl_node and allow creating
  "local" node instances
* added WpSpaDevice to wrap spa_device and allow creating
  "local" device instances
* exporting objects in all cases now happens by requesting
  FEATURE_BOUND from the proxy, eliminating the need for WpExported
* replaced WpMonitor by new, simpler code directly in module-monitor
* the proxy type lookup table in WpProxy is gone, we now
  use a field on the class structure of every WpProxy subclass
  and iterate through all the class structures instead; this is
  more flexible and extensible
2020-02-11 11:07:44 +02:00
George Kiagiadakis
c671b0faca lib: drop the proxy- prefix from client, device, link, port & node 2020-01-22 19:46:17 +02:00
Julian Bouzas
a9ac1fdc06 update to the latest pipewire API 2020-01-13 15:07:08 -05: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
7bd9f84e6f endpoint: add keep property 2019-12-04 16:38:35 -05: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
4ad4974f27 endpoint-link: ensure we call finalize of the parent class
This was causing a memory corruption and crash because the
simple-endpoint-link was not calling finalize of the endpoint-link
and the GWeakRefs pointing to the endpoints were not uninitialized,
causing g_object_unref later to try to write to them (on free'ed memory)
2019-11-16 11:40:02 +02:00
George Kiagiadakis
f360aed978 sofdsp-endpoint: run audioconvert in merge+split mode and use a new linking algorithm
Running audioconvert in merge+split mode is the only way to make this work with
the adapter, since the adapter does not support passing multiple channels on
a single port right now, and if it does at some point, it will be without a
mixing node on the port, which means we will not be able to mix multiple
audioconvert nodes on the same adapter. In the future we need to consider
writing a lighter volume node with multiple channels support to replace
audioconvert.

The new linking algorithm now takes into account the channel positions and makes
sure to link the correct channels together. Also, it avoids passing the port
proxies inside the GVariants, thus making the algorithm a bit more generic
and easier to unit test.
2019-10-02 21:27:44 +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
ac7086d156 modules: port to new WpProxy API 2019-08-29 21:21:33 +03:00
Julian Bouzas
759aa450af remove remote-endpoints and use the new pipewire API 2019-08-13 14:26:38 -04:00
Julian Bouzas
c27c020a66 simple-endpoint-link: skip already output linked ports 2019-07-25 12:27:40 +03:00
Julian Bouzas
1b69ef8339 simple-endpoint-link: store the created links in a list 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
51a1d9a36f simple-endpoint-link: dont link already linked ports 2019-07-05 12:21:57 -04:00
Julian Bouzas
5429d57cb1 endpoint-link: make contruction async 2019-06-28 12:33:00 -04:00
Julian Bouzas
ff2420b70a modules: add support for multiple channels linking 2019-06-24 14:27:52 -04: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
f1d1bff593 modules: add softdsp-endpoit and endpoint linking implementations 2019-06-10 11:51:18 -04:00
George Kiagiadakis
36bc1795ca Relicense to MIT 2019-05-31 12:13:12 +03:00
Julian Bouzas
92dc9d5cdf Fix no return statement warnings 2019-05-22 16:59:56 -04: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