Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
988bab33
提交
988bab33
authored
9月 29, 2008
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tweak
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@9752
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
ca1b4683
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
31 行增加
和
15 行删除
+31
-15
switch_rtp.h
src/include/switch_rtp.h
+5
-2
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+4
-3
Makefile
src/mod/formats/mod_shout/Makefile
+1
-1
switch_rtp.c
src/switch_rtp.c
+21
-9
没有找到文件。
src/include/switch_rtp.h
浏览文件 @
988bab33
...
...
@@ -161,7 +161,8 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(const char *rx_host,
\param port the remote port
\param err pointer for error messages
*/
SWITCH_DECLARE
(
switch_status_t
)
switch_rtp_set_remote_address
(
switch_rtp_t
*
rtp_session
,
const
char
*
host
,
switch_port_t
port
,
const
char
**
err
);
SWITCH_DECLARE
(
switch_status_t
)
switch_rtp_set_remote_address
(
switch_rtp_t
*
rtp_session
,
const
char
*
host
,
switch_port_t
port
,
switch_bool_t
change_adv_addr
,
const
char
**
err
);
SWITCH_DECLARE
(
char
*
)
switch_rtp_get_remote_host
(
switch_rtp_t
*
rtp_session
);
SWITCH_DECLARE
(
switch_port_t
)
switch_rtp_get_remote_port
(
switch_rtp_t
*
rtp_session
);
...
...
@@ -173,10 +174,12 @@ SWITCH_DECLARE(void) switch_rtp_set_max_missed_packets(switch_rtp_t *rtp_session
\param rtp_session an RTP session to assign the local address to
\param host the ip or fqhn of the local address
\param port the local port
\param change_adv_addr change the advertised address for doing compare
\param err pointer for error messages
\note this call also binds the RTP session's socket to the new address
*/
SWITCH_DECLARE
(
switch_status_t
)
switch_rtp_set_local_address
(
switch_rtp_t
*
rtp_session
,
const
char
*
host
,
switch_port_t
port
,
const
char
**
err
);
SWITCH_DECLARE
(
switch_status_t
)
switch_rtp_set_local_address
(
switch_rtp_t
*
rtp_session
,
const
char
*
host
,
switch_port_t
port
,
const
char
**
err
);
/*!
\brief Kill the socket on an existing RTP session
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
988bab33
...
...
@@ -858,7 +858,8 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt)
switch_set_flag_locked
(
tech_pvt
,
TFLAG_VIDEO
);
switch_channel_set_flag
(
tech_pvt
->
channel
,
CF_VIDEO
);
if
(
switch_rtp_ready
(
tech_pvt
->
video_rtp_session
))
{
if
(
switch_rtp_set_remote_address
(
tech_pvt
->
video_rtp_session
,
tech_pvt
->
remote_sdp_video_ip
,
tech_pvt
->
remote_sdp_video_port
,
&
err
)
!=
if
(
switch_rtp_set_remote_address
(
tech_pvt
->
video_rtp_session
,
tech_pvt
->
remote_sdp_video_ip
,
tech_pvt
->
remote_sdp_video_port
,
SWITCH_TRUE
,
&
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"VIDEO RTP REPORTS ERROR: [%s]
\n
"
,
err
);
}
else
{
...
...
@@ -881,7 +882,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt)
}
if
(
switch_rtp_ready
(
tech_pvt
->
rtp_session
))
{
if
(
switch_rtp_set_remote_address
(
tech_pvt
->
rtp_session
,
tech_pvt
->
remote_sdp_audio_ip
,
tech_pvt
->
remote_sdp_audio_port
,
&
err
)
!=
if
(
switch_rtp_set_remote_address
(
tech_pvt
->
rtp_session
,
tech_pvt
->
remote_sdp_audio_ip
,
tech_pvt
->
remote_sdp_audio_port
,
SWITCH_TRUE
,
&
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"AUDIO RTP REPORTS ERROR: [%s]
\n
"
,
err
);
}
else
{
...
...
@@ -1788,7 +1789,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
if
(
tech_pvt
->
rtp_session
&&
switch_test_flag
(
tech_pvt
,
TFLAG_REINVITE
))
{
switch_clear_flag_locked
(
tech_pvt
,
TFLAG_REINVITE
);
if
(
switch_rtp_set_remote_address
(
tech_pvt
->
rtp_session
,
tech_pvt
->
remote_sdp_audio_ip
,
tech_pvt
->
remote_sdp_audio_port
,
&
err
)
!=
if
(
switch_rtp_set_remote_address
(
tech_pvt
->
rtp_session
,
tech_pvt
->
remote_sdp_audio_ip
,
tech_pvt
->
remote_sdp_audio_port
,
SWITCH_TRUE
,
&
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"AUDIO RTP REPORTS ERROR: [%s]
\n
"
,
err
);
}
else
{
...
...
src/mod/formats/mod_shout/Makefile
浏览文件 @
988bab33
...
...
@@ -30,7 +30,7 @@ $(MPG123_DIR):
$(GETLIB)
$(MPG123)
.tar.gz
$(MPG123_DIR)/Makefile
:
$(MPG123_DIR)
cd
$(MPG123_DIR)
&&
./configure
--disable-shared
--with-pic
cd
$(MPG123_DIR)
&&
CFLAGS
=
$(AM_CFLAGS)
./configure
--disable-shared
--with-pic
$(TOUCH_TARGET)
$(MPG123LA)
:
$(MPG123_DIR)/Makefile
...
...
src/switch_rtp.c
浏览文件 @
988bab33
...
...
@@ -196,6 +196,7 @@ struct switch_rtp {
int
writing
;
char
*
stun_ip
;
switch_port_t
stun_port
;
int
from_auto
;
};
static
int
global_init
=
0
;
...
...
@@ -609,7 +610,8 @@ SWITCH_DECLARE(switch_port_t) switch_rtp_get_remote_port(switch_rtp_t *rtp_sessi
}
SWITCH_DECLARE
(
switch_status_t
)
switch_rtp_set_remote_address
(
switch_rtp_t
*
rtp_session
,
const
char
*
host
,
switch_port_t
port
,
const
char
**
err
)
SWITCH_DECLARE
(
switch_status_t
)
switch_rtp_set_remote_address
(
switch_rtp_t
*
rtp_session
,
const
char
*
host
,
switch_port_t
port
,
switch_bool_t
change_adv_addr
,
const
char
**
err
)
{
switch_sockaddr_t
*
remote_addr
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
...
...
@@ -623,8 +625,11 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_
switch_mutex_lock
(
rtp_session
->
write_mutex
);
rtp_session
->
remote_addr
=
remote_addr
;
rtp_session
->
remote_host_str
=
switch_core_strdup
(
rtp_session
->
pool
,
host
);
rtp_session
->
remote_port
=
port
;
if
(
change_adv_addr
)
{
rtp_session
->
remote_host_str
=
switch_core_strdup
(
rtp_session
->
pool
,
host
);
rtp_session
->
remote_port
=
port
;
}
if
(
rtp_session
->
sock_input
&&
switch_sockaddr_get_family
(
rtp_session
->
remote_addr
)
==
...
...
@@ -886,7 +891,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(const char *rx_host,
goto
end
;
}
if
(
switch_rtp_set_remote_address
(
rtp_session
,
tx_host
,
tx_port
,
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_rtp_set_remote_address
(
rtp_session
,
tx_host
,
tx_port
,
SWITCH_TRUE
,
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_mutex_unlock
(
rtp_session
->
flag_mutex
);
rtp_session
=
NULL
;
goto
end
;
...
...
@@ -1235,12 +1240,15 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
uint8_t
check
=
0
;
stfu_frame_t
*
jb_frame
;
int
ret
=
-
1
;
int
sleep_mss
=
1000
;
if
(
!
switch_rtp_ready
(
rtp_session
))
{
return
-
1
;
}
if
(
!
rtp_session
->
timer
.
interval
)
{
if
(
rtp_session
->
timer
.
interval
)
{
sleep_mss
=
1000
;
//rtp_session->timer.interval * 1000;
}
else
{
rtp_session
->
last_time
=
switch_time_now
();
}
...
...
@@ -1272,7 +1280,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Auto Changing port from %s:%u to %s:%u
\n
"
,
old_host
,
old
,
tx_host
,
switch_sockaddr_get_port
(
rtp_session
->
from_addr
));
switch_rtp_set_remote_address
(
rtp_session
,
tx_host
,
switch_sockaddr_get_port
(
rtp_session
->
from_addr
),
&
err
);
switch_rtp_set_remote_address
(
rtp_session
,
tx_host
,
switch_sockaddr_get_port
(
rtp_session
->
from_addr
),
SWITCH_FALSE
,
&
err
);
switch_clear_flag_locked
(
rtp_session
,
SWITCH_RTP_FLAG_AUTOADJ
);
}
}
...
...
@@ -1544,8 +1552,12 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
break
;
do_continue
:
switch_yield
(
1000
);
if
(
sleep_mss
)
{
switch_yield
(
sleep_mss
);
}
else
{
switch_yield
(
1000
);
}
}
if
(
switch_rtp_ready
(
rtp_session
))
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论