diff options
author | Benny Prijono <bennylp@teluu.com> | 2012-04-04 08:16:02 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2012-04-04 08:16:02 +0000 |
commit | 21f2f2ae362411805a4c41f6321405278d63cc88 (patch) | |
tree | 4f51e4cf9acd73595a66598ae35cc5b9839c0a01 | |
parent | c4c3917e8754865864e5fb47b9abe2a94812935f (diff) |
More re #1478: now really do not connect to microphone when streaming avi (instead of disconnecting the whole audio)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4020 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index 740aec65..d4694e00 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -2801,6 +2801,7 @@ static void on_call_audio_state(pjsua_call_info *ci, unsigned mi, ci->media[mi].status == PJSUA_CALL_MEDIA_REMOTE_HOLD) { pj_bool_t connect_sound = PJ_TRUE; + pj_bool_t disconnect_mic = PJ_FALSE; pjsua_conf_port_id call_conf_slot; call_conf_slot = ci->media[mi].stream.aud.conf_slot; @@ -2829,7 +2830,7 @@ static void on_call_audio_state(pjsua_call_info *ci, unsigned mi, app_config.avi_slot != PJSUA_INVALID_ID) { pjsua_conf_connect(app_config.avi_slot, call_conf_slot); - connect_sound = PJ_FALSE; + disconnect_mic = PJ_TRUE; } /* Put call in conference with other calls, if desired */ @@ -2870,7 +2871,8 @@ static void on_call_audio_state(pjsua_call_info *ci, unsigned mi, /* Otherwise connect to sound device */ if (connect_sound) { pjsua_conf_connect(call_conf_slot, 0); - pjsua_conf_connect(0, call_conf_slot); + if (!disconnect_mic) + pjsua_conf_connect(0, call_conf_slot); /* Automatically record conversation, if desired */ if (app_config.auto_rec && app_config.rec_port != PJSUA_INVALID_ID) { |