Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
655338b4
提交
655338b4
authored
12月 07, 2005
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
iax
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@91
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
46b0e12a
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
44 行增加
和
34 行删除
+44
-34
mod_bridgecall.c
src/mod/mod_bridgecall/mod_bridgecall.c
+2
-0
mod_iaxchan.c
src/mod/mod_iaxchan/mod_iaxchan.c
+40
-22
Freeswitch.sln
w32/vsnet/Freeswitch.sln
+1
-11
mod_IaxChan.vcproj
w32/vsnet/mod_IaxChan.vcproj
+1
-1
没有找到文件。
src/mod/mod_bridgecall/mod_bridgecall.c
浏览文件 @
655338b4
...
...
@@ -181,6 +181,8 @@ static void audio_bridge_function(switch_core_session *session, char *data)
if
(
switch_core_session_outgoing_channel
(
session
,
chan_type
,
caller_profile
,
&
peer_session
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_console_printf
(
SWITCH_CHANNEL_CONSOLE
,
"DOH!
\n
"
);
switch_channel_hangup
(
caller_channel
);
return
;
}
else
{
struct
switch_core_thread_session
this_audio_thread
,
other_audio_thread
;
time_t
start
;
...
...
src/mod/mod_iaxchan/mod_iaxchan.c
浏览文件 @
655338b4
...
...
@@ -88,15 +88,17 @@ struct private_object {
};
#ifdef WIN32
void
gettimeofday
(
struct
timeval
*
tv
,
void
*
tz
)
{
struct
_timeb
curSysTime
;
_ftime
(
&
curSysTime
);
tv
->
tv_sec
=
curSysTime
.
time
;
tv
->
tv_usec
=
curSysTime
.
millitm
*
1000
;
#include <Mmsystem.h>
return
;
int
gettimeofday
(
struct
timeval
*
tp
,
void
*
tz
)
{
DWORD
now
;
now
=
timeGetTime
();
tp
->
tv_sec
=
now
/
1000
;
tp
->
tv_usec
=
(
now
%
1000
)
*
1000
;
return
0
;
}
#endif
static
void
set_global_dialplan
(
char
*
dialplan
)
{
...
...
@@ -444,6 +446,7 @@ static switch_status channel_on_hangup(switch_core_session *session)
assert
(
tech_pvt
!=
NULL
);
switch_clear_flag
(
tech_pvt
,
TFLAG_IO
);
switch_thread_cond_signal
(
tech_pvt
->
cond
);
switch_core_codec_destroy
(
&
tech_pvt
->
read_codec
);
switch_core_codec_destroy
(
&
tech_pvt
->
write_codec
);
...
...
@@ -615,20 +618,27 @@ static switch_status channel_read_frame(switch_core_session *session, switch_fra
tech_pvt
=
switch_core_session_get_private
(
session
);
assert
(
tech_pvt
!=
NULL
);
//tech_pvt->read_frame.datalen = 0;
if
(
switch_test_flag
(
tech_pvt
,
TFLAG_IO
))
{
switch_thread_cond_wait
(
tech_pvt
->
cond
,
tech_pvt
->
mutex
);
while
(
switch_test_flag
(
tech_pvt
,
TFLAG_IO
)
&&
!
switch_test_flag
(
tech_pvt
,
TFLAG_VOICE
))
{
switch_yield
(
1000
);
}
for
(;;)
{
if
(
switch_test_flag
(
tech_pvt
,
TFLAG_IO
))
{
//printf("WTF %d\n", tech_pvt->read_frame.datalen);
*
frame
=
&
tech_pvt
->
read_frame
;
switch_clear_flag
(
tech_pvt
,
TFLAG_VOICE
);
return
SWITCH_STATUS_SUCCESS
;
switch_thread_cond_wait
(
tech_pvt
->
cond
,
tech_pvt
->
mutex
);
if
(
!
switch_test_flag
(
tech_pvt
,
TFLAG_IO
))
{
return
SWITCH_STATUS_FALSE
;
}
while
(
switch_test_flag
(
tech_pvt
,
TFLAG_IO
)
&&
!
switch_test_flag
(
tech_pvt
,
TFLAG_VOICE
))
{
switch_yield
(
1000
);
}
if
(
switch_test_flag
(
tech_pvt
,
TFLAG_IO
))
{
switch_clear_flag
(
tech_pvt
,
TFLAG_VOICE
);
if
(
!
tech_pvt
->
read_frame
.
datalen
)
{
continue
;
}
*
frame
=
&
tech_pvt
->
read_frame
;
return
SWITCH_STATUS_SUCCESS
;
}
}
break
;
}
return
SWITCH_STATUS_FALSE
;
}
...
...
@@ -645,11 +655,15 @@ static switch_status channel_write_frame(switch_core_session *session, switch_fr
tech_pvt
=
switch_core_session_get_private
(
session
);
assert
(
tech_pvt
!=
NULL
);
if
(
!
switch_test_flag
(
tech_pvt
,
TFLAG_IO
))
{
return
SWITCH_STATUS_FALSE
;
}
if
(
switch_test_flag
(
tech_pvt
,
TFLAG_LINEAR
))
{
switch_swap_linear
(
frame
->
data
,
frame
->
datalen
/
2
);
switch_swap_linear
(
frame
->
data
,
(
int
)
frame
->
datalen
/
2
);
}
iax_send_voice
(
tech_pvt
->
iax_session
,
tech_pvt
->
codec
,
frame
->
data
,
frame
->
datalen
,
tech_pvt
->
write_codec
.
implementation
->
samples_per_frame
);
iax_send_voice
(
tech_pvt
->
iax_session
,
tech_pvt
->
codec
,
frame
->
data
,
(
int
)
frame
->
datalen
,
tech_pvt
->
write_codec
.
implementation
->
samples_per_frame
);
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -710,6 +724,10 @@ static const switch_loadable_module_interface channel_module_interface = {
SWITCH_MOD_DECLARE
(
switch_status
)
switch_module_load
(
const
switch_loadable_module_interface
**
interface
)
{
#ifdef WIN32
timeBeginPeriod
(
1
);
#endif
if
(
switch_core_new_memory_pool
(
&
module_pool
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_console_printf
(
SWITCH_CHANNEL_CONSOLE
,
"OH OH no pool
\n
"
);
...
...
@@ -920,8 +938,8 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
switch_clear_flag
(
tech_pvt
,
TFLAG_IO
);
switch_clear_flag
(
tech_pvt
,
TFLAG_VOICE
);
if
((
channel
=
switch_core_session_get_channel
(
tech_pvt
->
session
)))
{
switch_thread_cond_signal
(
tech_pvt
->
cond
);
switch_console_printf
(
SWITCH_CHANNEL_CONSOLE
,
"Hangup %s
\n
"
,
switch_channel_get_name
(
channel
));
switch_set_flag
(
tech_pvt
,
TFLAG_HANGUP
);
switch_channel_hangup
(
channel
);
...
...
w32/vsnet/Freeswitch.sln
浏览文件 @
655338b4
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual
C++ Express
2005
# Visual
Studio
2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchConsole", "FreeSwitchConsole.vcproj", "{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
...
...
@@ -107,14 +107,4 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5} = {AC923B27-D665-490E-94F5-FA40E1607FB6}
{2988EB83-785F-45D4-8731-8E1E4345177E} = {AC923B27-D665-490E-94F5-FA40E1607FB6}
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552} = {AC923B27-D665-490E-94F5-FA40E1607FB6}
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE} = {AC923B27-D665-490E-94F5-FA40E1607FB6}
{78100236-7CEA-4948-96CC-E8ED3160329C} = {AC923B27-D665-490E-94F5-FA40E1607FB6}
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88} = {AC923B27-D665-490E-94F5-FA40E1607FB6}
{FE3540C5-3303-46E0-A69E-D92F775687F1} = {AC923B27-D665-490E-94F5-FA40E1607FB6}
{E1794405-29D4-466D-9BE3-DD2344C2A663} = {AC923B27-D665-490E-94F5-FA40E1607FB6}
EndGlobalSection
EndGlobal
w32/vsnet/mod_IaxChan.vcproj
浏览文件 @
655338b4
...
...
@@ -63,7 +63,7 @@
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"libapr-1.lib
libiax2.lib Ws2_32.lib Iphlpapi
.lib"
AdditionalDependencies=
"libapr-1.lib
Ws2_32.lib Iphlpapi.lib libiax2.lib Winmm
.lib"
OutputFile=
"$(OutDir)/mod/mod_IaxChan.dll"
LinkIncremental=
"2"
AdditionalLibraryDirectories=
"$(InputDir)..\..\libs\apr\Debug;$(InputDir)..\..\libs\iax\Debug"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论