Commit graph

240 commits

Author SHA1 Message Date
George Kiagiadakis
6b51e5842c tests: add session-item unit test 2020-04-16 11:55:23 +03:00
George Kiagiadakis
0e855d854a modules: implement si-standard-link, the default WpSiLink implementation 2020-04-11 11:05:09 +03:00
George Kiagiadakis
f713cbee11 session-item: decouple reset from deactivate and export from activate
* It should be possible to activate/deactivate while an item
  is exported (if the item supports it, but that's a subclass matter)
* It should be possible to deactivate without resetting configuration
2020-04-09 19:24:42 +03:00
George Kiagiadakis
1f1c690b42 properties: remove _copy_keys and add update/add methods similar to the ones in pw_properties 2020-03-31 16:11:08 +03:00
George Kiagiadakis
306f75d321 session-item: implement and use _get_associated_proxy() API 2020-03-31 16:11:08 +03:00
George Kiagiadakis
79a39e98c9 transition: call execute_step() with _STEP_ERROR in error conditions
This allows the implementation to rollback changes, cancel jobs, etc
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
865b6ba535 modules: softdsp-endpoint: disable exporting with WpImplEndpoint 2020-03-29 15:02:59 +03:00
George Kiagiadakis
7b20baa671 modules: drop module-session 2020-03-29 15:02:59 +03:00
George Kiagiadakis
0c455a0c11 si-adapter: port to use WpSiFactory 2020-03-29 15:02:59 +03:00
George Kiagiadakis
51f7897aa1 modules: implement the "adapter" session item, as a reference 2020-03-29 15:02:59 +03:00
Julian Bouzas
c2dfec2184 monitor: add dbus-reservation flag 2020-03-20 14:01:22 -04:00
Julian Bouzas
8887cce5b4 modules: add monitor reservation data API 2020-03-20 14:01:22 -04:00
Julian Bouzas
daa8091666 modules: add monitor dbus device reservation API with unit tests 2020-03-20 14:01:20 -04:00
Julian Bouzas
9c44900e68 config-policy: fix endpoint refcount issues 2020-03-17 12:06:21 -04:00
Julian Bouzas
91eb754b96 softdsp-endpoint: simplify and remove object_safe_new_finish function 2020-03-03 13:27:18 -05:00
Julian Bouzas
8646a3b003 modules: add WpVideoEndpoint sub-class to handle video 2020-03-03 13:27:15 -05:00
Julian Bouzas
60bdea1ed6 modules: add jack-device module 2020-03-03 11:14:13 -05:00
Julian Bouzas
e4d895902c config-static-nodes: skip devices without WP_PROXY_FEATURE_INFO 2020-02-28 10:59:42 -05:00
Julian Bouzas
d3df321e3d config-endpoint-context: skip nodes with null media-class 2020-02-28 10:48:43 -05:00
George Kiagiadakis
ca8d100b3f meson: temporarily add check to conditionally enable the fade functionality
and in case it's missing, also #define some things to make compilation work,
since this is only available in a pipewire branch right now
2020-02-28 13:25:35 +02:00
Julian Bouzas
a861e47643 config-policy: fade in/out when streams are linked/unlinked 2020-02-27 08:39:15 -05:00
Julian Bouzas
8c674b9f69 base-endpoint: add wp_base_endpoint_begin_fade API 2020-02-27 08:39:15 -05:00
Julian Bouzas
b1d03cd637 stream: add wp_audio_stream_begin_fade API 2020-02-27 08:39:15 -05:00
Julian Bouzas
eaea2156cb stream: create an audio-fade-source control node if there is a control port 2020-02-27 08:37:15 -05:00
Julian Bouzas
16cdac6dd6 convert/adapter: enable control port if input direction 2020-02-27 08:37:15 -05:00
Julian Bouzas
2439cab55f convert: use factory name SPA macro 2020-02-27 08:37:15 -05:00
Julian Bouzas
8aa695770c tests: config-policy: run the main loop in the same thread 2020-02-26 15:51:58 -05:00
Julian Bouzas
fefa4b9191 config-endpoint-context: add _get_length API 2020-02-26 11:36:09 -05:00
Julian Bouzas
49716f603c config-static-nodes-context: add _get_length API 2020-02-26 11:05:02 -05:00
Julian Bouzas
8e719eb47c config-static-nodes: use WP_PROXY_FEATURES_STANDARD when agumenting static nodes
This will solve a possible race condition in the unit test when destroying the
autotestsrc proxy while its node_event_info is being called.
2020-02-25 09:57:02 -05:00
George Kiagiadakis
87cc64b40b module-session: export session after the core is connected
wp_exported_export() used to do that internally, but it's cleaner
to do it this way now
2020-02-14 17:18:58 +02:00
George Kiagiadakis
753e708544 object-manager: refactor to be able to track locally created proxies
There are 3 kinds of WpProxy objects:
 * the ones that are created as a result of binding a global
   from the registry
 * the ones that are created as a result of calling into a remote
   factory (wp_node_new_from_factory, etc...)
 * the ones that are a local implementation of an object
   (WpImplNode, etc...) and are exported

Previously the object manager was only able to track the first kind.
With these changes we can now also have globals associated with
WpProxies that were created earlier (and caused the creation of the global).
This saves some resources and reduces round-trips (in case client
code wants to change properties of an object that is locally
implemented, it shouldn't need to do a round-trip through the server)
2020-02-14 17:12:23 +02:00
George Kiagiadakis
a92e1a64ec global & object-manager: use GType instead of the pipewire type 2020-02-12 14:15:51 +02:00
George Kiagiadakis
c9cab2cd53 endpoint: refactor into WpEndpoint & WpImplEndpoint 2020-02-12 11:30:21 +02:00
George Kiagiadakis
8e50fab112 session: refactor into WpSession & WpImplSession 2020-02-12 11:28:02 +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
d8ae151aba proxy: replace global-id with bound-id
+ use the pw_proxy API to find the bound id instead
of relying on WpGlobal

This has the advantage that it works also for exported
objects and for objects that have been created by calling
into a remote factory (such as the link-factory), so we can
now know the global id of all proxies, not only the ones
that have been created by the registry.
2020-02-10 18:58:41 +02:00
George Kiagiadakis
c671b0faca lib: drop the proxy- prefix from client, device, link, port & node 2020-01-22 19:46:17 +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
f7a0e710a5 lib: remove wp_proxy_sync in favor of wp_core_sync
They are equivalent, there is no real benefit in having both
2020-01-22 18:07:16 +02:00
George Kiagiadakis
efb33ddd1b lib: introduce export macros and hide all private symbols 2020-01-16 18:50:07 +02:00
Julian Bouzas
83a0725b6a modules: remove match priorities from config files and use the filename instead 2020-01-14 09:15:22 -05:00
Julian Bouzas
a9ac1fdc06 update to the latest pipewire API 2020-01-13 15:07:08 -05:00
Julian Bouzas
4ec61d79b8 config-static-nodes: add config static nodes module
This module allows wireplumber to create static nodes that match a specific
device using a spa node factory. Matching is optional, and if there is no match,
the node will always be created.
2020-01-09 08:50:03 -05:00
Julian Bouzas
3396470f01 modules: simplify config endpoint module 2020-01-09 08:50:03 -05:00
George Kiagiadakis
0e98e4150b config-policy: debug handling of endpoints 2019-12-19 14:49:57 +02:00
George Kiagiadakis
40e4ce8909 config-policy: push endpoints with keep=true to the end of the list when sorting
This ensures that endpoints with keep=false will still have
a chance to link when ones with keep=true exist. This also effectively
means that role priority does not matter when keep=true: we keep these
links active no matter what, while policy still applies normally for
all others.

For example, a final sorted list with these endpoints will end up
looking like this:

* ep1, role priority=25, keep=false
* ep2, role priority=20, keep=false
* ep3, role priority=25, keep=true
* ep4, role priority=75, keep=true

... which will effectively cause ep1, ep3 and ep4 to be linked.
2019-12-19 14:43:40 +02:00
George Kiagiadakis
729aee5c4c config-policy: do not unlink other endpoints when linking one with keep=true
keep=true should work in both ways:
* keep the endpoint with this property linked at all times
* keep other already linked endpoints when linking this one
2019-12-19 14:40:50 +02:00
George Kiagiadakis
3c5b5ea08c config-policy: remove _can_link_stream() function
This is no longer needed since we sort endpoints by role priority
before trying to link them and we link only the highest priority one.
After this sorting, the highest priority endpoint is guaranteed
to be able to link, so _can_link_stream() always returns TRUE.
2019-12-19 14:38:01 +02:00