Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
279b7994
提交
279b7994
authored
6月 06, 2019
作者:
Dragos Oancea
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-11743: video RTCP counter (fix conflicts)
上级
3705bad3
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
22 行增加
和
5 行删除
+22
-5
switch_types.h
src/include/switch_types.h
+15
-0
switch_rtp.c
src/switch_rtp.c
+7
-5
没有找到文件。
src/include/switch_types.h
浏览文件 @
279b7994
...
...
@@ -717,6 +717,21 @@ typedef struct {
uint32_t
init
;
}
switch_rtcp_numbers_t
;
typedef
struct
{
uint16_t
nack_count
;
uint16_t
fir_count
;
uint16_t
pli_count
;
uint16_t
sr_count
;
uint16_t
rr_count
;
}
switch_rtcp_video_counters_t
;
typedef
struct
{
/* counters and stats for the incoming video stream and outgoing RTCP*/
switch_rtcp_video_counters_t
video_in
;
/* counters and stats for the outgoing video stream and incoming RTCP*/
switch_rtcp_video_counters_t
video_out
;
}
switch_rtcp_video_stats_t
;
typedef
struct
{
switch_rtp_numbers_t
inbound
;
switch_rtp_numbers_t
outbound
;
...
...
src/switch_rtp.c
浏览文件 @
279b7994
...
...
@@ -445,6 +445,7 @@ struct switch_rtp {
uint32_t
cng_count
;
switch_rtp_bug_flag_t
rtp_bugs
;
switch_rtp_stats_t
stats
;
switch_rtcp_video_stats_t
rtcp_vstats
;
uint32_t
clean_stream
;
uint32_t
bad_stream
;
uint32_t
recovering_stream
;
...
...
@@ -2195,9 +2196,9 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
ext_hdr
->
send_ssrc
=
htonl
(
rtp_session
->
ssrc
);
ext_hdr
->
recv_ssrc
=
htonl
(
rtp_session
->
remote_ssrc
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_DEBUG1
,
"Sending RTCP PLI %u %u
\n
"
,
rtp_session
->
ssrc
,
rtp_session
->
remote_ssrc
);
rtp_session
->
rtcp_vstats
.
video_in
.
pli_count
++
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_DEBUG1
,
"Sending RTCP PLI %u %u
[%u]
\n
"
,
rtp_session
->
ssrc
,
rtp_session
->
remote_ssrc
,
rtp_session
->
rtcp_vstats
.
video_in
.
pli_count
);
ext_hdr
->
length
=
htons
((
uint8_t
)(
sizeof
(
switch_rtcp_ext_hdr_t
)
/
4
)
-
1
);
rtcp_bytes
+=
sizeof
(
switch_rtcp_ext_hdr_t
);
...
...
@@ -2207,6 +2208,7 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
if
(
rtp_session
->
flags
[
SWITCH_RTP_FLAG_NACK
]
&&
nack_ttl
>
0
)
{
int
n
=
0
;
rtp_session
->
rtcp_vstats
.
video_in
.
nack_count
++
;
for
(
n
=
0
;
n
<
nack_ttl
;
n
++
)
{
switch_rtcp_ext_hdr_t
*
ext_hdr
;
uint32_t
*
nack
;
...
...
@@ -2266,7 +2268,8 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
fir
->
seq
=
rtp_session
->
fir_seq
;
fir
->
r1
=
fir
->
r2
=
fir
->
r3
=
0
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_DEBUG1
,
"Sending RTCP FIR SEQ %d
\n
"
,
rtp_session
->
fir_seq
);
rtp_session
->
rtcp_vstats
.
video_in
.
fir_count
++
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_DEBUG1
,
"Sending RTCP FIR SEQ %d [%u]
\n
"
,
rtp_session
->
fir_seq
,
rtp_session
->
rtcp_vstats
.
video_in
.
fir_count
);
rtp_session
->
fir_seq
++
;
...
...
@@ -6504,7 +6507,6 @@ static void handle_nack(switch_rtp_t *rtp_session, uint32_t nack)
static
switch_status_t
process_rtcp_report
(
switch_rtp_t
*
rtp_session
,
rtcp_msg_t
*
msg
,
switch_size_t
bytes
)
{
switch_status_t
status
=
SWITCH_STATUS_FALSE
;
int
i
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_DEBUG3
,
"RTCP packet bytes %"
SWITCH_SIZE_T_FMT
" type %d pad %d
\n
"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论