Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
998a04d2
提交
998a04d2
authored
2月 04, 2011
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add 10 20 and 40ms
上级
e7d68a79
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
30 行增加
和
39 行删除
+30
-39
mod_opus.c
src/mod/codecs/mod_opus/mod_opus.c
+30
-39
没有找到文件。
src/mod/codecs/mod_opus/mod_opus.c
浏览文件 @
998a04d2
...
@@ -147,52 +147,43 @@ static switch_status_t switch_opus_decode(switch_codec_t *codec,
...
@@ -147,52 +147,43 @@ static switch_status_t switch_opus_decode(switch_codec_t *codec,
SWITCH_MODULE_LOAD_FUNCTION
(
mod_opus_load
)
SWITCH_MODULE_LOAD_FUNCTION
(
mod_opus_load
)
{
{
switch_codec_interface_t
*
codec_interface
;
switch_codec_interface_t
*
codec_interface
;
int
samples
=
80
;
int
bytes
=
960
;
int
mss
=
10000
;
int
x
=
0
;
int
rate
=
48000
;
int
bits
=
32000
;
/* connect my internal structure to the blank pointer passed to me */
/* connect my internal structure to the blank pointer passed to me */
*
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
,
"OPUS (BETA 0.9.0)"
);
SWITCH_ADD_CODEC
(
codec_interface
,
"OPUS (BETA 0.9.0)"
);
switch_core_codec_add_implementation
(
pool
,
codec_interface
,
SWITCH_CODEC_TYPE_AUDIO
,
/* enumeration defining the type of the codec */
for
(
x
=
0
;
x
<
3
;
x
++
)
{
115
,
/* the IANA code number */
switch_core_codec_add_implementation
(
pool
,
codec_interface
,
SWITCH_CODEC_TYPE_AUDIO
,
/* enumeration defining the type of the codec */
"Opus-0.9.0"
,
/* the IANA code name */
115
,
/* the IANA code number */
NULL
,
/* default fmtp to send (can be overridden by the init function) */
"Opus-0.9.0"
,
/* the IANA code name */
48000
,
/* samples transferred per second */
NULL
,
/* default fmtp to send (can be overridden by the init function) */
48000
,
/* actual samples transferred per second */
rate
,
/* samples transferred per second */
32000
,
/* bits transferred per second */
rate
,
/* actual samples transferred per second */
10000
,
/* number of microseconds per frame */
bits
,
/* bits transferred per second */
80
,
/* number of samples per frame */
mss
,
/* number of microseconds per frame */
960
,
/* number of bytes per frame decompressed */
samples
,
/* number of samples per frame */
0
,
/* number of bytes per frame compressed */
bytes
,
/* number of bytes per frame decompressed */
1
,
/* number of channels represented */
0
,
/* number of bytes per frame compressed */
1
,
/* number of frames per network packet */
1
,
/* number of channels represented */
switch_opus_init
,
/* function to initialize a codec handle using this implementation */
1
,
/* number of frames per network packet */
switch_opus_encode
,
/* function to encode raw data into encoded data */
switch_opus_init
,
/* function to initialize a codec handle using this implementation */
switch_opus_decode
,
/* function to decode encoded data into raw data */
switch_opus_encode
,
/* function to encode raw data into encoded data */
switch_opus_destroy
);
/* deinitalize a codec handle using this implementation */
switch_opus_decode
,
/* function to decode encoded data into raw data */
switch_opus_destroy
);
/* deinitalize a codec handle using this implementation */
switch_core_codec_add_implementation
(
pool
,
codec_interface
,
SWITCH_CODEC_TYPE_AUDIO
,
/* enumeration defining the type of the codec */
bytes
*=
2
;
115
,
/* the IANA code number */
samples
*=
2
;
"Opus-0.9.0"
,
/* the IANA code name */
mss
*=
2
;
NULL
,
/* default fmtp to send (can be overridden by the init function) */
48000
,
/* samples transferred per second */
48000
,
/* actual samples transferred per second */
32000
,
/* bits transferred per second */
20000
,
/* number of microseconds per frame */
160
,
/* number of samples per frame */
1920
,
/* number of bytes per frame decompressed */
0
,
/* number of bytes per frame compressed */
1
,
/* number of channels represented */
1
,
/* number of frames per network packet */
switch_opus_init
,
/* function to initialize a codec handle using this implementation */
switch_opus_encode
,
/* function to encode raw data into encoded data */
switch_opus_decode
,
/* function to decode encoded data into raw data */
switch_opus_destroy
);
/* deinitalize a codec handle using this implementation */
}
/* indicate that the module should continue to be loaded */
/* indicate that the module should continue to be loaded */
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论