Commit graph

369 commits

Author SHA1 Message Date
Julian Bouzas
bd19c2ddef spa-type: fix param profile's last Id 2020-12-30 12:35:26 -05:00
George Kiagiadakis
e48cb30828 Fix compiler warnings that appear with the warning flags enabled
Fixes #20
2020-12-20 22:16:37 +02: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
bc17aaa397 plugin: add name property 2020-10-22 08:40:27 -04: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
George Kiagiadakis
fb8d4b1b1f metadata: remove WP_METADATA_FEATURES_STANDARD and fix copyright years 2020-08-31 16:22:11 +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
3e65325519 metadata: fix more coding style issues 2020-07-31 17:46:09 +03:00
raghu447
65b4562fa0 Implement PW_TYPE_INTERFACE_Metadata 2020-07-30 21:30:14 +05:30
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
a3870581fb spa-device / m-monitor: fix pw_proxy leaks reported by pw_core
1. device export proxies must be destroyed manually since they are
   not associated with the WpRegistry
2. the monitors should not disconnect before all WpSpaDevice objects
   are destroyed; remove the manual disconnect call and let GObject
   ref counting do its job (the core will disconnect when its last ref
   count is dropped after the last monitor plugin is destroyed)
2020-06-29 13:05:44 +03:00
George Kiagiadakis
697226f306 session-bin: call parent's reset() in reset()
otherwise the parent never un-exports or de-activates itself
and we leak a bunch of stuff
2020-06-18 19:28:03 +03:00
George Kiagiadakis
d471ba3d9c object-interest: don't use G_GNUC_FALLTRHOUGH
it requires GLib 2.60 and it's not worth it
2020-06-16 19:18:20 +03:00
George Kiagiadakis
1563eeeae6 object-interest: initialize GValue passed to g_object_get_property
g_object_get_property did not support uninitialized GValues prior
to GLib 2.60, and it's not worth requiring 2.60 for this reason

Fixes #11
2020-06-16 19:16:04 +03:00
Julian Bouzas
322094565f properties: all properties from other must be included in self for the match to be valid 2020-06-16 12:56:04 +03:00
George Kiagiadakis
083b9ff878 core: wp_core_get_context -> wp_core_get_g_main_context 2020-06-16 12:53:18 +03:00
George Kiagiadakis
7668f4c6c9 core: add methods to work with pw_core_info data and pw_core properties
- pw_core_info has data that represent the remote core
- pw_core properties are the properties of its pw_client,
initially inherited from the pw_context, which can be updated either
when calling pw_context_connect() or later at runtime (the pw_core
calls pw_client_update_properties() on its pw_client)

wp_core_update_properties() is made in such a way so that we can do:
```
clone = wp_core_clone(core);
wp_core_update_properties(clone, ...);
wp_core_connect(clone);
```
and get clone to have different properties than the original core,
while they still share the same pw_context underneath
2020-06-15 17:50:03 +03:00
George Kiagiadakis
0596988945 core: retrieve and store core info
also delay the "connected" signal until info is there
2020-06-15 17:49:21 +03:00
George Kiagiadakis
0d1fcd48a1 properties: add wp_properties_unref_and_take_pw_properties()
a method to take the internal pw_properties without copying
2020-06-15 17:22:47 +03:00
George Kiagiadakis
c72d126374 properties: const-ify the pw_properties in _new_wrap()
and do not allow writing to wrapped pw_properties,
since they are const now
2020-06-15 17:20:10 +03:00
George Kiagiadakis
b70cbca84e spa-device: store the constructor properties and use them for export + object-info
the spa object undereath doesn't do that and we lose a bunch of
properties otherwise
2020-06-15 11:10:39 +03:00
Julian Bouzas
382b550d26 spa-device: don't destroy the task until the proxy is bound when exporting 2020-06-12 15:04:36 -04:00
George Kiagiadakis
8a0abd4fb8 spa-device: subclass from GObject 2020-06-11 15:05:20 +03:00
Julian Bouzas
c7982a8317 core: rename context property to g-main-context 2020-06-10 13:29:52 -04:00
Julian Bouzas
eb39dec68b core: add wp_core_clone API 2020-06-10 13:29:44 -04:00
George Kiagiadakis
8d77793a2a improve some debug logs 2020-06-10 12:53:22 +03:00
George Kiagiadakis
7a486f1f7c impl-node: subclass from GObject
By mistake, WpImplNode was developed by keeping in mind that the proxy
returned by pw_core_export() is a PW_TYPE_INTERFACE_Node, but this
is not true. It's actually a ClientNode...

Unfortunately, making WpImplNode work as if it was a WpNode is
not so easy, especially when it comes to handling params, which
need to be queried syncrhonously on the underlying spa_node.

So, instead of fixing WpImplNode to work as a WpNode, we choose to
disconnect them. This way, WpImplNode will not be used as a proxy
in the registry and the registry will normally create WpNode proxies
instead, making round-trips through the server to change node params.
2020-06-10 11:12:11 +03:00
Julian Bouzas
be8629fbec spa-pod: keep a reference of the pod in the ierator 2020-06-04 09:48:43 -04:00
Julian Bouzas
9728418b6d spa-pod: remove const-ness from API 2020-06-04 09:48:43 -04:00
Julian Bouzas
1e2dcb44ca spa-pod: set the type to regular when creating int spa pod 2020-06-04 09:48:43 -04:00
Julian Bouzas
671d748b4b spa-pod: remove _wrap_copy APIs from the private header 2020-06-04 09:48:43 -04:00
Julian Bouzas
3a93190ec9 lib: fix const compile warnings by using the wp_spa_pod_new_wrap_const API 2020-06-04 09:48:43 -04:00
Julian Bouzas
e63ca28b3a spa-pod: add _new_wrap_const APIs 2020-06-04 09:48:43 -04:00
Julian Bouzas
b9acfcb237 spa-pod: rename spa pod _new_regular_wrap APIs to just _new_warp 2020-06-04 09:48:43 -04:00
George Kiagiadakis
71d12fe12a debug: add doc comments 2020-06-03 21:40:01 +03:00
George Kiagiadakis
f7d816f5d2 debug: print proxy bound IDs on objects, if they are bound proxies 2020-06-03 21:28:14 +03:00
George Kiagiadakis
1bae4a6a41 proxy: use a core sync to know when Props have been enumerated
This is necessary to finish augmenting nodes that advertise
PropInfo & Props in their param info but they don't actually have
any properties, so there is no param event emitted
(ex. the jack device nodes)

Because the sync is synchronous with the calls over the protocol,
the callback is ensured to be called after all the param events
have been emitted
2020-06-03 20:28:43 +03:00
George Kiagiadakis
a3cf986188 proxy: fix recursion crash in _set_feature_ready 2020-06-02 19:21:04 +03:00
George Kiagiadakis
e1e6411e19 proxy: when requesting Props, only try to enum them if the proxy supports them
otherwise we get stuck waiting for the param event
and we get warnings on the debug log
2020-06-02 19:09:18 +03:00
George Kiagiadakis
8627fdf1a0 proxy: fix crash when _augment_error() is called recursively from within itself 2020-06-02 18:37:42 +03:00
George Kiagiadakis
c8b11fad42 lib: add a version header 2020-06-02 18:26:40 +03:00
George Kiagiadakis
b17dab8c9b spa-device: delay activation until after the device is exported
this allows the created nodes to be able to set their "device.id"
property correctly
2020-06-02 17:24:14 +03:00
George Kiagiadakis
e4e60c2ece endpoint-stream: add GObject property to access the name 2020-06-02 13:09:00 +03:00
George Kiagiadakis
8c40bbbce0 endpoint: add GObject properties to access the name, media-class & direction 2020-06-02 13:09:00 +03:00
George Kiagiadakis
0bba0c0df1 properties: fix const-ness warnings 2020-06-02 13:09:00 +03:00
George Kiagiadakis
78209c48c7 endpoint/endpoint-stream: remove useless virtual methods
they are not useful anymore because we hijack priv->info from the
impl subclass, so that it points to the impl info struct,
and therefore the base implementations work just fine
2020-06-02 13:09:00 +03:00
George Kiagiadakis
d8a42d2ec3 Revert "lib: return empty WpProperties if the info struct has no properties on SM objects"
This reverts commit 917a019b01.
2020-06-01 18:29:28 +03:00
George Kiagiadakis
917a019b01 lib: return empty WpProperties if the info struct has no properties on SM objects 2020-06-01 17:48:54 +03:00
George Kiagiadakis
a7d657a196 object-manager: do not accept globals without a WpProxy subclass 2020-06-01 17:48:31 +03:00