[pulseaudio-discuss] [PATCH 11/19] module: Fire hooks for new, proplist changed and removed
Juho Hämäläinen
juho.hamalainen at tieto.com
Thu Mar 19 04:50:52 PDT 2015
---
src/pulsecore/module.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index 1081ad3..d79ef07 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -192,6 +192,8 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
pa_modinfo_free(mi);
}
+ pa_hook_fire(&m->core->hooks[PA_CORE_HOOK_MODULE_NEW], m);
+
return m;
fail:
@@ -232,6 +234,7 @@ static void pa_module_free(pa_module *m) {
pa_log_info("Unloaded \"%s\" (index: #%u).", m->name, m->index);
pa_subscription_post(m->core, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_REMOVE, m->index);
+ pa_hook_fire(&m->core->hooks[PA_CORE_HOOK_MODULE_REMOVED], m);
pa_xfree(m->name);
pa_xfree(m->argument);
@@ -354,4 +357,5 @@ void pa_module_update_proplist(pa_module *m, pa_update_mode_t mode, pa_proplist
pa_proplist_update(m->proplist, mode, p);
pa_subscription_post(m->core, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_CHANGE, m->index);
+ pa_hook_fire(&m->core->hooks[PA_CORE_HOOK_MODULE_PROPLIST_CHANGED], m);
}
--
1.9.1
More information about the pulseaudio-discuss
mailing list