mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
add subscription subsystem
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@112 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
fc618e9f31
commit
3d374e9f67
11 changed files with 236 additions and 2 deletions
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "module.h"
|
||||
#include "xmalloc.h"
|
||||
#include "subscribe.h"
|
||||
|
||||
#define UNLOAD_POLL_TIME 10
|
||||
|
||||
|
|
@ -92,6 +93,8 @@ struct pa_module* pa_module_load(struct pa_core *c, const char *name, const char
|
|||
assert(r >= 0 && m->index != PA_IDXSET_INVALID);
|
||||
|
||||
fprintf(stderr, "module: loaded %u \"%s\" with argument \"%s\".\n", m->index, m->name, m->argument);
|
||||
|
||||
pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_NEW, m->index);
|
||||
|
||||
return m;
|
||||
|
||||
|
|
@ -117,6 +120,8 @@ static void pa_module_free(struct pa_module *m) {
|
|||
|
||||
fprintf(stderr, "module: unloaded %u \"%s\".\n", m->index, m->name);
|
||||
|
||||
pa_subscription_post(m->core, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_REMOVE, m->index);
|
||||
|
||||
pa_xfree(m->name);
|
||||
pa_xfree(m->argument);
|
||||
pa_xfree(m);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue