Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
6bfc05b8
提交
6bfc05b8
authored
10月 02, 2014
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-6887 #resolve #comment new bug flag always_auto_adjust (also implicitly sets accept_any_packets)
上级
9e917532
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
34 行增加
和
5 行删除
+34
-5
switch_types.h
src/include/switch_types.h
+10
-1
switch_core_media.c
src/switch_core_media.c
+8
-0
switch_rtp.c
src/switch_rtp.c
+16
-4
没有找到文件。
src/include/switch_types.h
浏览文件 @
6bfc05b8
...
@@ -839,7 +839,7 @@ typedef enum {
...
@@ -839,7 +839,7 @@ typedef enum {
/* FLUSH JITTERBUFFER When getting RFC2833 to reduce bleed through */
/* FLUSH JITTERBUFFER When getting RFC2833 to reduce bleed through */
RTP_BUG_ACCEPT_ANY_PAYLOAD
=
(
1
<<
11
)
RTP_BUG_ACCEPT_ANY_PAYLOAD
=
(
1
<<
11
)
,
/*
/*
Make FS accept any payload type instead of dropping and returning CNG frame. Workaround while FS only supports a single payload per rtp session.
Make FS accept any payload type instead of dropping and returning CNG frame. Workaround while FS only supports a single payload per rtp session.
...
@@ -847,6 +847,15 @@ typedef enum {
...
@@ -847,6 +847,15 @@ typedef enum {
This should probably be a flag, but flag enum is already full!
This should probably be a flag, but flag enum is already full!
*/
*/
RTP_BUG_ALWAYS_AUTO_ADJUST
=
(
1
<<
12
)
/*
Leave the auto-adjust behavior enableed permenantly rather than only at appropriate times. (IMPLICITLY sets RTP_BUG_ACCEPT_ANY_PACKETS)
*/
}
switch_rtp_bug_flag_t
;
}
switch_rtp_bug_flag_t
;
#ifdef _MSC_VER
#ifdef _MSC_VER
...
...
src/switch_core_media.c
浏览文件 @
6bfc05b8
...
@@ -859,6 +859,14 @@ SWITCH_DECLARE(void) switch_core_media_parse_rtp_bugs(switch_rtp_bug_flag_t *fla
...
@@ -859,6 +859,14 @@ SWITCH_DECLARE(void) switch_core_media_parse_rtp_bugs(switch_rtp_bug_flag_t *fla
if
(
switch_stristr
(
"~FLUSH_JB_ON_DTMF"
,
str
))
{
if
(
switch_stristr
(
"~FLUSH_JB_ON_DTMF"
,
str
))
{
*
flag_pole
&=
~
RTP_BUG_FLUSH_JB_ON_DTMF
;
*
flag_pole
&=
~
RTP_BUG_FLUSH_JB_ON_DTMF
;
}
}
if
(
switch_stristr
(
"ALWAYS_AUTO_ADJUST"
,
str
))
{
*
flag_pole
|=
(
RTP_BUG_ALWAYS_AUTO_ADJUST
|
RTP_BUG_ACCEPT_ANY_PACKETS
);
}
if
(
switch_stristr
(
"~ALWAYS_AUTO_ADJUST"
,
str
))
{
*
flag_pole
&=
~
(
RTP_BUG_ALWAYS_AUTO_ADJUST
|
RTP_BUG_ACCEPT_ANY_PACKETS
);
}
}
}
...
...
src/switch_rtp.c
浏览文件 @
6bfc05b8
...
@@ -1002,7 +1002,11 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
...
@@ -1002,7 +1002,11 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
return
;
return
;
}
}
switch_rtp_clear_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
if
((
rtp_session
->
rtp_bugs
&
RTP_BUG_ALWAYS_AUTO_ADJUST
))
{
switch_rtp_set_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
}
else
{
switch_rtp_clear_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
}
}
}
}
}
...
@@ -5804,19 +5808,27 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
...
@@ -5804,19 +5808,27 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
}
}
rtp_session
->
auto_adj_used
=
1
;
rtp_session
->
auto_adj_used
=
1
;
switch_rtp_set_remote_address
(
rtp_session
,
tx_host
,
switch_sockaddr_get_port
(
rtp_session
->
from_addr
),
0
,
SWITCH_FALSE
,
&
err
);
switch_rtp_set_remote_address
(
rtp_session
,
tx_host
,
switch_sockaddr_get_port
(
rtp_session
->
from_addr
),
0
,
SWITCH_FALSE
,
&
err
);
switch_rtp_clear_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
if
((
rtp_session
->
rtp_bugs
&
RTP_BUG_ALWAYS_AUTO_ADJUST
))
{
switch_rtp_set_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
}
else
{
switch_rtp_clear_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
}
if
(
rtp_session
->
ice
.
ice_user
)
{
if
(
rtp_session
->
ice
.
ice_user
)
{
rtp_session
->
ice
.
addr
=
rtp_session
->
remote_addr
;
rtp_session
->
ice
.
addr
=
rtp_session
->
remote_addr
;
}
}
}
}
}
else
{
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_DEBUG
,
"Correct ip/port confirmed.
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_DEBUG
,
"Correct ip/port confirmed.
\n
"
);
switch_rtp_clear_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
if
((
rtp_session
->
rtp_bugs
&
RTP_BUG_ALWAYS_AUTO_ADJUST
))
{
switch_rtp_set_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
}
else
{
switch_rtp_clear_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
}
rtp_session
->
auto_adj_used
=
0
;
rtp_session
->
auto_adj_used
=
0
;
}
}
}
}
if
(
bytes
&&
rtp_session
->
autoadj_window
)
{
if
(
bytes
&&
!
(
rtp_session
->
rtp_bugs
&
RTP_BUG_ALWAYS_AUTO_ADJUST
)
&&
rtp_session
->
autoadj_window
)
{
if
(
--
rtp_session
->
autoadj_window
==
0
)
{
if
(
--
rtp_session
->
autoadj_window
==
0
)
{
switch_rtp_clear_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
switch_rtp_clear_flag
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论