Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
48c13634
提交
48c13634
authored
8月 22, 2014
作者:
Seven Du
提交者:
Michael Jerris
5月 28, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7513: force floor on member join
上级
d33e5659
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
21 行增加
和
2 行删除
+21
-2
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+21
-2
没有找到文件。
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
48c13634
...
@@ -197,7 +197,8 @@ typedef enum {
...
@@ -197,7 +197,8 @@ typedef enum {
MFLAG_GHOST
=
(
1
<<
24
),
MFLAG_GHOST
=
(
1
<<
24
),
MFLAG_JOIN_ONLY
=
(
1
<<
25
),
MFLAG_JOIN_ONLY
=
(
1
<<
25
),
MFLAG_POSITIONAL
=
(
1
<<
26
),
MFLAG_POSITIONAL
=
(
1
<<
26
),
MFLAG_NO_POSITIONAL
=
(
1
<<
27
)
MFLAG_NO_POSITIONAL
=
(
1
<<
27
),
MFLAG_JOIN_VID_FLOOR
=
(
1
<<
28
)
}
member_flag_t
;
}
member_flag_t
;
typedef
enum
{
typedef
enum
{
...
@@ -563,6 +564,7 @@ static void conference_list(conference_obj_t *conference, switch_stream_handle_t
...
@@ -563,6 +564,7 @@ static void conference_list(conference_obj_t *conference, switch_stream_handle_t
static
conference_obj_t
*
conference_find
(
char
*
name
,
char
*
domain
);
static
conference_obj_t
*
conference_find
(
char
*
name
,
char
*
domain
);
static
void
member_bind_controls
(
conference_member_t
*
member
,
const
char
*
controls
);
static
void
member_bind_controls
(
conference_member_t
*
member
,
const
char
*
controls
);
static
void
conference_send_presence
(
conference_obj_t
*
conference
);
static
void
conference_send_presence
(
conference_obj_t
*
conference
);
static
void
conference_set_video_floor_holder
(
conference_obj_t
*
conference
,
conference_member_t
*
member
,
switch_bool_t
force
);
SWITCH_STANDARD_API
(
conf_api_main
);
SWITCH_STANDARD_API
(
conf_api_main
);
...
@@ -2262,6 +2264,8 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
...
@@ -2262,6 +2264,8 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
switch_mutex_lock
(
conference
->
mutex
);
switch_mutex_lock
(
conference
->
mutex
);
if
(
conference
->
video_floor_holder
)
{
if
(
conference
->
video_floor_holder
)
{
switch_core_session_refresh_video
(
conference
->
video_floor_holder
->
session
);
switch_core_session_refresh_video
(
conference
->
video_floor_holder
->
session
);
// there's already someone hold the floor, tell the core thread start to read video
switch_channel_clear_flag
(
member
->
channel
,
CF_VIDEO_PASSIVE
);
}
}
switch_mutex_unlock
(
conference
->
mutex
);
switch_mutex_unlock
(
conference
->
mutex
);
}
}
...
@@ -2387,6 +2391,7 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
...
@@ -2387,6 +2391,7 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
}
}
}
}
unlock_member
(
member
);
unlock_member
(
member
);
switch_mutex_unlock
(
member
->
audio_out_mutex
);
switch_mutex_unlock
(
member
->
audio_out_mutex
);
switch_mutex_unlock
(
member
->
audio_in_mutex
);
switch_mutex_unlock
(
member
->
audio_in_mutex
);
...
@@ -2429,8 +2434,15 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
...
@@ -2429,8 +2434,15 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
switch_mutex_unlock
(
conference
->
mutex
);
switch_mutex_unlock
(
conference
->
mutex
);
status
=
SWITCH_STATUS_SUCCESS
;
status
=
SWITCH_STATUS_SUCCESS
;
if
(
switch_test_flag
(
member
,
MFLAG_JOIN_VID_FLOOR
))
{
conference_set_video_floor_holder
(
conference
,
member
,
SWITCH_TRUE
);
switch_set_flag
(
member
->
conference
,
CFLAG_VID_FLOOR_LOCK
);
if
(
test_eflag
(
conference
,
EFLAG_FLOOR_CHANGE
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"conference %s OK video floor %d %s
\n
"
,
conference
->
name
,
member
->
id
,
switch_channel_get_name
(
member
->
channel
));
}
}
return
status
;
return
status
;
}
}
...
@@ -6153,6 +6165,11 @@ static void conference_list(conference_obj_t *conference, switch_stream_handle_t
...
@@ -6153,6 +6165,11 @@ static void conference_list(conference_obj_t *conference, switch_stream_handle_t
count
++
;
count
++
;
}
}
if
(
member
==
member
->
conference
->
video_floor_holder
)
{
stream
->
write_function
(
stream
,
"%s%s"
,
count
?
"|"
:
""
,
"vid-floor"
);
count
++
;
}
if
(
switch_test_flag
(
member
,
MFLAG_MOD
))
{
if
(
switch_test_flag
(
member
,
MFLAG_MOD
))
{
stream
->
write_function
(
stream
,
"%s%s"
,
count
?
"|"
:
""
,
"moderator"
);
stream
->
write_function
(
stream
,
"%s%s"
,
count
?
"|"
:
""
,
"moderator"
);
count
++
;
count
++
;
...
@@ -8843,6 +8860,8 @@ static void set_mflags(const char *flags, member_flag_t *f)
...
@@ -8843,6 +8860,8 @@ static void set_mflags(const char *flags, member_flag_t *f)
*
f
|=
MFLAG_POSITIONAL
;
*
f
|=
MFLAG_POSITIONAL
;
}
else
if
(
!
strcasecmp
(
argv
[
i
],
"no-positional"
))
{
}
else
if
(
!
strcasecmp
(
argv
[
i
],
"no-positional"
))
{
*
f
|=
MFLAG_NO_POSITIONAL
;
*
f
|=
MFLAG_NO_POSITIONAL
;
}
else
if
(
!
strcasecmp
(
argv
[
i
],
"join-vid-floor"
))
{
*
f
|=
MFLAG_JOIN_VID_FLOOR
;
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论