Commit graph

947 commits

Author SHA1 Message Date
George Kiagiadakis
91472c51e9 lib: move WpImplEndpoint* header parts to private/impl-endpoint.h 2020-11-15 20:26:15 +02:00
George Kiagiadakis
58310c73aa m-metadata: add callback for wp_object_activate()
A callback is required, NULL is not accepted by GCClosure
2020-11-15 20:26:15 +02:00
George Kiagiadakis
a7dcd3b76f src: port daemon to the new APIs 2020-11-15 20:26:15 +02:00
George Kiagiadakis
ccdc354445 modules: port modules and their tests to the new proxy APIs
Disable m-session-settings for now, as it needs further work
2020-11-15 20:26:15 +02:00
George Kiagiadakis
956cc83bfa object-manager: recursively store requested features on children
Now we have a deeper hierarchy, so requesting the features on WP_TYPE_PROXY
wouldn't properly request the features on WP_TYPE_NODE
2020-11-15 20:26:15 +02:00
George Kiagiadakis
403bb0643a impl-endpoint{,-stream}: disable FEATURE_PROPS temporarily 2020-11-14 13:23:20 +02:00
Julian Bouzas
e0e2e3920e m-endpoint-creation: remove undefined API 2020-11-13 14:20:54 -05:00
Julian Bouzas
f196803f88 m-endpoint-creation: remove unnused variable in Bluez5 endpoint creation 2020-11-13 14:20:54 -05:00
Julian Bouzas
f486cd389d m-device-activation: use profile from default-profile module if loaded 2020-11-13 14:20:54 -05:00
Julian Bouzas
af70cac05f modules: add module to store device profiles each time they change 2020-11-13 14:20:54 -05:00
Julian Bouzas
af423398c4 lib: add new WpState API to save and load data from files 2020-11-13 14:20:54 -05:00
Julian Bouzas
763f0f1795 m-monitor: add use-acp flag 2020-11-13 14:20:54 -05:00
George Kiagiadakis
1afc487353 tests: fix library unit tests 2020-11-13 19:54:48 +02:00
George Kiagiadakis
2f3f5f8e66 lib: refactor WpProxy
This is an attempt to unclutter the API of WpProxy and
split functionality into smaller pieces, making it easier
to work with.

In this new class layout, we have the following classes:

- WpObject: base class for everything; handles activating
|           and deactivating "features"
|- WpProxy: base class for anything that wraps a pw_proxy;
 |          handles events from pw_proxy and nothing more
 |- WpGlobalProxy: handles integration with the registry

All the other classes derive from WpGlobalProxy. The reason
for separating WpGlobalProxy from WpProxy, though, is that
classes such as WpImplNode / WpSpaDevice can also derive from
WpProxy now, without interfacing with the registry.

All objects that come with an "info" structure and have properties
and/or params also implement the WpPipewireObject interface. This
provides the API to query properties and get/set params. Essentially,
this is implemented by all classes except WpMetadata (pw_metadata
does not have info)

This interface is implemented on each object separately, using
a private "mixin", which is a set of vfunc implementations and helper
functions (and macros) to facilitate the implementation of this interface.

A notable difference to the old WpProxy is that now features can be
deactivated, so it is possible to enable something and later disable
it again.

This commit disables modules, tests, tools, etc, to avoid growing the
patch more, while ensuring that the project compiles.
2020-11-13 19:54:48 +02:00
George Kiagiadakis
4dec10396a lib: add new proxy-interfaces: interfaces for the refactored WpProxy class 2020-11-13 19:54:48 +02:00
George Kiagiadakis
6b40451657 lib/private: move the registry & global APIs to a separate header 2020-11-13 19:54:48 +02:00
George Kiagiadakis
36538a54b6 lib: add new WpObject base class
A base class for objects that can have optional
features enabled and disabled. The intention is to make
this the superclass of WpProxy.

