85 Commits

Author SHA1 Message Date
Julian Bouzas
2f43e3a1e7 lib: add new session-bin class to handle multiple session items 2020-05-03 19:54:31 +03:00
George Kiagiadakis
db40a593b3 lib: implement WpObjectInterest 2020-05-01 19:21:08 +03:00
George Kiagiadakis
2ac6210b6d Merge branch 'master' into next 2020-04-14 15:17:01 +03:00
George Kiagiadakis
c80b87208b lib: add a debug logging system
This extends GLib's logging system, so it is compatible with
g_debug() and friends, but it uses a better logging format and
supports filtering debug domains with wildcards, like in gst.
2020-04-14 12:16:41 +03:00
Julian Bouzas
8c209ecf48 lib: add spa pod API 2020-04-13 13:32:04 -04:00
Julian Bouzas
b79fcf9418 lib: add spa type API 2020-04-09 13:09:57 -04:00
Julian Bouzas
5846fb919f lib: add iterator base class API 2020-04-07 14:18:11 -04:00
George Kiagiadakis
cbc2e51d14 lib: implement proxy & impl for PW_TYPE_INTERFACE_EndpointLink 2020-03-31 19:26:56 +03:00
George Kiagiadakis
1cc2837562 lib: add proxy & impl class for PW_TYPE_INTERFACE_EndpointStream 2020-03-31 16:11:08 +03:00
George Kiagiadakis
fc4fa4ca8a lib: implement WpSiFactory, a factory for session items 2020-03-29 15:02:59 +03:00
George Kiagiadakis
374c3dc9e2 lib: initial version of the WpSessionItem interfaces 2020-03-29 15:02:59 +03:00
George Kiagiadakis
32dd485649 lib: implement WpSessionItem base class 2020-03-29 15:02:59 +03:00
George Kiagiadakis
5f169d190f lib: implement a new WpTransition class
This is an asynchronous operation class, like GTask,
but it is made to execute several operations underneath,
using a state machine, instead of just a single operation.
2020-03-29 15:02:59 +03:00
George Kiagiadakis
467d745082 lib: remove WpExported 2020-02-12 11:30:49 +02:00
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
55ff0a6339 proxy: add WpProxyDevice subclass 2020-01-08 09:54:31 -05: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
77ec4c548c lib: introduce WpConfiguration
The purpose of this change is to have a generic API that allows modules to read
configuration data from files under a specific directory. Since we can have many
types of configuration files, this new class maps file extensions with generic
parsers defined in the modules, giving modules full freedom to parse any kind of
data.
2019-12-04 16:38:35 -05:00
George Kiagiadakis
82fe7831b1 lib: implement WpSession (proxy + exported for pw_session) 2019-12-04 18:49:47 +02:00
George Kiagiadakis
44e498ca01 lib: add WpExported, a base class for all exported objects 2019-12-03 18:05:34 +02: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
George Kiagiadakis
302e991b28 monitor: add a new WpMonitor class
This class wraps a SPA monitor and creates all
the devices and nodes as they are being discovered
2019-09-17 16:35:14 +03:00
George Kiagiadakis
10b117144a lib: expose and install wpenums.h 2019-09-17 16:35:14 +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
7608ae37b5 lib: implement WpProxyClient 2019-08-27 18:28:58 +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
1231001961 proxy-link: add new API 2019-07-10 11:18:06 -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
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
3aa7d6ce78 lib: remove the session-manager object and register endpoints as globals 2019-05-26 19:21:27 +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