mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-02-05 11:20:28 +01:00
tests/si-*: use new WpObjectManager API
This commit is contained in:
parent
bd9ae98c9b
commit
82b598edbf
2 changed files with 10 additions and 18 deletions
|
|
@ -185,19 +185,15 @@ test_si_audio_softdsp_endpoint_export (TestFixture * f, gconstpointer user_data)
|
|||
/* find self_client, to be used for verifying endpoint.client.id */
|
||||
|
||||
clients_om = wp_object_manager_new ();
|
||||
wp_object_manager_add_interest (clients_om, WP_TYPE_CLIENT, NULL,
|
||||
WP_PROXY_FEATURE_BOUND);
|
||||
wp_object_manager_add_interest_1 (clients_om, WP_TYPE_CLIENT, NULL);
|
||||
wp_object_manager_request_proxy_features (clients_om,
|
||||
WP_TYPE_CLIENT, WP_PROXY_FEATURE_BOUND);
|
||||
g_signal_connect_swapped (clients_om, "objects-changed",
|
||||
G_CALLBACK (g_main_loop_quit), f->base.loop);
|
||||
wp_core_install_object_manager (f->base.core, clients_om);
|
||||
g_main_loop_run (f->base.loop);
|
||||
|
||||
{
|
||||
g_autoptr (WpIterator) it = wp_object_manager_iterate (clients_om);
|
||||
g_auto (GValue) val = G_VALUE_INIT;
|
||||
g_assert_true (wp_iterator_next (it, &val));
|
||||
g_assert_nonnull (self_client = g_value_dup_object (&val));
|
||||
}
|
||||
g_assert_nonnull (self_client =
|
||||
wp_object_manager_lookup (clients_om, WP_TYPE_CLIENT, NULL));
|
||||
|
||||
/* create item */
|
||||
|
||||
|
|
|
|||
|
|
@ -235,19 +235,15 @@ test_si_simple_node_endpoint_export (TestFixture * f, gconstpointer user_data)
|
|||
/* find self_client, to be used for verifying endpoint.client.id */
|
||||
|
||||
clients_om = wp_object_manager_new ();
|
||||
wp_object_manager_add_interest (clients_om, WP_TYPE_CLIENT, NULL,
|
||||
WP_PROXY_FEATURE_BOUND);
|
||||
wp_object_manager_add_interest_1 (clients_om, WP_TYPE_CLIENT, NULL);
|
||||
wp_object_manager_request_proxy_features (clients_om,
|
||||
WP_TYPE_CLIENT, WP_PROXY_FEATURE_BOUND);
|
||||
g_signal_connect_swapped (clients_om, "objects-changed",
|
||||
G_CALLBACK (g_main_loop_quit), f->base.loop);
|
||||
wp_core_install_object_manager (f->base.core, clients_om);
|
||||
g_main_loop_run (f->base.loop);
|
||||
|
||||
{
|
||||
g_autoptr (WpIterator) it = wp_object_manager_iterate (clients_om);
|
||||
g_auto (GValue) val = G_VALUE_INIT;
|
||||
g_assert_true (wp_iterator_next (it, &val));
|
||||
g_assert_nonnull (self_client = g_value_dup_object (&val));
|
||||
}
|
||||
g_assert_nonnull (self_client = wp_object_manager_lookup (clients_om,
|
||||
WP_TYPE_CLIENT, NULL));
|
||||
|
||||
/* create item */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue