Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
8fd8c84c
提交
8fd8c84c
authored
3月 07, 2016
作者:
Brian West
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-8878 fix compiling without the library installed
上级
ff9cbe6c
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
9 行增加
和
3 行删除
+9
-3
mod_amr.c
src/mod/codecs/mod_amr/mod_amr.c
+9
-3
没有找到文件。
src/mod/codecs/mod_amr/mod_amr.c
浏览文件 @
8fd8c84c
...
@@ -360,9 +360,11 @@ static switch_status_t switch_amr_encode(switch_codec_t *codec,
...
@@ -360,9 +360,11 @@ static switch_status_t switch_amr_encode(switch_codec_t *codec,
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
}
}
#ifndef AMR_PASSTHROUGH
if
(
globals
.
debug
)
{
if
(
globals
.
debug
)
{
switch_amr_info
(
shift_buf
,
*
encoded_data_len
,
switch_test_flag
(
context
,
AMR_OPT_OCTET_ALIGN
)
?
1
:
0
,
"AMR encoder"
);
switch_amr_info
(
shift_buf
,
*
encoded_data_len
,
switch_test_flag
(
context
,
AMR_OPT_OCTET_ALIGN
)
?
1
:
0
,
"AMR encoder"
);
}
}
#endif
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
#endif
#endif
...
@@ -387,10 +389,11 @@ static switch_status_t switch_amr_decode(switch_codec_t *codec,
...
@@ -387,10 +389,11 @@ static switch_status_t switch_amr_decode(switch_codec_t *codec,
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
}
}
#ifndef AMR_PASSTHROUGH
if
(
globals
.
debug
)
{
if
(
globals
.
debug
)
{
switch_amr_info
(
buf
,
encoded_data_len
,
switch_test_flag
(
context
,
AMR_OPT_OCTET_ALIGN
)
?
1
:
0
,
"AMR decoder"
);
switch_amr_info
(
buf
,
encoded_data_len
,
switch_test_flag
(
context
,
AMR_OPT_OCTET_ALIGN
)
?
1
:
0
,
"AMR decoder"
);
}
}
#endif
if
(
switch_test_flag
(
context
,
AMR_OPT_OCTET_ALIGN
))
{
if
(
switch_test_flag
(
context
,
AMR_OPT_OCTET_ALIGN
))
{
/*Octed Aligned*/
/*Octed Aligned*/
if
(
!
switch_amr_unpack_oa
(
buf
,
tmp
,
encoded_data_len
))
{
if
(
!
switch_amr_unpack_oa
(
buf
,
tmp
,
encoded_data_len
))
{
...
@@ -409,6 +412,7 @@ static switch_status_t switch_amr_decode(switch_codec_t *codec,
...
@@ -409,6 +412,7 @@ static switch_status_t switch_amr_decode(switch_codec_t *codec,
#endif
#endif
}
}
#ifndef AMR_PASSTHROUGH
#define AMRWB_DEBUG_SYNTAX "<on|off>"
#define AMRWB_DEBUG_SYNTAX "<on|off>"
SWITCH_STANDARD_API
(
mod_amr_debug
)
SWITCH_STANDARD_API
(
mod_amr_debug
)
{
{
...
@@ -427,14 +431,15 @@ SWITCH_STANDARD_API(mod_amr_debug)
...
@@ -427,14 +431,15 @@ SWITCH_STANDARD_API(mod_amr_debug)
}
}
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
}
}
#endif
/* Registration */
/* Registration */
SWITCH_MODULE_LOAD_FUNCTION
(
mod_amr_load
)
SWITCH_MODULE_LOAD_FUNCTION
(
mod_amr_load
)
{
{
switch_codec_interface_t
*
codec_interface
;
switch_codec_interface_t
*
codec_interface
;
switch_api_interface_t
*
commands_api_interface
;
#ifndef AMR_PASSTHROUGH
#ifndef AMR_PASSTHROUGH
switch_api_interface_t
*
commands_api_interface
;
char
*
cf
=
"amr.conf"
;
char
*
cf
=
"amr.conf"
;
switch_xml_t
cfg
,
xml
,
settings
,
param
;
switch_xml_t
cfg
,
xml
,
settings
,
param
;
...
@@ -458,11 +463,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_amr_load)
...
@@ -458,11 +463,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_amr_load)
*
module_interface
=
switch_loadable_module_create_module_interface
(
pool
,
modname
);
*
module_interface
=
switch_loadable_module_create_module_interface
(
pool
,
modname
);
SWITCH_ADD_CODEC
(
codec_interface
,
"AMR"
);
SWITCH_ADD_CODEC
(
codec_interface
,
"AMR"
);
#ifndef AMR_PASSTHROUGH
SWITCH_ADD_API
(
commands_api_interface
,
"amr_debug"
,
"Set AMR Debug"
,
mod_amr_debug
,
AMRWB_DEBUG_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"amr_debug"
,
"Set AMR Debug"
,
mod_amr_debug
,
AMRWB_DEBUG_SYNTAX
);
switch_console_set_complete
(
"add amr_debug on"
);
switch_console_set_complete
(
"add amr_debug on"
);
switch_console_set_complete
(
"add amr_debug off"
);
switch_console_set_complete
(
"add amr_debug off"
);
#endif
switch_core_codec_add_implementation
(
pool
,
codec_interface
,
SWITCH_CODEC_TYPE_AUDIO
,
/* enumeration defining the type of the codec */
switch_core_codec_add_implementation
(
pool
,
codec_interface
,
SWITCH_CODEC_TYPE_AUDIO
,
/* enumeration defining the type of the codec */
96
,
/* the IANA code number */
96
,
/* the IANA code number */
"AMR"
,
/* the IANA code name */
"AMR"
,
/* the IANA code name */
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论