Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
62fcb3bc
提交
62fcb3bc
authored
4月 10, 2006
作者:
Brian West
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@1103
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
7a578a89
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
5 行删除
+8
-5
switch_ivr.c
src/switch_ivr.c
+5
-3
switch_rtp.c
src/switch_rtp.c
+3
-2
没有找到文件。
src/switch_ivr.c
浏览文件 @
62fcb3bc
...
...
@@ -259,7 +259,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
uint32_t
interval
=
0
,
samples
=
0
;
uint32_t
len
=
0
,
ilen
=
0
;
switch_size_t
olen
=
0
;
switch_frame
write_frame
;
switch_frame
write_frame
=
{
0
}
;
switch_timer
timer
;
switch_core_thread_session
thread_session
;
switch_codec
codec
;
...
...
@@ -433,6 +433,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
#endif
for
(
stream_id
=
0
;
stream_id
<
switch_core_session_get_stream_count
(
session
);
stream_id
++
)
{
if
(
switch_core_session_write_frame
(
session
,
&
write_frame
,
-
1
,
stream_id
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_console_printf
(
SWITCH_CHANNEL_CONSOLE
,
"Bad Write
\n
"
);
done
=
1
;
...
...
@@ -456,7 +457,6 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
switch_console_printf
(
SWITCH_CHANNEL_CONSOLE
,
"done playing file
\n
"
);
switch_core_file_close
(
fh
);
switch_core_codec_destroy
(
&
codec
);
if
(
timer_name
)
{
...
...
@@ -488,7 +488,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session
uint32_t
samples
=
0
;
uint32_t
len
=
0
;
switch_size_t
ilen
=
0
;
switch_frame
write_frame
;
switch_frame
write_frame
=
{
0
}
;
switch_timer
timer
;
switch_core_thread_session
thread_session
;
switch_codec
codec
;
...
...
@@ -761,6 +761,8 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
/* read audio from 1 channel and write it to the other */
if
(
switch_core_session_read_frame
(
session_a
,
&
read_frame
,
-
1
,
stream_id
)
==
SWITCH_STATUS_SUCCESS
&&
read_frame
->
datalen
)
{
if
(
switch_core_session_write_frame
(
session_b
,
read_frame
,
-
1
,
stream_id
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_console_printf
(
SWITCH_CHANNEL_CONSOLE
,
"write: %s Bad Frame....[%u] Bubye!
\n
"
,
switch_channel_get_name
(
chan_b
),
read_frame
->
datalen
);
data
->
running
=
-
1
;
...
...
src/switch_rtp.c
浏览文件 @
62fcb3bc
...
...
@@ -458,7 +458,8 @@ static int rtp_common_read(switch_rtp *rtp_session, void *data, int *payload_typ
{
switch_size_t
bytes
;
switch_status
status
;
for
(;;)
{
bytes
=
sizeof
(
rtp_msg_t
);
status
=
switch_socket_recvfrom
(
rtp_session
->
from_addr
,
rtp_session
->
sock
,
0
,
(
void
*
)
&
rtp_session
->
recv_msg
,
&
bytes
);
...
...
@@ -541,7 +542,7 @@ SWITCH_DECLARE(int) switch_rtp_zerocopy_read(switch_rtp *rtp_session, void **dat
static
int
rtp_common_write
(
switch_rtp
*
rtp_session
,
void
*
data
,
uint32_t
datalen
,
uint8_t
payload
)
{
switch_size_t
bytes
;
if
(
rtp_session
->
packet_size
>
datalen
&&
(
payload
==
rtp_session
->
payload
))
{
if
(
!
rtp_session
->
packet_buffer
)
{
if
(
switch_buffer_create
(
rtp_session
->
pool
,
&
rtp_session
->
packet_buffer
,
rtp_session
->
packet_size
*
2
)
!=
SWITCH_STATUS_SUCCESS
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论