mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-20 10:14:14 +00:00
cheat so jingle can use ilbc right
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1202 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
453b85ba9f
commit
813a57776b
2 files changed
+42
-4
No files matched your search
@@ -224,15 +224,20 @@ static int activate_rtp(struct private_object *tech_pvt)
|
||||
{
|
||||
switch_channel *channel = switch_core_session_get_channel(tech_pvt->session);
|
||||
const char *err;
|
||||
int ms = 20;
|
||||
|
||||
if (tech_pvt->rtp_session) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcasecmp(tech_pvt->codec_name, "ilbc")) {
|
||||
ms = 30;
|
||||
}
|
||||
|
||||
if (switch_core_codec_init(&tech_pvt->read_codec,
|
||||
tech_pvt->codec_name,
|
||||
8000,
|
||||
20,
|
||||
ms,
|
||||
1,
|
||||
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
|
||||
NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
|
||||
@@ -248,7 +253,7 @@ static int activate_rtp(struct private_object *tech_pvt)
|
||||
if (switch_core_codec_init(&tech_pvt->write_codec,
|
||||
tech_pvt->codec_name,
|
||||
8000,
|
||||
20,
|
||||
ms,
|
||||
1,
|
||||
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
|
||||
NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
|
||||
@@ -388,8 +393,6 @@ static int do_describe(struct private_object *tech_pvt, int force)
|
||||
}
|
||||
|
||||
|
||||
payloads[0].name = tech_pvt->codecs[0]->iananame;
|
||||
payloads[0].id = tech_pvt->codecs[0]->ianacode;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send Describe [%s]\n", payloads[0].name);
|
||||
tech_pvt->desc_id = ldl_session_describe(tech_pvt->dlsession, payloads, 1,
|
||||
switch_test_flag(tech_pvt, TFLAG_OUTBOUND) ? LDL_DESCRIPTION_INITIATE : LDL_DESCRIPTION_ACCEPT);
|
||||
|
||||
Reference in new issue
Block a user