Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
a128d317
提交
a128d317
authored
4月 19, 2006
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@1198
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
f2812dbc
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
14 行增加
和
11 行删除
+14
-11
switch_rtp.h
src/include/switch_rtp.h
+1
-1
mod_dingaling.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
+2
-2
mod_exosip.c
src/mod/endpoints/mod_exosip/mod_exosip.c
+4
-2
switch_rtp.c
src/switch_rtp.c
+7
-6
没有找到文件。
src/include/switch_rtp.h
浏览文件 @
a128d317
...
@@ -283,7 +283,7 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp *rtp_session, switch_frame
...
@@ -283,7 +283,7 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp *rtp_session, switch_frame
\param flags frame flags
\param flags frame flags
\return the number of bytes written
\return the number of bytes written
*/
*/
SWITCH_DECLARE
(
int
)
switch_rtp_write_
payload
(
switch_rtp
*
rtp_session
,
void
*
data
,
uint16_t
datalen
,
switch_payload_t
payload
,
uint32_t
ts
,
uint16_t
mseq
,
switch_frame_flag
*
flags
);
SWITCH_DECLARE
(
int
)
switch_rtp_write_
manual
(
switch_rtp
*
rtp_session
,
void
*
data
,
uint16_t
datalen
,
uint8_t
m
,
switch_payload_t
payload
,
uint32_t
ts
,
uint16_t
mseq
,
switch_frame_flag
*
flags
);
/*!
/*!
\brief Retrieve the SSRC from a given RTP session
\brief Retrieve the SSRC from a given RTP session
...
...
src/mod/endpoints/mod_dingaling/mod_dingaling.c
浏览文件 @
a128d317
...
@@ -812,7 +812,7 @@ static switch_status channel_write_frame(switch_core_session *session, switch_fr
...
@@ -812,7 +812,7 @@ static switch_status channel_write_frame(switch_core_session *session, switch_fr
for
(
x
=
0
;
x
<
loops
;
x
++
)
{
for
(
x
=
0
;
x
<
loops
;
x
++
)
{
switch_rtp_write_
payload
(
tech_pvt
->
rtp_session
,
tech_pvt
->
out_digit_packet
,
4
,
101
,
ts
,
tech_pvt
->
out_digit_seq
,
&
frame
->
flags
);
switch_rtp_write_
manual
(
tech_pvt
->
rtp_session
,
tech_pvt
->
out_digit_packet
,
4
,
0
,
101
,
ts
,
tech_pvt
->
out_digit_seq
,
&
frame
->
flags
);
/*
/*
printf("Send %s packet for [%c] ts=%d sofar=%u dur=%d\n", loops == 1 ? "middle" : "end", tech_pvt->out_digit, ts,
printf("Send %s packet for [%c] ts=%d sofar=%u dur=%d\n", loops == 1 ? "middle" : "end", tech_pvt->out_digit, ts,
tech_pvt->out_digit_sofar, duration);
tech_pvt->out_digit_sofar, duration);
...
@@ -837,7 +837,7 @@ static switch_status channel_write_frame(switch_core_session *session, switch_fr
...
@@ -837,7 +837,7 @@ static switch_status channel_write_frame(switch_core_session *session, switch_fr
ts
=
tech_pvt
->
timestamp_dtmf
+=
samples
;
ts
=
tech_pvt
->
timestamp_dtmf
+=
samples
;
tech_pvt
->
out_digit_seq
++
;
tech_pvt
->
out_digit_seq
++
;
for
(
x
=
0
;
x
<
3
;
x
++
)
{
for
(
x
=
0
;
x
<
3
;
x
++
)
{
switch_rtp_write_
payload
(
tech_pvt
->
rtp_session
,
tech_pvt
->
out_digit_packet
,
4
,
101
,
ts
,
tech_pvt
->
out_digit_seq
,
&
frame
->
flags
);
switch_rtp_write_
manual
(
tech_pvt
->
rtp_session
,
tech_pvt
->
out_digit_packet
,
4
,
1
,
101
,
ts
,
tech_pvt
->
out_digit_seq
,
&
frame
->
flags
);
/*
/*
printf("Send start packet for [%c] ts=%d sofar=%u dur=%d\n", tech_pvt->out_digit, ts,
printf("Send start packet for [%c] ts=%d sofar=%u dur=%d\n", tech_pvt->out_digit, ts,
tech_pvt->out_digit_sofar, 0);
tech_pvt->out_digit_sofar, 0);
...
...
src/mod/endpoints/mod_exosip/mod_exosip.c
浏览文件 @
a128d317
...
@@ -736,7 +736,9 @@ static switch_status exosip_write_frame(switch_core_session *session, switch_fra
...
@@ -736,7 +736,9 @@ static switch_status exosip_write_frame(switch_core_session *session, switch_fra
for
(
x
=
0
;
x
<
loops
;
x
++
)
{
for
(
x
=
0
;
x
<
loops
;
x
++
)
{
frame
->
flags
=
0
;
frame
->
flags
=
0
;
switch_rtp_write_payload
(
tech_pvt
->
rtp_session
,
tech_pvt
->
out_digit_packet
,
4
,
101
,
ts
,
tech_pvt
->
out_digit_seq
,
&
frame
->
flags
);
switch_rtp_write_manual
(
tech_pvt
->
rtp_session
,
tech_pvt
->
out_digit_packet
,
4
,
0
,
101
,
ts
,
loops
==
1
?
tech_pvt
->
out_digit_seq
++
:
tech_pvt
->
out_digit_seq
,
&
frame
->
flags
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Send %s packet for [%c] ts=%d sofar=%u dur=%d
\n
"
,
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Send %s packet for [%c] ts=%d sofar=%u dur=%d
\n
"
,
loops
==
1
?
"middle"
:
"end"
,
loops
==
1
?
"middle"
:
"end"
,
tech_pvt
->
out_digit
,
tech_pvt
->
out_digit
,
...
@@ -764,7 +766,7 @@ static switch_status exosip_write_frame(switch_core_session *session, switch_fra
...
@@ -764,7 +766,7 @@ static switch_status exosip_write_frame(switch_core_session *session, switch_fra
tech_pvt
->
out_digit_seq
++
;
tech_pvt
->
out_digit_seq
++
;
for
(
x
=
0
;
x
<
3
;
x
++
)
{
for
(
x
=
0
;
x
<
3
;
x
++
)
{
frame
->
flags
=
0
;
frame
->
flags
=
0
;
switch_rtp_write_
payload
(
tech_pvt
->
rtp_session
,
tech_pvt
->
out_digit_packet
,
4
,
101
,
ts
,
tech_pvt
->
out_digit_seq
,
&
frame
->
flags
);
switch_rtp_write_
manual
(
tech_pvt
->
rtp_session
,
tech_pvt
->
out_digit_packet
,
4
,
1
,
101
,
ts
,
tech_pvt
->
out_digit_seq
,
&
frame
->
flags
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Send start packet for [%c] ts=%d sofar=%u dur=%d
\n
"
,
tech_pvt
->
out_digit
,
ts
,
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Send start packet for [%c] ts=%d sofar=%u dur=%d
\n
"
,
tech_pvt
->
out_digit
,
ts
,
tech_pvt
->
out_digit_sofar
,
0
);
tech_pvt
->
out_digit_sofar
,
0
);
}
}
...
...
src/switch_rtp.c
浏览文件 @
a128d317
...
@@ -633,7 +633,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read(switch_rtp *rtp_session,
...
@@ -633,7 +633,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read(switch_rtp *rtp_session,
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
}
}
static
int
rtp_common_write
(
switch_rtp
*
rtp_session
,
void
*
data
,
uint32_t
datalen
,
switch_payload_t
payload
,
switch_frame_flag
*
flags
)
static
int
rtp_common_write
(
switch_rtp
*
rtp_session
,
void
*
data
,
uint32_t
datalen
,
uint8_t
m
,
switch_payload_t
payload
,
switch_frame_flag
*
flags
)
{
{
switch_size_t
bytes
;
switch_size_t
bytes
;
uint8_t
packetize
=
(
rtp_session
->
packet_size
>
datalen
&&
(
payload
==
rtp_session
->
payload
))
?
1
:
0
;
uint8_t
packetize
=
(
rtp_session
->
packet_size
>
datalen
&&
(
payload
==
rtp_session
->
payload
))
?
1
:
0
;
...
@@ -645,7 +645,8 @@ static int rtp_common_write(switch_rtp *rtp_session, void *data, uint32_t datale
...
@@ -645,7 +645,8 @@ static int rtp_common_write(switch_rtp *rtp_session, void *data, uint32_t datale
send_msg
=
(
rtp_msg_t
*
)
data
;
send_msg
=
(
rtp_msg_t
*
)
data
;
}
else
{
}
else
{
send_msg
=
&
rtp_session
->
send_msg
;
send_msg
=
&
rtp_session
->
send_msg
;
send_msg
->
header
.
pt
=
rtp_session
->
payload
;
send_msg
->
header
.
pt
=
payload
;
send_msg
->
header
.
m
=
m
;
if
(
packetize
)
{
if
(
packetize
)
{
if
(
!
rtp_session
->
packet_buffer
)
{
if
(
!
rtp_session
->
packet_buffer
)
{
if
(
switch_buffer_create
(
rtp_session
->
pool
,
&
rtp_session
->
packet_buffer
,
rtp_session
->
packet_size
*
2
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_buffer_create
(
rtp_session
->
pool
,
&
rtp_session
->
packet_buffer
,
rtp_session
->
packet_size
*
2
)
!=
SWITCH_STATUS_SUCCESS
)
{
...
@@ -703,7 +704,7 @@ SWITCH_DECLARE(int) switch_rtp_write(switch_rtp *rtp_session, void *data, uint32
...
@@ -703,7 +704,7 @@ SWITCH_DECLARE(int) switch_rtp_write(switch_rtp *rtp_session, void *data, uint32
rtp_session
->
send_msg
.
header
.
seq
=
rtp_session
->
seq
;
rtp_session
->
send_msg
.
header
.
seq
=
rtp_session
->
seq
;
rtp_session
->
send_msg
.
header
.
ts
=
htonl
(
rtp_session
->
ts
);
rtp_session
->
send_msg
.
header
.
ts
=
htonl
(
rtp_session
->
ts
);
return
rtp_common_write
(
rtp_session
,
data
,
datalen
,
rtp_session
->
payload
,
flags
);
return
rtp_common_write
(
rtp_session
,
data
,
datalen
,
0
,
rtp_session
->
payload
,
flags
);
}
}
...
@@ -731,11 +732,11 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp *rtp_session, switch_frame
...
@@ -731,11 +732,11 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp *rtp_session, switch_frame
rtp_session
->
send_msg
.
header
.
ts
=
htonl
(
rtp_session
->
ts
);
rtp_session
->
send_msg
.
header
.
ts
=
htonl
(
rtp_session
->
ts
);
}
}
return
rtp_common_write
(
rtp_session
,
data
,
len
,
rtp_session
->
payload
,
&
frame
->
flags
);
return
rtp_common_write
(
rtp_session
,
data
,
len
,
0
,
rtp_session
->
payload
,
&
frame
->
flags
);
}
}
SWITCH_DECLARE
(
int
)
switch_rtp_write_
payload
(
switch_rtp
*
rtp_session
,
void
*
data
,
uint16_t
datalen
,
uint8_t
payload
,
uint32_t
ts
,
uint16_t
mseq
,
switch_frame_flag
*
flags
)
SWITCH_DECLARE
(
int
)
switch_rtp_write_
manual
(
switch_rtp
*
rtp_session
,
void
*
data
,
uint16_t
datalen
,
uint8_t
m
,
uint8_t
payload
,
uint32_t
ts
,
uint16_t
mseq
,
switch_frame_flag
*
flags
)
{
{
if
(
!
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_IO
)
||
!
rtp_session
->
remote_addr
)
{
if
(
!
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_IO
)
||
!
rtp_session
->
remote_addr
)
{
...
@@ -746,7 +747,7 @@ SWITCH_DECLARE(int) switch_rtp_write_payload(switch_rtp *rtp_session, void *data
...
@@ -746,7 +747,7 @@ SWITCH_DECLARE(int) switch_rtp_write_payload(switch_rtp *rtp_session, void *data
rtp_session
->
send_msg
.
header
.
seq
=
htons
(
mseq
);
rtp_session
->
send_msg
.
header
.
seq
=
htons
(
mseq
);
rtp_session
->
send_msg
.
header
.
ts
=
htonl
(
rtp_session
->
ts
);
rtp_session
->
send_msg
.
header
.
ts
=
htonl
(
rtp_session
->
ts
);
return
rtp_common_write
(
rtp_session
,
data
,
datalen
,
payload
,
flags
);
return
rtp_common_write
(
rtp_session
,
data
,
datalen
,
m
,
payload
,
flags
);
}
}
SWITCH_DECLARE
(
uint32_t
)
switch_rtp_get_ssrc
(
switch_rtp
*
rtp_session
)
SWITCH_DECLARE
(
uint32_t
)
switch_rtp_get_ssrc
(
switch_rtp
*
rtp_session
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论