Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
850c154b
提交
850c154b
authored
10月 14, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix vid switching in webrtc
上级
230e005a
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
35 行增加
和
15 行删除
+35
-15
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+16
-3
switch_rtp.c
src/switch_rtp.c
+19
-12
没有找到文件。
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
850c154b
...
...
@@ -1599,7 +1599,7 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
static void conference_set_video_floor_holder(conference_obj_t *conference, conference_member_t *member, switch_bool_t force)
{
switch_event_t *event;
conference_member_t
*
old_member
=
NULL
;
conference_member_t *old_member = NULL
, *imember = NULL
;
int old_id = 0;
if (!member) {
...
...
@@ -1623,8 +1623,6 @@ static void conference_set_video_floor_holder(conference_obj_t *conference, conf
switch_mutex_lock(conference->mutex);
if (!member) {
conference_member_t
*
imember
;
for (imember = conference->members; imember; imember = imember->next) {
if (imember != conference->video_floor_holder && imember->channel && switch_channel_test_flag(imember->channel, CF_VIDEO)) {
member = imember;
...
...
@@ -1648,6 +1646,20 @@ static void conference_set_video_floor_holder(conference_obj_t *conference, conf
//switch_channel_clear_flag(old_member->channel, CF_VIDEO_PASSIVE);
}
for (imember = conference->members; imember; imember = imember->next) {
if (!imember->channel || !switch_channel_test_flag(imember->channel, CF_VIDEO)) {
continue;
}
switch_channel_clear_flag(imember->channel, CF_VIDEO_ECHO);
if (imember == conference->video_floor_holder) {
switch_channel_set_flag(imember->channel, CF_VIDEO_PASSIVE);
} else {
switch_channel_clear_flag(imember->channel, CF_VIDEO_PASSIVE);
}
switch_core_session_refresh_video(imember->session);
}
switch_set_flag(conference, CFLAG_FLOOR_CHANGE);
switch_mutex_unlock(conference->mutex);
...
...
@@ -7505,6 +7517,7 @@ SWITCH_STANDARD_APP(conference_function)
switch_channel_set_flag(channel, CF_CONFERENCE);
switch_channel_set_flag(channel, CF_VIDEO_PASSIVE);
if (switch_channel_answer(channel) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Channel answer failed.\n");
goto end;
...
...
src/switch_rtp.c
浏览文件 @
850c154b
...
...
@@ -54,7 +54,7 @@
#include <switch_version.h>
#include <switch_ssl.h>
#define FIR_COUNTDOWN
50
#define FIR_COUNTDOWN
25
#define READ_INC(rtp_session) switch_mutex_lock(rtp_session->read_mutex); rtp_session->reading++
#define READ_DEC(rtp_session) switch_mutex_unlock(rtp_session->read_mutex); rtp_session->reading--
...
...
@@ -1527,6 +1527,20 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
int
rtcp_ok
=
1
;
switch_time_t
now
=
switch_micro_time_now
();
if
(
rtp_session
->
fir_countdown
)
{
if
(
rtp_session
->
fir_countdown
==
FIR_COUNTDOWN
)
{
do_flush
(
rtp_session
,
SWITCH_TRUE
);
}
if
(
rtp_session
->
fir_countdown
==
FIR_COUNTDOWN
||
rtp_session
->
fir_countdown
==
1
)
{
send_fir
(
rtp_session
);
//send_pli(rtp_session);
}
rtp_session
->
fir_countdown
--
;
}
if
(
rtp_session
->
flags
[
SWITCH_RTP_FLAG_AUTO_CNG
]
&&
rtp_session
->
send_msg
.
header
.
ts
&&
rtp_session
->
timer
.
samplecount
>=
(
rtp_session
->
last_write_samplecount
+
(
rtp_session
->
samples_per_interval
*
60
)))
{
uint8_t
data
[
10
]
=
{
0
};
...
...
@@ -4621,8 +4635,10 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
pt
=
100000
;
}
poll_status
=
switch_poll
(
rtp_session
->
read_pollfd
,
1
,
&
fdr
,
pt
);
if
(
rtp_session
->
dtmf_data
.
out_digit_dur
>
0
)
{
return_cng_frame
();
}
...
...
@@ -5282,15 +5298,6 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp
return
SWITCH_STATUS_FALSE
;
}
if
(
rtp_session
->
fir_countdown
)
{
rtp_session
->
fir_countdown
--
;
if
(
rtp_session
->
fir_countdown
==
FIR_COUNTDOWN
/
2
||
rtp_session
->
fir_countdown
==
0
)
{
send_fir
(
rtp_session
);
//send_pli(rtp_session);
}
}
bytes
=
rtp_common_read
(
rtp_session
,
&
frame
->
payload
,
&
frame
->
flags
,
io_flags
);
frame
->
data
=
RTP_BODY
(
rtp_session
);
...
...
@@ -5524,7 +5531,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
rtp_session
->
ts_norm
.
delta_percent
=
(
double
)((
double
)
rtp_session
->
ts_norm
.
delta
/
(
double
)
rtp_session
->
ts_norm
.
delta_avg
)
*
100
.
0
f
;
if
(
rtp_session
->
ts_norm
.
delta_ct
>
50
&&
rtp_session
->
ts_norm
.
delta_percent
>
1
25
.
0
)
{
if
(
rtp_session
->
ts_norm
.
delta_ct
>
50
&&
rtp_session
->
ts_norm
.
delta_percent
>
1
50
.
0
)
{
//printf("%s diff %d %d (%.2f)\n", switch_core_session_get_name(rtp_session->session),
//rtp_session->ts_norm.delta, rtp_session->ts_norm.delta_avg, rtp_session->ts_norm.delta_percent);
switch_rtp_video_refresh
(
rtp_session
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论