Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
25c6276f
提交
25c6276f
authored
4月 14, 2014
作者:
Moises Silva
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added cng counter to the bert test app
上级
557a4a85
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
+5
-2
mod_bert.c
src/mod/applications/mod_bert/mod_bert.c
+5
-2
没有找到文件。
src/mod/applications/mod_bert/mod_bert.c
浏览文件 @
25c6276f
...
...
@@ -45,6 +45,7 @@ typedef struct {
uint32_t
window_ms
;
uint32_t
window_samples
;
uint32_t
stats_sync_lost_cnt
;
uint32_t
stats_cng_cnt
;
uint8_t
sequence_sample
;
uint8_t
predicted_sample
;
float
max_err
;
...
...
@@ -270,6 +271,7 @@ SWITCH_STANDARD_APP(bert_test_function)
read_frame
->
samples
=
read_impl
.
samples_per_packet
;
read_frame
->
datalen
=
read_impl
.
samples_per_packet
;
memset
(
read_frame
->
data
,
G711_ULAW_IDLE_OCTET
,
read_frame
->
datalen
);
bert
.
stats_cng_cnt
++
;
}
if
(
read_frame
->
samples
!=
read_impl
.
samples_per_packet
||
!
read_frame
->
datalen
)
{
...
...
@@ -300,8 +302,8 @@ SWITCH_STANDARD_APP(bert_test_function)
if
(
bert
.
in_sync
)
{
bert
.
in_sync
=
0
;
bert
.
stats_sync_lost_cnt
++
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_WARNING
,
"BERT Sync Lost: %f%% loss (count=%u, err_samples=%u, session=%s)
\n
"
,
err
,
bert
.
stats_sync_lost_cnt
,
bert
.
err_samples
,
switch_core_session_get_uuid
(
session
));
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_WARNING
,
"BERT Sync Lost: %f%% loss (count=%u,
cng_count=%d,
err_samples=%u, session=%s)
\n
"
,
err
,
bert
.
stats_sync_lost_cnt
,
bert
.
stats_cng_cnt
,
bert
.
err_samples
,
switch_core_session_get_uuid
(
session
));
switch_channel_set_variable_printf
(
channel
,
BERT_STATS_VAR_SYNC_LOST_CNT
,
"%u"
,
bert
.
stats_sync_lost_cnt
);
switch_channel_set_variable
(
channel
,
BERT_STATS_VAR_SYNC_LOST
,
"true"
);
if
(
switch_event_create_subclass
(
&
event
,
SWITCH_EVENT_CUSTOM
,
BERT_EVENT_LOST_SYNC
)
==
SWITCH_STATUS_SUCCESS
)
{
...
...
@@ -317,6 +319,7 @@ SWITCH_STANDARD_APP(bert_test_function)
bert
.
in_sync
=
1
;
synced
=
1
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_INFO
,
"BERT Sync Success
\n
"
);
bert
.
stats_cng_cnt
=
0
;
bert
.
timeout
=
0
;
}
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG10
,
"Err=%f%% (%u/%u)
\n
"
,
err
,
bert
.
err_samples
,
bert
.
processed_samples
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论