Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d093a4a4
提交
d093a4a4
authored
9月 21, 2010
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make code more automagic to shut up the dude on the list
上级
04ca0751
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
22 行增加
和
9 行删除
+22
-9
switch_utils.h
src/include/switch_utils.h
+10
-1
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+1
-1
switch_loadable_module.c
src/switch_loadable_module.c
+11
-7
没有找到文件。
src/include/switch_utils.h
浏览文件 @
d093a4a4
...
...
@@ -359,7 +359,16 @@ switch_mutex_unlock(obj->flag_mutex);
#define switch_set_string(_dst, _src) switch_copy_string(_dst, _src, sizeof(_dst))
static
inline
char
*
switch_sanitize_number
(
char
*
number
)
static
inline
uint32_t
switch_default_ptime
(
const
char
*
name
,
uint32_t
number
)
{
if
(
!
strcasecmp
(
name
,
"G723"
))
{
return
30
;
}
return
20
;
}
static
inline
char
*
switch_sanitize_number
(
char
*
number
)
{
char
*
p
=
number
,
*
q
;
char
warp
[]
=
"/:"
;
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
d093a4a4
...
...
@@ -3839,7 +3839,7 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
}
if
(
!
ptime
)
{
ptime
=
20
;
ptime
=
switch_default_ptime
(
rm_encoding
,
map
->
rm_pt
)
;
}
if
(
!
strcasecmp
((
char
*
)
rm_encoding
,
"ilbc"
))
{
...
...
src/switch_loadable_module.c
浏览文件 @
d093a4a4
...
...
@@ -1557,13 +1557,16 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs(const switch_codec_impleme
for
(
hi
=
switch_hash_first
(
NULL
,
loadable_modules
.
codec_hash
);
hi
;
hi
=
switch_hash_next
(
hi
))
{
switch_hash_this
(
hi
,
NULL
,
NULL
,
&
val
);
codec_interface
=
(
switch_codec_interface_t
*
)
val
;
/* Look for a 20ms implementation because it's the safest choice */
/* Look for the default ptime of the codec because it's the safest choice */
for
(
imp
=
codec_interface
->
implementations
;
imp
;
imp
=
imp
->
next
)
{
uint32_t
default_ptime
=
switch_default_ptime
(
imp
->
iananame
,
imp
->
ianacode
);
if
(
lock
&&
imp
->
microseconds_per_packet
!=
lock
)
{
continue
;
}
if
(
imp
->
microseconds_per_packet
/
1000
==
20
)
{
if
(
imp
->
microseconds_per_packet
/
1000
==
default_ptime
)
{
array
[
i
++
]
=
imp
;
goto
found
;
}
...
...
@@ -1623,15 +1626,16 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
}
if
((
codec_interface
=
switch_loadable_module_get_codec_interface
(
name
))
!=
0
)
{
/* If no specific codec interval is requested opt for
20ms
above all else because lots of stuff assumes it */
/* 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
);
if
(
imp
->
codec_type
!=
SWITCH_CODEC_TYPE_VIDEO
)
{
if
(
lock
&&
imp
->
microseconds_per_packet
!=
lock
)
{
continue
;
}
if
((
!
interval
&&
(
uint32_t
)
(
imp
->
microseconds_per_packet
/
1000
)
!=
20
)
||
if
((
!
interval
&&
(
uint32_t
)
(
imp
->
microseconds_per_packet
/
1000
)
!=
default_ptime
)
||
(
interval
&&
(
uint32_t
)
(
imp
->
microseconds_per_packet
/
1000
)
!=
interval
))
{
continue
;
}
...
...
@@ -1647,7 +1651,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
}
/* Either looking for a specific interval or there was no interval specified and there wasn't one
@20ms
available */
/* Either looking for a specific interval or there was no interval specified and there wasn't one
at the default ptime
available */
for
(
imp
=
codec_interface
->
implementations
;
imp
;
imp
=
imp
->
next
)
{
if
(
imp
->
codec_type
!=
SWITCH_CODEC_TYPE_VIDEO
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论