Instead of following the augment() pattern of WpProxy,
this one follows the more advanced transition pattern
that has been previously implemented in WpSessionItem.
2020-11-13 19:54:48 +02:00
Julian Bouzas
321545a32c modules: refactor dbus reservation
The Dbus device reservation has been moved into a separate module, and has also
been refactored to allow reserving a device name before an actual device is
created. Devices now are created and destroyed by the monitor depending on
whether PipeWire owns the device or not. This also simplifies a lot the device
activation module to always enable devices when they are created, and never
worry about checking whether a device is acquired by PipeWire or not.
2020-10-22 14:33:59 -04:00
Julian Bouzas
bc17aaa397 plugin: add name property 2020-10-22 08:40:27 -04:00
Julian Bouzas
5e02c75574 wpctl: add set-profile option 2020-10-22 11:28:43 +00:00
George Kiagiadakis
268b7dd0a9 transition: stop and return error if cancelled by the GCancellable 2020-10-22 13:27:29 +03:00
Julian Bouzas
ffd43f397b device: set parent type to GObject in WpSpaDevice structure 2020-10-15 12:04:05 -04:00
Julian Bouzas
397a141150 m-endpoint-creation: add bluez5 endpoint creation for bluetooth devices 2020-10-05 11:35:24 -04:00
Julian Bouzas
7d35191091 m-config-endpoint: refactor and rename to endpoint-creation
Allows implementing device specific endpoint creation logic, which is currently
needed for bluetooth endpoints as they need to be created differenly.
2020-10-05 11:35:24 -04:00
Julian Bouzas
6a5a259fc7 modules: add bluez5 endpoint session item 2020-10-05 11:35:24 -04:00
Julian Bouzas
af196f4f5b modules: add fake stream session item 2020-10-05 11:35:24 -04:00
Julian Bouzas
236f6f8fc5 m-si-adapter: use the adapter's name as stream name 2020-10-05 11:35:24 -04:00
Julian Bouzas
b2438f2cef m-si-adapter: set the configured flag when configuration was successful 2020-10-05 11:35:24 -04:00
Julian Bouzas
c603409c60 m-config-policy: set the stream name to the media role propery by default 2020-10-05 11:35:24 -04:00
George Kiagiadakis
26800b80d6 gitlab-ci: really build with pipewire master
Apparently git cannot directly clone at an arbitrary commit,
it must be a branch or a tag
2020-09-01 11:12:30 +03:00
George Kiagiadakis
294ba3bda5 gitlab-ci: bump pipewire dependency to latest master
because otherwise the metadata unit test fails
2020-08-31 16:27:28 +03:00
George Kiagiadakis
fb8d4b1b1f metadata: remove WP_METADATA_FEATURES_STANDARD and fix copyright years 2020-08-31 16:22:11 +03:00
George Kiagiadakis
df258c3887 module-metadata: s/settings/plugin/ 2020-08-31 16:21:07 +03:00
George Kiagiadakis
40d2a186b6 tests: implement a WpMetadata unit test 2020-08-31 16:16:07 +03:00
George Kiagiadakis
3f160b552c metadata: improve implementation
* Implement the proxy properly with info caching, methods, etc
* Get rid of useless variables and includes
2020-08-31 16:14:47 +03:00
George Kiagiadakis
e68f8d4ae2 tests: fix permissions check failure with latest pipewire 2020-08-31 13:53:04 +03:00
George Kiagiadakis
3e65325519 metadata: fix more coding style issues 2020-07-31 17:46:09 +03:00
George Kiagiadakis
3ae506d223 modules: rename metadata module to just 'module-metadata' 2020-07-31 16:34:01 +03:00
raghu447
65b4562fa0 Implement PW_TYPE_INTERFACE_Metadata 2020-07-30 21:30:14 +05:30
George Kiagiadakis
a73e46e246 Makefile: set the default debug level to INFO, if not specified, for make run 2020-07-29 19:25:07 +03:00
George Kiagiadakis
71decc1734 main: allow entire blocks to be in comments without side-effects 2020-07-29 19:25:07 +03:00
Julian Bouzas
0913257d2e m-device-activation: assume last profile as the one with highest priority 2020-07-23 09:12:52 +00:00
Julian Bouzas
6550718823 m-device-activation: fix typo when parsing device profiles 2020-07-23 09:12:52 +00:00
David Runge
fbe1e5177b
Allow system cpptoml
meson.build:
When the 'wrap_mode' option is set to 'nodownload' use a system version
of cpptoml. This does not require using git and having a network
connection during build, which is important for Linux packaging
infrastructure.

subprojects/cpptoml.wrap:
Pin revision to last release tag (v0.1.1).

lib/wptoml/*.cpp:
Remove 'include/' prefix from all cpptoml related includes, at is not
required.

Closes #17
2020-07-22 20:25:58 +02:00
George Kiagiadakis
4eb853ca7a docs: mention that the test SPA plugins are required for unit tests
Related to #18
2020-07-20 12:20:53 +03:00
Julian Bouzas
86b80f4603 dbus-device-reservation: show error message when property request fails 2020-07-10 10:36:24 -04:00
Julian Bouzas
b0cab6c4e4 dbus-device-reservation: return if call_finish fails when requesting a property 2020-07-08 13:44:01 -04:00
George Kiagiadakis
280c0edfa6 config: improve {audio,video}testsrc.node config files
* add library.name to not require adding `add-spa-lib` in pipewire.conf
  or wireplumber.conf for this to work
* add a commented local=true; it can be useful to run those nodes
  locally for testing, sometimes
2020-07-02 17:07:25 +03:00
George Kiagiadakis
996699762c NEWS: release 0.3.0 2020-06-29 19:36:49 +03:00
George Kiagiadakis
e7d6ed4573 si-convert: watch links to the convert node instead of the node's state
there are underlying issues with the state management of the graph,
so it's not a very good idea to rely on it to activate / deactivate
our convert node depending on the links that exist

instead, track the links ourselves and create/destroy the corresponding
links to the target node accordingly; it's a more robust approach

it was also not entirely correct that we would previously configure
the convert node to be a driver (node.driver=true); maybe this caused
the underlying issues in the first place... we don't need it now
anyway, so it's gone
2020-06-29 18:58:34 +03:00