Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d79ff1c6
提交
d79ff1c6
authored
12月 10, 2005
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@107
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
0ce22f5a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
89 行增加
和
25 行删除
+89
-25
mod_bridgecall.c
src/mod/mod_bridgecall/mod_bridgecall.c
+3
-3
mod_codec_g729.c
src/mod/mod_codec_g729/mod_codec_g729.c
+10
-20
mod_codec_g729.vcproj
src/mod/mod_codec_g729/mod_codec_g729.vcproj
+1
-1
mod_iaxchan.c
src/mod/mod_iaxchan/mod_iaxchan.c
+1
-1
Freeswitch.sln
w32/vsnet/Freeswitch.sln
+74
-0
没有找到文件。
src/mod/mod_bridgecall/mod_bridgecall.c
浏览文件 @
d79ff1c6
...
@@ -214,7 +214,7 @@ static void audio_bridge_function(switch_core_session *session, char *data)
...
@@ -214,7 +214,7 @@ static void audio_bridge_function(switch_core_session *session, char *data)
if
(
state
>
CS_RING
)
{
if
(
state
>
CS_RING
)
{
break
;
break
;
}
}
switch_yield
(
100
);
switch_yield
(
100
0
);
}
}
time
(
&
start
);
time
(
&
start
);
...
@@ -222,7 +222,7 @@ static void audio_bridge_function(switch_core_session *session, char *data)
...
@@ -222,7 +222,7 @@ static void audio_bridge_function(switch_core_session *session, char *data)
switch_channel_get_state
(
peer_channel
)
==
CS_TRANSMIT
&&
switch_channel_get_state
(
peer_channel
)
==
CS_TRANSMIT
&&
!
switch_channel_test_flag
(
peer_channel
,
CF_ANSWERED
)
&&
!
switch_channel_test_flag
(
peer_channel
,
CF_ANSWERED
)
&&
((
time
(
NULL
)
-
start
)
<
timelimit
))
{
((
time
(
NULL
)
-
start
)
<
timelimit
))
{
switch_yield
(
1
00
);
switch_yield
(
200
00
);
}
}
if
(
switch_channel_test_flag
(
peer_channel
,
CF_ANSWERED
))
{
if
(
switch_channel_test_flag
(
peer_channel
,
CF_ANSWERED
))
{
...
@@ -233,7 +233,7 @@ static void audio_bridge_function(switch_core_session *session, char *data)
...
@@ -233,7 +233,7 @@ static void audio_bridge_function(switch_core_session *session, char *data)
other_audio_thread
.
running
=
-
1
;
other_audio_thread
.
running
=
-
1
;
/* wait for the other audio thread */
/* wait for the other audio thread */
while
(
other_audio_thread
.
running
)
{
while
(
other_audio_thread
.
running
)
{
switch_yield
(
100
);
switch_yield
(
100
0
);
}
}
}
}
...
...
src/mod/mod_codec_g729/mod_codec_g729.c
浏览文件 @
d79ff1c6
...
@@ -35,14 +35,12 @@
...
@@ -35,14 +35,12 @@
static
const
char
modname
[]
=
"mod_codec_g729"
;
static
const
char
modname
[]
=
"mod_codec_g729"
;
struct
g729_context
{
struct
g729_context
{
struct
dec_state
*
decoder_object
;
struct
dec_state
decoder_object
;
struct
cod_state
*
encoder_object
;
struct
cod_state
encoder_object
;
};
};
static
switch_status
switch_g729_init
(
switch_codec
*
codec
,
switch_codec_flag
flags
,
const
struct
switch_codec_settings
*
codec_settings
)
static
switch_status
switch_g729_init
(
switch_codec
*
codec
,
switch_codec_flag
flags
,
const
struct
switch_codec_settings
*
codec_settings
)
{
{
struct
dec_state
*
decoder_object
=
NULL
;
struct
cod_state
*
encoder_object
=
NULL
;
struct
g729_context
*
context
=
NULL
;
struct
g729_context
*
context
=
NULL
;
int
encoding
,
decoding
;
int
encoding
,
decoding
;
...
@@ -52,20 +50,14 @@ static switch_status switch_g729_init(switch_codec *codec, switch_codec_flag fla
...
@@ -52,20 +50,14 @@ static switch_status switch_g729_init(switch_codec *codec, switch_codec_flag fla
if
(
!
(
encoding
||
decoding
)
||
(
!
(
context
=
switch_core_alloc
(
codec
->
memory_pool
,
sizeof
(
*
context
)))))
{
if
(
!
(
encoding
||
decoding
)
||
(
!
(
context
=
switch_core_alloc
(
codec
->
memory_pool
,
sizeof
(
*
context
)))))
{
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
}
else
{
}
else
{
if
((
encoding
)
&&
(
!
(
encoder_object
=
switch_core_alloc
(
codec
->
memory_pool
,
sizeof
(
*
encoder_object
)))))
{
memset
(
context
,
0
,
sizeof
(
*
context
));
return
SWITCH_STATUS_FALSE
;
if
(
encoding
)
{
g729_init_coder
(
&
context
->
encoder_object
,
0
);
}
}
if
(
(
decoding
)
&&
(
!
(
decoder_object
=
switch_core_alloc
(
codec
->
memory_pool
,
sizeof
(
*
decoder_object
))))
)
{
if
(
decoding
)
{
return
SWITCH_STATUS_FALSE
;
g729_init_decoder
(
&
context
->
decoder_object
)
;
}
}
if
(
encoder_object
)
{
g729_init_coder
(
encoder_object
,
0
);
}
if
(
decoder_object
)
{
g729_init_decoder
(
decoder_object
);
}
context
->
decoder_object
=
decoder_object
;
context
->
encoder_object
=
encoder_object
;
codec
->
private
=
context
;
codec
->
private
=
context
;
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
...
@@ -88,7 +80,6 @@ static switch_status switch_g729_encode(switch_codec *codec,
...
@@ -88,7 +80,6 @@ static switch_status switch_g729_encode(switch_codec *codec,
unsigned
int
*
flag
)
unsigned
int
*
flag
)
{
{
struct
g729_context
*
context
=
codec
->
private
;
struct
g729_context
*
context
=
codec
->
private
;
struct
cod_state
*
encoder_object
=
context
->
encoder_object
;
short
*
dbuf
;
short
*
dbuf
;
unsigned
char
*
ebuf
;
unsigned
char
*
ebuf
;
int
cbret
=
0
;
int
cbret
=
0
;
...
@@ -102,7 +93,7 @@ static switch_status switch_g729_encode(switch_codec *codec,
...
@@ -102,7 +93,7 @@ static switch_status switch_g729_encode(switch_codec *codec,
if
(
decoded_data_len
<
(
size_t
)
codec
->
implementation
->
samples_per_frame
*
2
||
*
encoded_data_len
<
(
size_t
)
codec
->
implementation
->
encoded_bytes_per_frame
)
if
(
decoded_data_len
<
(
size_t
)
codec
->
implementation
->
samples_per_frame
*
2
||
*
encoded_data_len
<
(
size_t
)
codec
->
implementation
->
encoded_bytes_per_frame
)
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
g729_coder
(
encoder_object
,
(
short
*
)
dbuf
,
ebuf
,
&
cbret
);
g729_coder
(
&
context
->
encoder_object
,
(
short
*
)
dbuf
,
ebuf
,
&
cbret
);
*
encoded_data_len
=
(
codec
->
implementation
->
encoded_bytes_per_frame
/
2
);
*
encoded_data_len
=
(
codec
->
implementation
->
encoded_bytes_per_frame
/
2
);
...
@@ -119,7 +110,6 @@ static switch_status switch_g729_decode(switch_codec *codec,
...
@@ -119,7 +110,6 @@ static switch_status switch_g729_decode(switch_codec *codec,
unsigned
int
*
flag
)
unsigned
int
*
flag
)
{
{
struct
g729_context
*
context
=
codec
->
private
;
struct
g729_context
*
context
=
codec
->
private
;
struct
dec_state
*
decoder_object
=
context
->
decoder_object
;
short
*
dbuf
;
short
*
dbuf
;
unsigned
char
*
ebuf
;
unsigned
char
*
ebuf
;
...
@@ -136,7 +126,7 @@ static switch_status switch_g729_decode(switch_codec *codec,
...
@@ -136,7 +126,7 @@ static switch_status switch_g729_decode(switch_codec *codec,
memset
(
dbuf
,
0
,
codec
->
implementation
->
bytes_per_frame
);
memset
(
dbuf
,
0
,
codec
->
implementation
->
bytes_per_frame
);
*
decoded_data_len
=
codec
->
implementation
->
bytes_per_frame
;
*
decoded_data_len
=
codec
->
implementation
->
bytes_per_frame
;
}
else
{
}
else
{
g729_decoder
(
decoder_object
,
decoded_data
,
(
void
*
)
encoded_data
,
(
int
)
encoded_data_len
);
g729_decoder
(
&
context
->
decoder_object
,
decoded_data
,
(
void
*
)
encoded_data
,
(
int
)
encoded_data_len
);
*
decoded_data_len
=
codec
->
implementation
->
bytes_per_frame
;
*
decoded_data_len
=
codec
->
implementation
->
bytes_per_frame
;
}
}
...
...
src/mod/mod_codec_g729/mod_codec_g729.vcproj
浏览文件 @
d79ff1c6
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
ProjectType=
"Visual C++"
ProjectType=
"Visual C++"
Version=
"8.00"
Version=
"8.00"
Name=
"mod_codec_g729"
Name=
"mod_codec_g729"
ProjectGUID=
"{
B1FE4613-3F4B-4DAF-9714-2472BF8F56AE
}"
ProjectGUID=
"{
1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0
}"
RootNamespace=
"mod_codec_g729"
RootNamespace=
"mod_codec_g729"
Keyword=
"Win32Proj"
Keyword=
"Win32Proj"
>
>
...
...
src/mod/mod_iaxchan/mod_iaxchan.c
浏览文件 @
d79ff1c6
...
@@ -792,7 +792,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
...
@@ -792,7 +792,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
/* Wait for an event.*/
/* Wait for an event.*/
if
(
!
(
iaxevent
=
iax_get_event
(
0
)))
{
if
(
!
(
iaxevent
=
iax_get_event
(
0
)))
{
switch_yield
(
100
);
switch_yield
(
100
0
);
}
else
{
}
else
{
struct
private_object
*
tech_pvt
=
iax_get_private
(
iaxevent
->
session
);
struct
private_object
*
tech_pvt
=
iax_get_private
(
iaxevent
->
session
);
...
...
w32/vsnet/Freeswitch.sln
浏览文件 @
d79ff1c6
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论