summaryrefslogtreecommitdiff
path: root/pjsip/src
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-03-08 12:37:22 +0000
committerBenny Prijono <bennylp@teluu.com>2006-03-08 12:37:22 +0000
commit2979b937447c7b15352682e44a9f465c08fea112 (patch)
treea875beed51a49505c841f21ca9df6c0dacda0f65 /pjsip/src
parent21d3fdbca30845ee7f78dc4f641c03747b9cd1c0 (diff)
Added options to disable microphone device, usefull for streaming server (some systems only have sound player)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@312 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_core.c8
-rw-r--r--pjsip/src/pjsua-lib/pjsua_settings.c8
2 files changed, 14 insertions, 2 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c
index 36b6692e..7ef91c74 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -611,7 +611,7 @@ int pjsua_find_account_for_outgoing(const pj_str_t *url)
*/
static pj_status_t init_media(void)
{
-
+ unsigned options;
pj_status_t status;
/* If user doesn't specify any codecs, register all of them. */
@@ -732,12 +732,18 @@ static pj_status_t init_media(void)
}
}
+ /* Init options for conference bridge. */
+ options = 0;
+ if (pjsua.no_mic)
+ options |= PJMEDIA_CONF_NO_MIC;
+
/* Init conference bridge. */
status = pjmedia_conf_create(pjsua.pool,
pjsua.max_calls+PJSUA_CONF_MORE_PORTS,
pjsua.clock_rate,
pjsua.clock_rate * 20 / 1000, 16,
+ options,
&pjsua.mconf);
if (status != PJ_SUCCESS) {
pj_caching_pool_destroy(&pjsua.cp);
diff --git a/pjsip/src/pjsua-lib/pjsua_settings.c b/pjsip/src/pjsua-lib/pjsua_settings.c
index 9ea7de41..6da605ff 100644
--- a/pjsip/src/pjsua-lib/pjsua_settings.c
+++ b/pjsip/src/pjsua-lib/pjsua_settings.c
@@ -86,6 +86,7 @@ static void usage(void)
puts (" --wb Enable wideband codecs and set clock-rate to 16KHz");
puts (" --uwb Enable ultra-wideband codecs and set clock-rate to 32KHz");
puts (" --null-audio Use NULL audio device");
+ puts (" --no-mic Disable microphone device");
puts (" --play-file=file Play WAV file in conference bridge");
puts (" --auto-play Automatically play the file (to incoming calls only)");
puts (" --auto-loop Automatically loop incoming RTP to outgoing RTP");
@@ -217,7 +218,7 @@ pj_status_t pjsua_parse_args(int argc, char *argv[])
int c;
int option_index;
enum { OPT_CONFIG_FILE, OPT_LOG_FILE, OPT_LOG_LEVEL, OPT_APP_LOG_LEVEL,
- OPT_HELP, OPT_VERSION, OPT_NULL_AUDIO,
+ OPT_HELP, OPT_VERSION, OPT_NULL_AUDIO, OPT_NO_MIC,
OPT_LOCAL_PORT, OPT_PROXY, OPT_OUTBOUND_PROXY, OPT_REGISTRAR,
OPT_REG_TIMEOUT, OPT_ID, OPT_CONTACT,
OPT_REALM, OPT_USERNAME, OPT_PASSWORD,
@@ -240,6 +241,7 @@ pj_status_t pjsua_parse_args(int argc, char *argv[])
{ "wb", 0, 0, OPT_WB},
{ "uwb", 0, 0, OPT_UWB},
{ "null-audio", 0, 0, OPT_NULL_AUDIO},
+ { "no-mic", 0, 0, OPT_NO_MIC},
{ "local-port", 1, 0, OPT_LOCAL_PORT},
{ "proxy", 1, 0, OPT_PROXY},
{ "outbound", 1, 0, OPT_OUTBOUND_PROXY},
@@ -343,6 +345,10 @@ pj_status_t pjsua_parse_args(int argc, char *argv[])
pjsua.null_audio = 1;
break;
+ case OPT_NO_MIC:
+ pjsua.no_mic = 1;
+ break;
+
case OPT_WB:
pjsua.clock_rate = 16000;
break;