Commit graph

568 commits

Author SHA1 Message Date
George Kiagiadakis
29c35ce8aa si-convert: fix internal link handling
* there is just one link, no need for a list
* warn if something goes wrong and don't assert
2020-05-07 17:01:27 +03:00
George Kiagiadakis
3cfd0d3dc8 si-convert: use the "reverse" port context on self for the internal links 2020-05-07 16:54:12 +03:00
George Kiagiadakis
c02bff50cd si-standard-link: add options to use different port contexts 2020-05-07 16:48:06 +03:00
George Kiagiadakis
cc72b3757c si-standard-link: manage lifetime internally 2020-05-07 16:38:14 +03:00
George Kiagiadakis
f24fc53d5a tests/common: add common function for ensuring an object manager is installed
It can be a bit tricky because the "installed" signal may be fired
from inside the context of wp_core_install_object_manager(),
in which case the main loop should not be executed (or it will never quit)
2020-05-07 16:16:45 +03:00
George Kiagiadakis
9db4a54591 session-item: handle destroyed endpoint links
We can now call wp_proxy_request_destroy() on endpoint links and
the WpImplEndpointLink together with the session item that created
it will be cleaned up
2020-05-07 16:02:23 +03:00
George Kiagiadakis
ded2e34eb6 global: properly destroy impl proxies that were removed by the server
When a pw_global is removed on the server (by pw_registry_destroy() or other
means), it triggers the proxy removed & the registry global_remove callbacks,
but it does not necessarily destroy the pw_proxy.

For client proxies, we were previously destroying them by unrefing the WpProxy
in wp_global_rm_flags(), since the global was not "owned" by the WpProxy.

For impl proxies, we were not doing anything, as we expected that it would
only be removed from the registry if the local WpProxy was destroyed first.
This is not always the case, though, as the server or another client may
request to destroy this proxy with pw_registry_destroy()

Now we always destroy the pw_proxy as soon as it is removed from the registry,
no matter if it was a client or an impl proxy. If it was an impl proxy,
the WpProxy will continue to live and it's up to the code that created it
to handle the "pw-proxy-destroyed" signal and do something meaningful.
If it was a client proxy, the global will still unref the WpProxy right after
destroying the pw_proxy and there is no change in behavior.
2020-05-07 15:50:14 +03:00
George Kiagiadakis
3b086167ae proxy: add _request_destroy() method for destroying remote objects
Useful to destroy links and endpoint-links
2020-05-07 15:47:15 +03:00
George Kiagiadakis
bd0ede2c6a object-manager: add _is_installed() method to query installation status 2020-05-07 15:45:00 +03:00
George Kiagiadakis
a10ee91bd4 core: add idle & timeout method variants that take a GClosure 2020-05-07 11:10:12 +03:00
George Kiagiadakis
6501307d27 tests: add si-standard-link unit test 2020-05-05 18:04:50 +03:00
George Kiagiadakis
7966a8d456 si-standard-link: fix endpoint linking bugs and add some debug statements 2020-05-05 18:04:05 +03:00
George Kiagiadakis
48d7c44fd4 link: add method to get object ids 2020-05-05 18:04:05 +03:00
George Kiagiadakis
7377d15f42 debug: handle null objects in WP_OBJECT_ARGS 2020-05-05 18:04:05 +03:00
George Kiagiadakis
52b52ea63c session/endpoint/node: proxy the object-manager API for looking up child objects 2020-05-05 18:04:05 +03:00
George Kiagiadakis
b97540a109 endpoint: add wp_endpoint_create_link method 2020-05-05 18:04:05 +03:00
George Kiagiadakis
23ae8c0d51 tests/si-softdsp-endpoint: add tests for streams 2020-05-04 18:04:53 +03:00
George Kiagiadakis
b74dfdee71 si-convert: cleanup config verification 2020-05-04 18:04:33 +03:00
George Kiagiadakis
adc4b20487 session-bin: improve iterator 2020-05-04 18:03:53 +03:00
George Kiagiadakis
82b598edbf tests/si-*: use new WpObjectManager API 2020-05-04 16:29:36 +03:00
George Kiagiadakis
bd9ae98c9b tests/si-softdsp-endpoint: fix the tests to reflect the latest changes 2020-05-04 16:04:37 +03:00
George Kiagiadakis
015d61ccb4 si-softdsp-endpoint: fix issues with the activation transition 2020-05-04 14:20:44 +03:00
George Kiagiadakis
ba81c1e6fe si-softdsp-endpoint: do not create si-convert streams internally
streams should be provided externally,
the user may choose to create any kind of stream
2020-05-04 14:19:39 +03:00
George Kiagiadakis
874d39d99c si-softdsp-endpoint: use the adapter's stream if it's the only one 2020-05-04 14:14:24 +03:00
George Kiagiadakis
82abe41759 session-bin: add _get_n_children() method 2020-05-04 14:13:32 +03:00
George Kiagiadakis
90c6962a2a si-convert: construct the node internally and cleanup steps + configuration options 2020-05-04 13:20:06 +03:00
George Kiagiadakis
9df3bb715c modules/si-*: cleanup included headers 2020-05-04 11:24:14 +03:00
George Kiagiadakis
3cecc18807 adapter: remove spa_pod_fixate fallback
This won't work with WpSpaPod, obviously...
2020-05-04 10:36:24 +03:00
George Kiagiadakis
e265d8e5a0 adapter: implement WpSiPortInfo and use node FEATURE_PORTS instead of ports_om 2020-05-04 10:12:35 +03:00
George Kiagiadakis
1ac66d4f62 adapter: fix indentation 2020-05-04 09:45:22 +03:00
George Kiagiadakis
9612d35ca4 si-interfaces: drop the multi-endpoint interface
It's not well-defined; we'll come back to that later
2020-05-04 09:35:22 +03:00
George Kiagiadakis
c95ee22702 Revert "modules: si-adapter: set/unser WP_SI_FLAG_CONFIGURED when adapter is configured/reset"
This reverts commit 4e8ae293f5.
2020-05-03 20:10:31 +03:00
Julian Bouzas
fc864eb2b3 tests: add export test for si-audio-softdsp-endpoint 2020-05-03 19:54:31 +03:00
Julian Bouzas
791e9170aa si-interfaces: transfer full when returning from _get_stream_parent_endpoint 2020-05-03 19:54:31 +03:00
Julian Bouzas
230c103f18 session-item: add _get_parent API 2020-05-03 19:54:31 +03:00
Julian Bouzas
e810d32719 tests: add basic test for si-audio-softdsp-endpoint 2020-05-03 19:54:31 +03:00
Julian Bouzas
4e8ae293f5 modules: si-adapter: set/unser WP_SI_FLAG_CONFIGURED when adapter is configured/reset 2020-05-03 19:54:31 +03:00
Julian Bouzas
19c91596c8 algorithms: make sure channels is always less or equal to SPA_AUDIO_MAX_CHANNELS
Needed when using audiotestsrc with an adapter
2020-05-03 19:54:31 +03:00
Julian Bouzas
63482108df modules: add si-softdsp-audio-endpoint module 2020-05-03 19:54:31 +03:00
Julian Bouzas
2f43e3a1e7 lib: add new session-bin class to handle multiple session items 2020-05-03 19:54:31 +03:00
Julian Bouzas
2d186ed681 modules: add si-convert module 2020-05-03 19:54:31 +03:00
George Kiagiadakis
bccb160bc2 port some more deprecated object-manager calls 2020-05-03 19:49:21 +03:00
George Kiagiadakis
735b44c238 object-manager/proxy: sprinkle some debug/trace statements 2020-05-03 19:44:42 +03:00
George Kiagiadakis
3617ca07ae lib: align node/endpoint/session features ports/streams/endpoints,links
- Use similar code for consistency
- Add changed signals everywhere
- Port to the new object-manager API
2020-05-03 19:42:42 +03:00
George Kiagiadakis
83f399395c proxy: emit 'bound' after setting FEATURE_BOUND
signal handlers expect FEATURE_BOUND to be set
2020-05-03 17:46:49 +03:00
George Kiagiadakis
9e1b5de93f object-manager: port to WpObjectInterest and add more useful API based on it 2020-05-01 19:23:54 +03:00
George Kiagiadakis
db40a593b3 lib: implement WpObjectInterest 2020-05-01 19:21:08 +03:00
George Kiagiadakis
70214fcd26 debug: add wp_critical* macros 2020-05-01 12:00:28 +03:00
George Kiagiadakis
738b88aaba debug: randomize object printout colors
This way we can more easily distinguish different objects when
looking at the log, although it's not perfect
2020-04-27 11:49:55 +03:00
George Kiagiadakis
2c1df41a16 debug: optimize wp_log_level_is_enabled()
Add the 'const' attribute to let the compiler know that it doesn't
need to call it multiple times for the same debug level argument,
since the enabled log levels cannot change at runtime.
2020-04-27 10:57:59 +03:00