2009-02-12 03:19:40 +01:00
|
|
|
/***
|
|
|
|
|
This file is part of PulseAudio.
|
|
|
|
|
|
|
|
|
|
Copyright 2009 Lennart Poettering
|
|
|
|
|
|
|
|
|
|
PulseAudio is free software; you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU Lesser General Public License as published
|
2009-03-03 20:23:02 +00:00
|
|
|
by the Free Software Foundation; either version 2.1 of the License,
|
2009-02-12 03:19:40 +01:00
|
|
|
or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
PulseAudio is distributed in the hope that it will be useful, but
|
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
2014-11-26 14:14:51 +01:00
|
|
|
along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
|
2009-02-12 03:19:40 +01:00
|
|
|
***/
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
|
#include <config.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include <pulsecore/macro.h>
|
|
|
|
|
#include <pulsecore/core.h>
|
2015-03-26 21:54:21 +01:00
|
|
|
#include <stream-interaction.h>
|
2009-02-12 03:19:40 +01:00
|
|
|
|
|
|
|
|
PA_MODULE_AUTHOR("Lennart Poettering");
|
2011-10-24 22:55:45 +02:00
|
|
|
PA_MODULE_DESCRIPTION("Mute & cork streams with certain roles while others exist");
|
2009-02-12 03:19:40 +01:00
|
|
|
PA_MODULE_VERSION(PACKAGE_VERSION);
|
2013-06-27 19:28:09 +02:00
|
|
|
PA_MODULE_LOAD_ONCE(true);
|
2011-10-24 23:35:38 +02:00
|
|
|
PA_MODULE_USAGE(
|
|
|
|
|
"trigger_roles=<Comma separated list of roles which will trigger a cork> "
|
2011-10-24 23:51:20 +02:00
|
|
|
"cork_roles=<Comma separated list of roles which will be corked> "
|
|
|
|
|
"global=<Should we operate globally or only inside the same device?>");
|
2009-02-12 03:19:40 +01:00
|
|
|
|
|
|
|
|
static const char* const valid_modargs[] = {
|
2011-10-24 23:35:38 +02:00
|
|
|
"trigger_roles",
|
|
|
|
|
"cork_roles",
|
2011-10-24 23:51:20 +02:00
|
|
|
"global",
|
2009-02-12 03:19:40 +01:00
|
|
|
NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
int pa__init(pa_module *m) {
|
|
|
|
|
|
|
|
|
|
pa_assert(m);
|
|
|
|
|
|
2015-03-26 21:54:22 +01:00
|
|
|
return pa_stream_interaction_init(m, valid_modargs);
|
2009-02-12 03:19:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void pa__done(pa_module *m) {
|
|
|
|
|
|
|
|
|
|
pa_assert(m);
|
|
|
|
|
|
2015-03-26 21:54:22 +01:00
|
|
|
pa_stream_interaction_done(m);
|
2009-02-12 03:19:40 +01:00
|
|
|
}
|