Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
1b4c78bf
提交
1b4c78bf
authored
8月 06, 2011
作者:
Giovanni Maruzzelli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
skypopen: avoid accumulating delay on VMs, better debug logging
上级
bfabc98f
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
12 行删除
+15
-12
mod_skypopen.c
src/mod/endpoints/mod_skypopen/mod_skypopen.c
+5
-6
skypopen_protocol.c
src/mod/endpoints/mod_skypopen/skypopen_protocol.c
+10
-6
没有找到文件。
src/mod/endpoints/mod_skypopen/mod_skypopen.c
浏览文件 @
1b4c78bf
...
...
@@ -838,7 +838,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
if
(
switch_test_flag
(
tech_pvt
,
TFLAG_PROGRESS
))
{
//DEBUGA_SKYPE("CHANNEL READ FRAME in TFLAG_PROGRESS goto CNG\n", SKYPOPEN_P_LOG);
switch_sleep
(
MS_SKYPOPEN
*
1000
);
//
switch_sleep(MS_SKYPOPEN * 1000);
goto
cng
;
}
...
...
@@ -879,7 +879,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
DEBUGA_SKYPE
(
"skypopen_audio_read going back to read
\n
"
,
SKYPOPEN_P_LOG
);
goto
read
;
}
DEBUGA_SKYPE
(
"skypopen_audio_read Silence
\n
"
,
SKYPOPEN_P_LOG
);
DEBUGA_SKYPE
(
"
READ BUFFER EMPTY,
skypopen_audio_read Silence
\n
"
,
SKYPOPEN_P_LOG
);
memset
(
tech_pvt
->
read_frame
.
data
,
255
,
BYTES_PER_FRAME
);
tech_pvt
->
read_frame
.
datalen
=
BYTES_PER_FRAME
;
...
...
@@ -1022,17 +1022,16 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
switch_mutex_lock
(
tech_pvt
->
mutex_audio_cli
);
if
(
switch_buffer_freespace
(
tech_pvt
->
write_buffer
)
<
frame
->
datalen
)
{
DEBUGA_SKYPE
(
"NO SPACE WRITE: %d
\n
"
,
SKYPOPEN_P_LOG
,
frame
->
datalen
);
switch_buffer_zero
(
tech_pvt
->
write_buffer
);
no_space
=
1
;
}
switch_buffer_write
(
tech_pvt
->
write_buffer
,
frame
->
data
,
frame
->
datalen
);
switch_mutex_unlock
(
tech_pvt
->
mutex_audio_cli
);
if
(
no_space
)
{
switch_sleep
(
MS_SKYPOPEN
*
1000
);
}
else
{
tech_pvt
->
begin_to_write
=
1
;
//switch_sleep(MS_SKYPOPEN * 1000);
DEBUGA_SKYPE
(
"NO SPACE in WRITE BUFFER: there was no space for %d
\n
"
,
SKYPOPEN_P_LOG
,
frame
->
datalen
);
}
tech_pvt
->
begin_to_write
=
1
;
return
SWITCH_STATUS_SUCCESS
;
}
...
...
src/mod/endpoints/mod_skypopen/skypopen_protocol.c
浏览文件 @
1b4c78bf
...
...
@@ -540,6 +540,7 @@ int skypopen_signaling_read(private_t *tech_pvt)
DEBUGA_SKYPE
(
"Skype FAILED on skype_call %s. Let's wait for the FAILED message.
\n
"
,
SKYPOPEN_P_LOG
,
id
);
}
#if 0
#ifndef WIN32
if (!strcasecmp(prop, "DURATION")) { /* each 20 seconds, we zero the buffers and sync the timers */
if (!((atoi(value) % 20))) {
if (tech_pvt->read_buffer) {
...
...
@@ -565,6 +566,7 @@ int skypopen_signaling_read(private_t *tech_pvt)
DEBUGA_SKYPE("Synching audio on skype_call: %s.\n", SKYPOPEN_P_LOG, id);
}
}
#endif //WIN32
#endif //0
if
(
!
strcasecmp
(
prop
,
"DURATION"
)
&&
(
!
strcasecmp
(
value
,
"1"
)))
{
if
(
strcasecmp
(
id
,
tech_pvt
->
skype_call_id
))
{
...
...
@@ -882,19 +884,21 @@ void *skypopen_do_tcp_srv_thread_func(void *obj)
||
tech_pvt
->
skype_callflow
==
CALLFLOW_STATUS_EARLYMEDIA
||
tech_pvt
->
skype_callflow
==
CALLFLOW_STATUS_REMOTEHOLD
||
tech_pvt
->
skype_callflow
==
SKYPOPEN_STATE_UP
))
{
unsigned
int
fdselect
;
//
unsigned int fdselect;
int
rt
=
1
;
fd_set
fs
;
//
fd_set fs;
//struct timeval to;
int
nospace
;
if
(
!
(
running
&&
tech_pvt
->
running
))
break
;
#if 0
fdselect = fd;
FD_ZERO(&fs);
FD_SET(fdselect, &fs);
//to.tv_usec = MS_SKYPOPEN * 1000 * 3;
//to.tv_sec = 0;
to.tv_usec = MS_SKYPOPEN * 1000 * 3;
to.tv_sec = 0;
#endif //0
if
(
tech_pvt
->
timer_read_srv
.
timer_interface
&&
tech_pvt
->
timer_read_srv
.
timer_interface
->
timer_next
)
{
switch_core_timer_next
(
&
tech_pvt
->
timer_read_srv
);
...
...
@@ -935,7 +939,7 @@ void *skypopen_do_tcp_srv_thread_func(void *obj)
}
switch_mutex_unlock
(
tech_pvt
->
mutex_audio_srv
);
if
(
nospace
)
{
DEBUGA_SKYPE
(
"NO SPACE
READ
: there was no space for: %d
\n
"
,
SKYPOPEN_P_LOG
,
len
);
DEBUGA_SKYPE
(
"NO SPACE
in READ BUFFER
: there was no space for: %d
\n
"
,
SKYPOPEN_P_LOG
,
len
);
}
}
else
if
(
len
==
0
)
{
DEBUGA_SKYPE
(
"CLOSED
\n
"
,
SKYPOPEN_P_LOG
);
...
...
@@ -1080,7 +1084,7 @@ void *skypopen_do_tcp_cli_thread_func(void *obj)
}
switch_mutex_lock
(
tech_pvt
->
mutex_audio_cli
);
if
(
tech_pvt
->
write_buffer
&&
switch_buffer_inuse
(
tech_pvt
->
write_buffer
))
{
bytes_to_write
=
switch_buffer_read
(
tech_pvt
->
write_buffer
,
cli_out
,
BYTES_PER_FRAME
*
2
);
bytes_to_write
=
switch_buffer_read
(
tech_pvt
->
write_buffer
,
cli_out
,
BYTES_PER_FRAME
);
}
switch_mutex_unlock
(
tech_pvt
->
mutex_audio_cli
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论