Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
e8ecf7c8
提交
e8ecf7c8
authored
3月 07, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-4846 --resolve
上级
c7b6327c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
15 行增加
和
3 行删除
+15
-3
switch_core.h
src/include/switch_core.h
+1
-0
switch_core.c
src/switch_core.c
+10
-0
switch_loadable_module.c
src/switch_loadable_module.c
+4
-3
没有找到文件。
src/include/switch_core.h
浏览文件 @
e8ecf7c8
...
...
@@ -2396,6 +2396,7 @@ SWITCH_DECLARE(void) switch_cache_db_flush_handles(void);
SWITCH_DECLARE
(
const
char
*
)
switch_core_banner
(
void
);
SWITCH_DECLARE
(
switch_bool_t
)
switch_core_session_in_thread
(
switch_core_session_t
*
session
);
SWITCH_DECLARE
(
uint32_t
)
switch_default_ptime
(
const
char
*
name
,
uint32_t
number
);
SWITCH_DECLARE
(
uint32_t
)
switch_default_rate
(
const
char
*
name
,
uint32_t
number
);
/*!
\brief Add user registration
...
...
src/switch_core.c
浏览文件 @
e8ecf7c8
...
...
@@ -1720,6 +1720,16 @@ SWITCH_DECLARE(uint32_t) switch_default_ptime(const char *name, uint32_t number)
return
20
;
}
SWITCH_DECLARE
(
uint32_t
)
switch_default_rate
(
const
char
*
name
,
uint32_t
number
)
{
if
(
!
strcasecmp
(
name
,
"opus"
))
{
return
48000
;
}
return
8000
;
}
static
uint32_t
d_30
=
30
;
static
void
switch_load_core_config
(
const
char
*
file
)
...
...
src/switch_loadable_module.c
浏览文件 @
e8ecf7c8
...
...
@@ -2165,7 +2165,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
}
if
(
orate
==
0
)
{
orate
=
8000
;
orate
=
switch_default_rate
(
name
,
0
)
;
}
switch_copy_string
(
jbuf
,
prefs
[
j
],
sizeof
(
jbuf
));
...
...
@@ -2176,7 +2176,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
}
if
(
jrate
==
0
)
{
jrate
=
8000
;
jrate
=
switch_default_rate
(
jname
,
0
)
;
}
if
(
!
strcasecmp
(
name
,
jname
)
&&
ointerval
==
jinterval
&&
orate
==
jrate
)
{
...
...
@@ -2188,6 +2188,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
/* If no specific codec interval is requested opt for the default above all else because lots of stuff assumes it */
for
(
imp
=
codec_interface
->
implementations
;
imp
;
imp
=
imp
->
next
)
{
uint32_t
default_ptime
=
switch_default_ptime
(
imp
->
iananame
,
imp
->
ianacode
);
uint32_t
default_rate
=
switch_default_rate
(
imp
->
iananame
,
imp
->
ianacode
);
if
(
imp
->
codec_type
!=
SWITCH_CODEC_TYPE_VIDEO
)
{
...
...
@@ -2196,7 +2197,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
continue
;
}
if
(((
!
rate
&&
(
uint32_t
)
imp
->
samples_per_second
!=
8000
)
||
(
rate
&&
(
uint32_t
)
imp
->
samples_per_second
!=
rate
)))
{
if
(((
!
rate
&&
(
uint32_t
)
imp
->
samples_per_second
!=
default_rate
)
||
(
rate
&&
(
uint32_t
)
imp
->
samples_per_second
!=
rate
)))
{
continue
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论