Commit Graph

26 Commits

Author SHA1 Message Date
George Kiagiadakis
4a1a19d7cd session: add FEATURE_ENDPOINTS, a feature to cache endpoint proxies 2020-04-01 13:38:39 +03:00
George Kiagiadakis
4adf6105ba endpoint: implement FEATURE_STREAMS
This feature enables the caching of WpEndpointStream objects
inside WpEndpoint, making information about streams readily
accessible to the user of an endpoint
2020-03-31 16:11:08 +03:00
George Kiagiadakis
405e8ba0d5 session-item / endpoint: implement exporting a WpSiEndpoint
* introduces API to export session items
* introduces small changes in the WpSiEndpoint & WpSiStream
  interfaces to make it nicer to work with
* ports WpImplEndpoint to use PW_TYPE_INTERFACE_Endpoint
  to export. Depends on:
  https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/246
  (was merged after 0.3.2)
2020-03-29 15:18:20 +03:00
George Kiagiadakis
d4973363ac lib: add extensive API documentation 2020-02-19 10:43:07 +02:00
George Kiagiadakis
c9cab2cd53 endpoint: refactor into WpEndpoint & WpImplEndpoint 2020-02-12 11:30:21 +02:00
George Kiagiadakis
5c47f1df2c proxy: unify common info/params API in the WpProxy base class 2020-01-22 18:30:44 +02:00
George Kiagiadakis
efb33ddd1b lib: introduce export macros and hide all private symbols 2020-01-16 18:50:07 +02:00
George Kiagiadakis
7b222ebcbd endpoint: export name, media class & direction + finetune the global properties 2019-12-11 19:05:09 +02: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
c8417f8826 endpoint: add get_role API 2019-12-04 16:38:35 -05:00
Julian Bouzas
7bd9f84e6f endpoint: add keep property 2019-12-04 16:38:35 -05:00
Julian Bouzas
d49ffbef1d endpoint: add get_properties API 2019-12-04 16:38:35 -05: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
Julian Bouzas
44bb78fcb7 endpoint: add creation-time property 2019-11-06 12:15:11 +02:00
Julian Bouzas
dcbf823a5a endpoint: add direction property and remove it from subclasses 2019-08-27 10:05:59 -04:00
Julian Bouzas
27a31498c0 endpoint: add wp_endpoint_unlink API 2019-07-10 11:18:09 -04:00
Julian Bouzas
5429d57cb1 endpoint-link: make contruction async 2019-06-28 12:33:00 -04:00
Julian Bouzas
4333c94531 endpoint: add async initable interface boilerplate 2019-06-24 10:52:02 -04: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
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
36bc1795ca Relicense to MIT 2019-05-31 12:13:12 +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
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
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