Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
78173070
提交
78173070
authored
1月 24, 2012
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
see what happens when you distract me
上级
d72a54ff
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
29 行增加
和
29 行删除
+29
-29
mod_isac.c
src/mod/codecs/mod_isac/mod_isac.c
+29
-29
没有找到文件。
src/mod/codecs/mod_isac/mod_isac.c
浏览文件 @
78173070
...
...
@@ -25,25 +25,25 @@
* Anthony Minessale II <anthm@freeswitch.org>
*
*
* mod_i
SAC.c -- iSAC
Codec Module
* mod_i
sac.c -- isac
Codec Module
*
*/
#include <switch.h>
#include "isac.h"
SWITCH_MODULE_LOAD_FUNCTION
(
mod_i
SAC
_codec_load
);
SWITCH_MODULE_DEFINITION
(
mod_i
SAC
,
mod_iSAC
_codec_load
,
NULL
,
NULL
);
SWITCH_MODULE_LOAD_FUNCTION
(
mod_i
sac
_codec_load
);
SWITCH_MODULE_DEFINITION
(
mod_i
sac
,
mod_isac
_codec_load
,
NULL
,
NULL
);
struct
i
SAC
_context
{
struct
i
sac
_context
{
ISACStruct
*
ISAC_main_inst
;
};
static
switch_status_t
switch_i
SAC
_init
(
switch_codec_t
*
codec
,
switch_codec_flag_t
flags
,
const
switch_codec_settings_t
*
codec_settings
)
static
switch_status_t
switch_i
sac
_init
(
switch_codec_t
*
codec
,
switch_codec_flag_t
flags
,
const
switch_codec_settings_t
*
codec_settings
)
{
uint32_t
encoding
,
decoding
;
WebRtc_Word16
err
;
struct
i
SAC
_context
*
context
=
NULL
;
struct
i
sac
_context
*
context
=
NULL
;
encoding
=
(
flags
&
SWITCH_CODEC_FLAG_ENCODE
);
decoding
=
(
flags
&
SWITCH_CODEC_FLAG_DECODE
);
...
...
@@ -100,7 +100,7 @@ static switch_status_t switch_iSAC_init(switch_codec_t *codec, switch_codec_flag
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status_t
switch_i
SAC
_encode
(
switch_codec_t
*
codec
,
switch_codec_t
*
other_codec
,
static
switch_status_t
switch_i
sac
_encode
(
switch_codec_t
*
codec
,
switch_codec_t
*
other_codec
,
void
*
decoded_data
,
uint32_t
decoded_data_len
,
uint32_t
decoded_rate
,
...
...
@@ -109,7 +109,7 @@ static switch_status_t switch_iSAC_encode(switch_codec_t *codec, switch_codec_t
uint32_t
*
encoded_rate
,
unsigned
int
*
flag
)
{
struct
i
SAC
_context
*
context
=
codec
->
private_info
;
struct
i
sac
_context
*
context
=
codec
->
private_info
;
WebRtc_Word16
len
=
0
,
*
in
,
*
out
;
int
rise
=
(
codec
->
implementation
->
actual_samples_per_second
/
100
);
...
...
@@ -130,7 +130,7 @@ static switch_status_t switch_iSAC_encode(switch_codec_t *codec, switch_codec_t
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status_t
switch_i
SAC
_decode
(
switch_codec_t
*
codec
,
static
switch_status_t
switch_i
sac
_decode
(
switch_codec_t
*
codec
,
switch_codec_t
*
other_codec
,
void
*
encoded_data
,
uint32_t
encoded_data_len
,
...
...
@@ -140,7 +140,7 @@ static switch_status_t switch_iSAC_decode(switch_codec_t *codec,
uint32_t
*
decoded_rate
,
unsigned
int
*
flag
)
{
struct
i
SAC
_context
*
context
=
codec
->
private_info
;
struct
i
sac
_context
*
context
=
codec
->
private_info
;
WebRtc_Word16
len
,
speechType
[
1
];
if
((
*
flag
&
SFF_PLC
))
{
...
...
@@ -159,9 +159,9 @@ static switch_status_t switch_iSAC_decode(switch_codec_t *codec,
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status_t
switch_i
SAC
_destroy
(
switch_codec_t
*
codec
)
static
switch_status_t
switch_i
sac
_destroy
(
switch_codec_t
*
codec
)
{
struct
i
SAC
_context
*
context
=
codec
->
private_info
;
struct
i
sac
_context
*
context
=
codec
->
private_info
;
WebRtcIsac_Free
(
context
->
ISAC_main_inst
);
...
...
@@ -169,18 +169,18 @@ static switch_status_t switch_iSAC_destroy(switch_codec_t *codec)
}
SWITCH_MODULE_LOAD_FUNCTION
(
mod_i
SAC
_codec_load
)
SWITCH_MODULE_LOAD_FUNCTION
(
mod_i
sac
_codec_load
)
{
switch_codec_interface_t
*
codec_interface
;
*
module_interface
=
switch_loadable_module_create_module_interface
(
pool
,
modname
);
SWITCH_ADD_CODEC
(
codec_interface
,
"i
SAC
"
);
/* 8.0kbit */
SWITCH_ADD_CODEC
(
codec_interface
,
"i
sac
"
);
/* 8.0kbit */
switch_core_codec_add_implementation
(
pool
,
codec_interface
,
SWITCH_CODEC_TYPE_AUDIO
,
99
,
"i
SAC
"
,
"i
sac
"
,
NULL
,
16000
,
16000
,
...
...
@@ -191,17 +191,17 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_iSAC_codec_load)
0
,
1
,
3
,
switch_i
SAC
_init
,
switch_i
SAC
_encode
,
switch_i
SAC
_decode
,
switch_i
SAC
_destroy
);
switch_i
sac
_init
,
switch_i
sac
_encode
,
switch_i
sac
_decode
,
switch_i
sac
_destroy
);
switch_core_codec_add_implementation
(
pool
,
codec_interface
,
SWITCH_CODEC_TYPE_AUDIO
,
99
,
"i
SAC
"
,
"i
sac
"
,
NULL
,
16000
,
16000
,
...
...
@@ -212,10 +212,10 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_iSAC_codec_load)
0
,
1
,
6
,
switch_i
SAC
_init
,
switch_i
SAC
_encode
,
switch_i
SAC
_decode
,
switch_i
SAC
_destroy
);
switch_i
sac
_init
,
switch_i
sac
_encode
,
switch_i
sac
_decode
,
switch_i
sac
_destroy
);
...
...
@@ -223,7 +223,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_iSAC_codec_load)
switch_core_codec_add_implementation
(
pool
,
codec_interface
,
SWITCH_CODEC_TYPE_AUDIO
,
99
,
"i
SAC
"
,
"i
sac
"
,
NULL
,
32000
,
32000
,
...
...
@@ -234,10 +234,10 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_iSAC_codec_load)
0
,
1
,
6
,
switch_i
SAC
_init
,
switch_i
SAC
_encode
,
switch_i
SAC
_decode
,
switch_i
SAC
_destroy
);
switch_i
sac
_init
,
switch_i
sac
_encode
,
switch_i
sac
_decode
,
switch_i
sac
_destroy
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论