mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-05 15:58:01 +02:00
metadata: filter for the "default" metadata object in all places where we use it
there can be more metadata objects around...
This commit is contained in:
parent
b8979e7434
commit
a57647769a
3 changed files with 16 additions and 3 deletions
|
|
@ -202,7 +202,12 @@ if mixer_api then
|
|||
endpoints_om:activate()
|
||||
end
|
||||
|
||||
metadatas_om = ObjectManager { Interest { type = "metadata" } }
|
||||
metadatas_om = ObjectManager {
|
||||
Interest {
|
||||
type = "metadata",
|
||||
Constraint { "metadata.name", "=", "default" },
|
||||
}
|
||||
}
|
||||
metadatas_om:connect("object-added", function (om, metadata)
|
||||
metadata:connect("changed", function (m, subject, key, t, value)
|
||||
if key == "suspend.playback" then
|
||||
|
|
|
|||
|
|
@ -284,7 +284,12 @@ function reevaluateSiLinkables ()
|
|||
end
|
||||
|
||||
default_nodes = Plugin.find("default-nodes-api")
|
||||
metadatas_om = ObjectManager { Interest { type = "metadata" } }
|
||||
metadatas_om = ObjectManager {
|
||||
Interest {
|
||||
type = "metadata",
|
||||
Constraint { "metadata.name", "=", "default" },
|
||||
}
|
||||
}
|
||||
siendpoints_om = ObjectManager { Interest { type = "SiEndpoint" }}
|
||||
silinkables_om = ObjectManager { Interest { type = "SiLinkable",
|
||||
-- only handle si-audio-adapter and si-node
|
||||
|
|
|
|||
|
|
@ -577,7 +577,10 @@ set_default_parse_positional (gint argc, gchar ** argv, GError **error)
|
|||
static gboolean
|
||||
set_default_prepare (WpCtl * self, GError ** error)
|
||||
{
|
||||
wp_object_manager_add_interest (self->om, WP_TYPE_METADATA, NULL);
|
||||
wp_object_manager_add_interest (self->om, WP_TYPE_METADATA,
|
||||
WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY,
|
||||
"metadata.name", "=s", "default",
|
||||
NULL);
|
||||
wp_object_manager_add_interest (self->om, WP_TYPE_NODE,
|
||||
WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY,
|
||||
"object.id", "=u", cmdline.set_default.id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue