Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
50d7a80f
提交
50d7a80f
authored
5月 19, 2016
作者:
Anthony Minessale
提交者:
Michael Jerris
6月 03, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-9136: allow multiple instances of same video codec with different fmtp
上级
930777ef
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
158 行增加
和
62 行删除
+158
-62
switch_core_media.h
src/include/switch_core_media.h
+1
-0
switch_loadable_module.h
src/include/switch_loadable_module.h
+2
-2
switch_types.h
src/include/switch_types.h
+2
-0
mod_loopback.c
src/mod/endpoints/mod_loopback/mod_loopback.c
+1
-1
switch_core_media.c
src/switch_core_media.c
+134
-51
switch_loadable_module.c
src/switch_loadable_module.c
+18
-8
没有找到文件。
src/include/switch_core_media.h
浏览文件 @
50d7a80f
...
...
@@ -286,6 +286,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core
switch_media_type_t
type
,
const
char
*
iananame
,
uint32_t
rate
,
const
char
*
fmtp_in
,
switch_payload_t
*
ptP
,
switch_payload_t
*
recv_ptP
,
char
**
fmtpP
);
...
...
src/include/switch_loadable_module.h
浏览文件 @
50d7a80f
...
...
@@ -117,7 +117,7 @@ SWITCH_DECLARE(switch_endpoint_interface_t *) switch_loadable_module_get_endpoin
*/
SWITCH_DECLARE
(
switch_codec_interface_t
*
)
switch_loadable_module_get_codec_interface
(
const
char
*
name
,
const
char
*
modname
);
SWITCH_DECLARE
(
char
*
)
switch_parse_codec_buf
(
char
*
buf
,
uint32_t
*
interval
,
uint32_t
*
rate
,
uint32_t
*
bit
,
uint32_t
*
channels
,
char
**
modname
);
SWITCH_DECLARE
(
char
*
)
switch_parse_codec_buf
(
char
*
buf
,
uint32_t
*
interval
,
uint32_t
*
rate
,
uint32_t
*
bit
,
uint32_t
*
channels
,
char
**
modname
,
char
**
fmtp
);
/*!
\brief Retrieve the dialplan interface by it's registered name
...
...
@@ -272,7 +272,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs(const switch_codec_impleme
\return the number of elements added to the array
\note this function only considers codecs that are listed in the "prefs" array and ignores the rest.
*/
SWITCH_DECLARE
(
int
)
switch_loadable_module_get_codecs_sorted
(
const
switch_codec_implementation_t
**
array
,
int
arraylen
,
char
**
prefs
,
int
preflen
);
SWITCH_DECLARE
(
int
)
switch_loadable_module_get_codecs_sorted
(
const
switch_codec_implementation_t
**
array
,
char
fmtp_array
[
SWITCH_MAX_CODECS
][
MAX_FMTP_LEN
],
int
arraylen
,
char
**
prefs
,
int
preflen
);
/*!
\brief Execute a registered API command
...
...
src/include/switch_types.h
浏览文件 @
50d7a80f
...
...
@@ -234,6 +234,8 @@ SWITCH_BEGIN_EXTERN_C
#define SWITCH_RTCP_AUDIO_INTERVAL_MSEC "5000"
#define SWITCH_RTCP_VIDEO_INTERVAL_MSEC "2000"
#define MAX_FMTP_LEN 256
/* Jitter */
#define JITTER_VARIANCE_THRESHOLD 400.0
/* IPDV */
...
...
src/mod/endpoints/mod_loopback/mod_loopback.c
浏览文件 @
50d7a80f
...
...
@@ -142,7 +142,7 @@ static switch_status_t tech_init(loopback_private_t *tech_pvt, switch_core_sessi
if
((
var
=
switch_channel_get_variable
(
channel
,
"loopback_initial_codec"
)))
{
char
*
dup
=
switch_core_session_strdup
(
session
,
var
);
uint32_t
bit
,
channels
;
iananame
=
switch_parse_codec_buf
(
dup
,
&
interval
,
&
rate
,
&
bit
,
&
channels
,
&
codec_modname
);
iananame
=
switch_parse_codec_buf
(
dup
,
&
interval
,
&
rate
,
&
bit
,
&
channels
,
&
codec_modname
,
NULL
);
}
}
...
...
src/switch_core_media.c
浏览文件 @
50d7a80f
差异被折叠。
点击展开。
src/switch_loadable_module.c
浏览文件 @
50d7a80f
...
...
@@ -2340,7 +2340,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs(const switch_codec_impleme
}
SWITCH_DECLARE
(
char
*
)
switch_parse_codec_buf
(
char
*
buf
,
uint32_t
*
interval
,
uint32_t
*
rate
,
uint32_t
*
bit
,
uint32_t
*
channels
,
char
**
modname
)
SWITCH_DECLARE
(
char
*
)
switch_parse_codec_buf
(
char
*
buf
,
uint32_t
*
interval
,
uint32_t
*
rate
,
uint32_t
*
bit
,
uint32_t
*
channels
,
char
**
modname
,
char
**
fmtp
)
{
char
*
cur
,
*
next
=
NULL
,
*
name
,
*
p
;
...
...
@@ -2380,10 +2380,17 @@ SWITCH_DECLARE(char *) switch_parse_codec_buf(char *buf, uint32_t *interval, uin
name
=
p
;
}
if
((
p
=
strchr
(
name
,
'~'
)))
{
*
p
++
=
'\0'
;
if
(
fmtp
)
{
*
fmtp
=
p
;
}
}
return
name
;
}
SWITCH_DECLARE
(
int
)
switch_loadable_module_get_codecs_sorted
(
const
switch_codec_implementation_t
**
array
,
int
arraylen
,
char
**
prefs
,
int
preflen
)
SWITCH_DECLARE
(
int
)
switch_loadable_module_get_codecs_sorted
(
const
switch_codec_implementation_t
**
array
,
char
fmtp_array
[
SWITCH_MAX_CODECS
][
MAX_FMTP_LEN
],
int
arraylen
,
char
**
prefs
,
int
preflen
)
{
int
x
,
i
=
0
,
j
=
0
;
switch_codec_interface_t
*
codec_interface
;
...
...
@@ -2392,14 +2399,14 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
switch_mutex_lock
(
loadable_modules
.
mutex
);
for
(
x
=
0
;
x
<
preflen
;
x
++
)
{
char
*
name
,
buf
[
256
],
jbuf
[
256
],
*
modname
=
NULL
;
char
*
name
,
buf
[
256
],
jbuf
[
256
],
*
modname
=
NULL
,
*
fmtp
=
NULL
;
uint32_t
interval
=
0
,
rate
=
0
,
bit
=
0
,
channels
=
1
;
switch_copy_string
(
buf
,
prefs
[
x
],
sizeof
(
buf
));
name
=
switch_parse_codec_buf
(
buf
,
&
interval
,
&
rate
,
&
bit
,
&
channels
,
&
modname
);
name
=
switch_parse_codec_buf
(
buf
,
&
interval
,
&
rate
,
&
bit
,
&
channels
,
&
modname
,
&
fmtp
);
for
(
j
=
0
;
j
<
x
;
j
++
)
{
char
*
jname
,
*
jmodname
=
NULL
;
char
*
jname
,
*
jmodname
=
NULL
,
*
jfmtp
=
NULL
;
uint32_t
jinterval
=
0
,
jrate
=
0
,
jbit
=
0
,
jchannels
=
1
;
uint32_t
ointerval
=
interval
,
orate
=
rate
,
ochannels
=
channels
;
...
...
@@ -2416,7 +2423,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
}
switch_copy_string
(
jbuf
,
prefs
[
j
],
sizeof
(
jbuf
));
jname
=
switch_parse_codec_buf
(
jbuf
,
&
jinterval
,
&
jrate
,
&
jbit
,
&
jchannels
,
&
jmodname
);
jname
=
switch_parse_codec_buf
(
jbuf
,
&
jinterval
,
&
jrate
,
&
jbit
,
&
jchannels
,
&
jmodname
,
&
jfmtp
);
if
(
jinterval
==
0
)
{
jinterval
=
switch_default_ptime
(
jname
,
0
);
...
...
@@ -2430,7 +2437,8 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
jchannels
=
1
;
}
if
(
!
strcasecmp
(
name
,
jname
)
&&
ointerval
==
jinterval
&&
orate
==
jrate
&&
ochannels
==
jchannels
)
{
if
(
!
strcasecmp
(
name
,
jname
)
&&
ointerval
==
jinterval
&&
orate
==
jrate
&&
ochannels
==
jchannels
&&
!
strcasecmp
(
switch_str_nil
(
fmtp
),
switch_str_nil
(
jfmtp
)))
{
goto
next_x
;
}
}
...
...
@@ -2462,7 +2470,9 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
}
}
if
(
!
zstr
(
fmtp
))
{
switch_set_string
(
fmtp_array
[
i
],
fmtp
);
}
array
[
i
++
]
=
imp
;
goto
found
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论