Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ecece588
提交
ecece588
authored
3月 27, 2008
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@7972
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
da72bfb9
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
25 行增加
和
13 行删除
+25
-13
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+7
-3
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+0
-1
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+9
-7
switch_core_codec.c
src/switch_core_codec.c
+4
-0
switch_core_state_machine.c
src/switch_core_state_machine.c
+4
-1
switch_loadable_module.c
src/switch_loadable_module.c
+1
-1
没有找到文件。
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
ecece588
...
...
@@ -4140,6 +4140,12 @@ SWITCH_STANDARD_APP(conference_function)
conf_xml_cfg_t
xml_cfg
=
{
0
};
switch_event_t
*
params
=
NULL
;
/* Save the original read codec. */
if
(
!
(
read_codec
=
switch_core_session_get_read_codec
(
session
)))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Channel has no media!
\n
"
);
return
;
}
if
(
switch_strlen_zero
(
data
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CRIT
,
"Invalid arguments
\n
"
);
...
...
@@ -4376,9 +4382,7 @@ SWITCH_STANDARD_APP(conference_function)
if
(
!
switch_channel_test_flag
(
channel
,
CF_OUTBOUND
))
switch_set_flag
(
conference
,
CFLAG_ANSWERED
);
}
/* Save the original read codec. */
read_codec
=
switch_core_session_get_read_codec
(
session
);
member
.
orig_read_codec
=
read_codec
;
member
.
native_rate
=
read_codec
->
implementation
->
samples_per_second
;
member
.
pool
=
switch_core_session_get_pool
(
session
);
...
...
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
ecece588
...
...
@@ -1043,7 +1043,6 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
}
else
{
if
(
switch_test_flag
(
tech_pvt
,
TFLAG_LATE_NEGOTIATION
))
{
switch_clear_flag_locked
(
tech_pvt
,
TFLAG_LATE_NEGOTIATION
);
if
(
!
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_OUTBOUND
))
{
const
char
*
r_sdp
=
switch_channel_get_variable
(
channel
,
SWITCH_R_SDP_VARIABLE
);
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
ecece588
...
...
@@ -1961,6 +1961,7 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
for
(
map
=
m
->
m_rtpmaps
;
map
;
map
=
map
->
rm_next
)
{
int32_t
i
;
uint32_t
near_rate
=
0
;
const
switch_codec_implementation_t
*
mimp
=
NULL
,
*
near_match
=
NULL
;
const
char
*
rm_encoding
;
...
...
@@ -2018,8 +2019,9 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
match
=
strcasecmp
(
rm_encoding
,
imp
->
iananame
)
?
0
:
1
;
}
if
(
match
&&
(
map
->
rm_rate
==
codec_rate
))
{
if
(
ptime
&&
ptime
*
1000
!=
imp
->
microseconds_per_frame
)
{
if
(
match
)
{
if
((
ptime
&&
ptime
*
1000
!=
imp
->
microseconds_per_frame
)
||
map
->
rm_rate
!=
codec_rate
)
{
near_rate
=
map
->
rm_rate
;
near_match
=
imp
;
match
=
0
;
continue
;
...
...
@@ -2036,8 +2038,8 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
char
*
prefs
[
1
];
char
tmp
[
80
];
int
num
;
switch_snprintf
(
tmp
,
sizeof
(
tmp
),
"%s@%uk@%ui"
,
near_match
->
iananame
,
near_match
->
samples_per_second
,
ptime
);
switch_snprintf
(
tmp
,
sizeof
(
tmp
),
"%s@%uk@%ui"
,
near_match
->
iananame
,
near_
rate
?
near_rate
:
near_
match
->
samples_per_second
,
ptime
);
prefs
[
0
]
=
tmp
;
num
=
switch_loadable_module_get_codecs_sorted
(
search
,
1
,
prefs
,
1
);
...
...
@@ -2047,9 +2049,9 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
}
else
{
mimp
=
near_match
;
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Substituting codec %s@%u
ms
\n
"
,
mimp
->
iananame
,
mimp
->
microseconds_per_frame
/
1000
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Substituting codec %s@%u
i@%uh
\n
"
,
mimp
->
iananame
,
mimp
->
microseconds_per_frame
/
1000
,
mimp
->
samples_per_second
);
match
=
1
;
}
...
...
src/switch_core_codec.c
浏览文件 @
ecece588
...
...
@@ -41,6 +41,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_set_read_codec(switch_core_s
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
char
tmp
[
30
];
switch_assert
(
codec
->
implementation
);
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_CODEC
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_channel_event_set_data
(
session
->
channel
,
event
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"channel-read-codec-name"
,
"%s"
,
codec
->
implementation
->
iananame
);
...
...
@@ -75,6 +77,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_set_write_codec(switch_core_
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
char
tmp
[
30
];
switch_assert
(
codec
->
implementation
);
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_CODEC
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_channel_event_set_data
(
session
->
channel
,
event
);
switch_event_add_header
(
event
,
SWITCH_STACK_BOTTOM
,
"channel-write-codec-name"
,
"%s"
,
codec
->
implementation
->
iananame
);
...
...
src/switch_core_state_machine.c
浏览文件 @
ecece588
...
...
@@ -160,7 +160,10 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
}
else
if
(
!
switch_test_flag
(
application_interface
,
SAF_SUPPORT_NOMEDIA
)
&&
!
switch_channel_media_ready
(
session
->
channel
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Application %s Requires media! pre_answering channel %s
\n
"
,
extension
->
current_application
->
application_name
,
switch_channel_get_name
(
session
->
channel
));
switch_channel_pre_answer
(
session
->
channel
);
if
(
switch_channel_pre_answer
(
session
->
channel
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Well, that didn't work very well did it? ...
\n
"
);
return
;
}
}
if
((
expanded
=
...
...
src/switch_loadable_module.c
浏览文件 @
ecece588
...
...
@@ -1245,7 +1245,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
for
(
x
=
0
;
x
<
preflen
;
x
++
)
{
char
*
cur
,
*
last
=
NULL
,
*
next
=
NULL
,
*
name
,
*
p
,
buf
[
256
];
uint32_t
interval
=
0
,
rate
=
0
;
uint32_t
interval
=
0
,
rate
=
800
0
;
switch_copy_string
(
buf
,
prefs
[
x
],
sizeof
(
buf
));
last
=
name
=
next
=
cur
=
buf
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论