mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-29 07:30:06 +01:00
m-std-event-source: Add rescan-for-media-role-volume
This allows us to do reduce the number of default volume updates. Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
parent
ee72196500
commit
93377a8b4f
1 changed files with 4 additions and 0 deletions
|
|
@ -38,6 +38,7 @@ typedef enum {
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RESCAN_CONTEXT_LINKING,
|
RESCAN_CONTEXT_LINKING,
|
||||||
RESCAN_CONTEXT_DEFAULT_NODES,
|
RESCAN_CONTEXT_DEFAULT_NODES,
|
||||||
|
RESCAN_CONTEXT_MEDIA_ROLE_VOLUME,
|
||||||
N_RESCAN_CONTEXTS,
|
N_RESCAN_CONTEXTS,
|
||||||
} RescanContext;
|
} RescanContext;
|
||||||
|
|
||||||
|
|
@ -48,6 +49,7 @@ rescan_context_get_type (void)
|
||||||
static const GEnumValue values[] = {
|
static const GEnumValue values[] = {
|
||||||
{ RESCAN_CONTEXT_LINKING, "RESCAN_CONTEXT_LINKING", "linking" },
|
{ RESCAN_CONTEXT_LINKING, "RESCAN_CONTEXT_LINKING", "linking" },
|
||||||
{ RESCAN_CONTEXT_DEFAULT_NODES, "RESCAN_CONTEXT_DEFAULT_NODES", "default-nodes" },
|
{ RESCAN_CONTEXT_DEFAULT_NODES, "RESCAN_CONTEXT_DEFAULT_NODES", "default-nodes" },
|
||||||
|
{ RESCAN_CONTEXT_MEDIA_ROLE_VOLUME, "RESCAN_CONTEXT_MEDIA_ROLE_VOLUME", "media-role-volume" },
|
||||||
{ 0, NULL, NULL }
|
{ 0, NULL, NULL }
|
||||||
};
|
};
|
||||||
if (g_once_init_enter (>ype_id)) {
|
if (g_once_init_enter (>ype_id)) {
|
||||||
|
|
@ -161,6 +163,8 @@ get_default_event_priority (const gchar *event_type)
|
||||||
return -490;
|
return -490;
|
||||||
else if (!g_strcmp0 (event_type, "rescan-for-linking"))
|
else if (!g_strcmp0 (event_type, "rescan-for-linking"))
|
||||||
return -500;
|
return -500;
|
||||||
|
else if (!g_strcmp0 (event_type, "rescan-for-media-role-volume"))
|
||||||
|
return -510;
|
||||||
else if (!g_strcmp0 (event_type, "node-state-changed"))
|
else if (!g_strcmp0 (event_type, "node-state-changed"))
|
||||||
return 50;
|
return 50;
|
||||||
else if (!g_strcmp0 (event_type, "metadata-changed"))
|
else if (!g_strcmp0 (event_type, "metadata-changed"))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue