Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
8d056f52
提交
8d056f52
authored
3月 17, 2006
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix core
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@863
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
a2c448e1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
197 行增加
和
98 行删除
+197
-98
mod_g729.c
src/mod/codecs/mod_g729/mod_g729.c
+18
-1
mod_wanpipe.c
src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
+174
-95
switch_ivr.c
src/switch_ivr.c
+5
-2
没有找到文件。
src/mod/codecs/mod_g729/mod_g729.c
浏览文件 @
8d056f52
...
@@ -189,7 +189,7 @@ static switch_status switch_g729_decode(switch_codec *codec,
...
@@ -189,7 +189,7 @@ static switch_status switch_g729_decode(switch_codec *codec,
}
else
{
}
else
{
switch_console_printf
(
SWITCH_CHANNEL_CONSOLE
,
"yo this frame is an odd size [%d]
\n
"
,
encoded_data_len
);
switch_console_printf
(
SWITCH_CHANNEL_CONSOLE
,
"yo this frame is an odd size [%d]
\n
"
,
encoded_data_len
);
return
SWITCH_STATUS_FALSE
;
}
}
...
@@ -202,6 +202,22 @@ static switch_status switch_g729_decode(switch_codec *codec,
...
@@ -202,6 +202,22 @@ static switch_status switch_g729_decode(switch_codec *codec,
/* Registration */
/* Registration */
static
const
switch_codec_implementation
g729_10ms_8k_implementation
=
{
/*.samples_per_second */
8000
,
/*.bits_per_second */
32000
,
/*.microseconds_per_frame */
10000
,
/*.samples_per_frame */
80
,
/*.bytes_per_frame */
160
,
/*.encoded_bytes_per_frame */
10
,
/*.number_of_channels */
1
,
/*.pref_frames_per_packet */
1
,
/*.max_frames_per_packet */
1
,
/*.init */
switch_g729_init
,
/*.encode */
switch_g729_encode
,
/*.decode */
switch_g729_decode
,
/*.destroy */
switch_g729_destroy
,
};
static
const
switch_codec_implementation
g729_8k_implementation
=
{
static
const
switch_codec_implementation
g729_8k_implementation
=
{
/*.samples_per_second */
8000
,
/*.samples_per_second */
8000
,
/*.bits_per_second */
64000
,
/*.bits_per_second */
64000
,
...
@@ -216,6 +232,7 @@ static const switch_codec_implementation g729_8k_implementation = {
...
@@ -216,6 +232,7 @@ static const switch_codec_implementation g729_8k_implementation = {
/*.encode */
switch_g729_encode
,
/*.encode */
switch_g729_encode
,
/*.decode */
switch_g729_decode
,
/*.decode */
switch_g729_decode
,
/*.destroy */
switch_g729_destroy
,
/*.destroy */
switch_g729_destroy
,
&
g729_10ms_8k_implementation
};
};
...
...
src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
浏览文件 @
8d056f52
差异被折叠。
点击展开。
src/switch_ivr.c
浏览文件 @
8d056f52
...
@@ -691,6 +691,7 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
...
@@ -691,6 +691,7 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
int
stream_id
=
0
,
ans_a
=
0
,
ans_b
=
0
;
int
stream_id
=
0
,
ans_a
=
0
,
ans_b
=
0
;
switch_dtmf_callback_function
dtmf_callback
;
switch_dtmf_callback_function
dtmf_callback
;
void
*
user_data
;
void
*
user_data
;
int
*
his_status
;
switch_channel
*
chan_a
,
*
chan_b
;
switch_channel
*
chan_a
,
*
chan_b
;
switch_frame
*
read_frame
;
switch_frame
*
read_frame
;
...
@@ -702,6 +703,7 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
...
@@ -702,6 +703,7 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
stream_id_p
=
data
->
objs
[
2
];
stream_id_p
=
data
->
objs
[
2
];
dtmf_callback
=
data
->
objs
[
3
];
dtmf_callback
=
data
->
objs
[
3
];
user_data
=
data
->
objs
[
4
];
user_data
=
data
->
objs
[
4
];
his_status
=
data
->
objs
[
5
];
if
(
stream_id_p
)
{
if
(
stream_id_p
)
{
stream_id
=
*
stream_id_p
;
stream_id
=
*
stream_id_p
;
...
@@ -715,7 +717,7 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
...
@@ -715,7 +717,7 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
ans_b
=
switch_channel_test_flag
(
chan_b
,
CF_ANSWERED
);
ans_b
=
switch_channel_test_flag
(
chan_b
,
CF_ANSWERED
);
while
(
data
->
running
>
0
)
{
while
(
data
->
running
>
0
&&
*
his_status
>
0
)
{
switch_channel_state
b_state
=
switch_channel_get_state
(
chan_b
);
switch_channel_state
b_state
=
switch_channel_get_state
(
chan_b
);
switch
(
b_state
)
{
switch
(
b_state
)
{
...
@@ -877,7 +879,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
...
@@ -877,7 +879,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
other_audio_thread
.
objs
[
2
]
=
&
stream_id
;
other_audio_thread
.
objs
[
2
]
=
&
stream_id
;
other_audio_thread
.
objs
[
3
]
=
dtmf_callback
;
other_audio_thread
.
objs
[
3
]
=
dtmf_callback
;
other_audio_thread
.
objs
[
4
]
=
session_data
;
other_audio_thread
.
objs
[
4
]
=
session_data
;
other_audio_thread
.
objs
[
5
]
=
&
this_audio_thread
.
running
;
other_audio_thread
.
running
=
5
;
other_audio_thread
.
running
=
5
;
this_audio_thread
.
objs
[
0
]
=
peer_session
;
this_audio_thread
.
objs
[
0
]
=
peer_session
;
...
@@ -885,6 +887,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
...
@@ -885,6 +887,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
this_audio_thread
.
objs
[
2
]
=
&
stream_id
;
this_audio_thread
.
objs
[
2
]
=
&
stream_id
;
this_audio_thread
.
objs
[
3
]
=
dtmf_callback
;
this_audio_thread
.
objs
[
3
]
=
dtmf_callback
;
this_audio_thread
.
objs
[
4
]
=
peer_session_data
;
this_audio_thread
.
objs
[
4
]
=
peer_session_data
;
this_audio_thread
.
objs
[
5
]
=
&
other_audio_thread
.
running
;
this_audio_thread
.
running
=
2
;
this_audio_thread
.
running
=
2
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论