Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ca6d7a7a
提交
ca6d7a7a
authored
1月 08, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-4905 This looks like it was only the case adjacent to dtmf; Try this patch.
上级
6f376023
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
16 行增加
和
15 行删除
+16
-15
switch_rtp.c
src/switch_rtp.c
+16
-15
没有找到文件。
src/switch_rtp.c
浏览文件 @
ca6d7a7a
...
@@ -4162,6 +4162,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
...
@@ -4162,6 +4162,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
uint32_t
this_ts
=
0
;
uint32_t
this_ts
=
0
;
int
ret
;
int
ret
;
switch_time_t
now
;
switch_time_t
now
;
uint8_t
m
=
0
;
if
(
!
switch_rtp_ready
(
rtp_session
))
{
if
(
!
switch_rtp_ready
(
rtp_session
))
{
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
...
@@ -4179,8 +4180,6 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
...
@@ -4179,8 +4180,6 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
datalen
-=
rtp_header_len
;
datalen
-=
rtp_header_len
;
}
}
}
else
{
}
else
{
uint8_t
m
=
0
;
if
(
*
flags
&
SFF_RFC2833
)
{
if
(
*
flags
&
SFF_RFC2833
)
{
payload
=
rtp_session
->
te
;
payload
=
rtp_session
->
te
;
}
}
...
@@ -4192,7 +4191,14 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
...
@@ -4192,7 +4191,14 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
rtp_session
->
send_msg
.
header
.
ts
=
htonl
(
rtp_session
->
ts
);
rtp_session
->
send_msg
.
header
.
ts
=
htonl
(
rtp_session
->
ts
);
memcpy
(
send_msg
->
body
,
data
,
datalen
);
bytes
=
datalen
+
rtp_header_len
;
}
if
((
rtp_session
->
rtp_bugs
&
RTP_BUG_NEVER_SEND_MARKER
))
{
m
=
0
;
}
else
{
if
((
rtp_session
->
last_write_ts
!=
RTP_TS_RESET
&&
rtp_session
->
ts
>
(
rtp_session
->
last_write_ts
+
(
rtp_session
->
samples_per_interval
*
10
)))
if
((
rtp_session
->
last_write_ts
!=
RTP_TS_RESET
&&
rtp_session
->
ts
>
(
rtp_session
->
last_write_ts
+
(
rtp_session
->
samples_per_interval
*
10
)))
||
rtp_session
->
ts
==
rtp_session
->
samples_per_interval
)
{
||
rtp_session
->
ts
==
rtp_session
->
samples_per_interval
)
{
m
++
;
m
++
;
...
@@ -4202,7 +4208,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
...
@@ -4202,7 +4208,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
(
rtp_session
->
timer
.
samplecount
-
rtp_session
->
last_write_samplecount
)
>
rtp_session
->
samples_per_interval
*
10
)
{
(
rtp_session
->
timer
.
samplecount
-
rtp_session
->
last_write_samplecount
)
>
rtp_session
->
samples_per_interval
*
10
)
{
m
++
;
m
++
;
}
}
if
(
!
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_USE_TIMER
)
&&
if
(
!
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_USE_TIMER
)
&&
((
unsigned
)
((
switch_micro_time_now
()
-
rtp_session
->
last_write_timestamp
)))
>
(
rtp_session
->
ms_per_packet
*
10
))
{
((
unsigned
)
((
switch_micro_time_now
()
-
rtp_session
->
last_write_timestamp
)))
>
(
rtp_session
->
ms_per_packet
*
10
))
{
m
++
;
m
++
;
...
@@ -4217,20 +4223,15 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
...
@@ -4217,20 +4223,15 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
m
++
;
m
++
;
rtp_session
->
need_mark
=
0
;
rtp_session
->
need_mark
=
0
;
}
}
send_msg
->
header
.
m
=
(
m
&&
!
(
rtp_session
->
rtp_bugs
&
RTP_BUG_NEVER_SEND_MARKER
))
?
1
:
0
;
/* If the marker was set, and the timestamp seems to have started over - set a new SSRC, to indicate this is a new stream */
if
(
send_msg
->
header
.
m
&&
!
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_SECURE_SEND
)
&&
(
rtp_session
->
rtp_bugs
&
RTP_BUG_CHANGE_SSRC_ON_MARKER
)
&&
(
rtp_session
->
last_write_ts
==
RTP_TS_RESET
||
(
rtp_session
->
ts
<=
rtp_session
->
last_write_ts
&&
rtp_session
->
last_write_ts
>
0
)))
{
switch_rtp_set_ssrc
(
rtp_session
,
(
uint32_t
)
((
intptr_t
)
rtp_session
+
(
uint32_t
)
switch_epoch_time_now
(
NULL
)));
}
memcpy
(
send_msg
->
body
,
data
,
datalen
);
bytes
=
datalen
+
rtp_header_len
;
}
}
/* If the marker was set, and the timestamp seems to have started over - set a new SSRC, to indicate this is a new stream */
if
(
m
&&
!
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_SECURE_SEND
)
&&
(
rtp_session
->
rtp_bugs
&
RTP_BUG_CHANGE_SSRC_ON_MARKER
)
&&
(
rtp_session
->
last_write_ts
==
RTP_TS_RESET
||
(
rtp_session
->
ts
<=
rtp_session
->
last_write_ts
&&
rtp_session
->
last_write_ts
>
0
)))
{
switch_rtp_set_ssrc
(
rtp_session
,
(
uint32_t
)
((
intptr_t
)
rtp_session
+
(
uint32_t
)
switch_epoch_time_now
(
NULL
)));
}
send_msg
->
header
.
m
=
(
m
&&
!
(
rtp_session
->
rtp_bugs
&
RTP_BUG_NEVER_SEND_MARKER
))
?
1
:
0
;
send_msg
->
header
.
ssrc
=
htonl
(
rtp_session
->
ssrc
);
send_msg
->
header
.
ssrc
=
htonl
(
rtp_session
->
ssrc
);
if
(
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_GOOGLEHACK
)
&&
rtp_session
->
send_msg
.
header
.
pt
==
97
)
{
if
(
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_GOOGLEHACK
)
&&
rtp_session
->
send_msg
.
header
.
pt
==
97
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论