Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
3fd41616
提交
3fd41616
authored
12月 15, 2015
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-8663 #resolve [add vid-personal command]
上级
5353c0c1
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
46 行增加
和
16 行删除
+46
-16
conference_api.c
src/mod/applications/mod_conference/conference_api.c
+25
-1
conference_member.c
src/mod/applications/mod_conference/conference_member.c
+0
-9
conference_video.c
src/mod/applications/mod_conference/conference_video.c
+20
-6
mod_conference.h
src/mod/applications/mod_conference/mod_conference.h
+1
-0
没有找到文件。
src/mod/applications/mod_conference/conference_api.c
浏览文件 @
3fd41616
...
...
@@ -103,7 +103,8 @@ api_command_t conference_api_sub_commands[] = {
{
"vid-write-png"
,
(
void_fn_t
)
&
conference_api_sub_write_png
,
CONF_API_SUB_ARGS_SPLIT
,
"vid-write-png"
,
"<path>"
},
{
"vid-fps"
,
(
void_fn_t
)
&
conference_api_sub_vid_fps
,
CONF_API_SUB_ARGS_SPLIT
,
"vid-fps"
,
"<fps>"
},
{
"vid-bgimg"
,
(
void_fn_t
)
&
conference_api_sub_canvas_bgimg
,
CONF_API_SUB_ARGS_SPLIT
,
"vid-bgimg"
,
"<file> | clear [<canvas-id>]"
},
{
"vid-bandwidth"
,
(
void_fn_t
)
&
conference_api_sub_vid_bandwidth
,
CONF_API_SUB_ARGS_SPLIT
,
"vid-bandwidth"
,
"<BW>"
}
{
"vid-bandwidth"
,
(
void_fn_t
)
&
conference_api_sub_vid_bandwidth
,
CONF_API_SUB_ARGS_SPLIT
,
"vid-bandwidth"
,
"<BW>"
},
{
"vid-personal"
,
(
void_fn_t
)
&
conference_api_sub_vid_personal
,
CONF_API_SUB_ARGS_SPLIT
,
"vid-personal"
,
"[on|off]"
}
};
switch_status_t
conference_api_sub_pause_play
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
)
...
...
@@ -1000,6 +1001,29 @@ switch_status_t conference_api_sub_volume_out(conference_member_t *member, switc
return
SWITCH_STATUS_SUCCESS
;
}
switch_status_t
conference_api_sub_vid_personal
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
)
{
int
on
=
0
;
if
(
!
conference
->
canvases
[
0
])
{
stream
->
write_function
(
stream
,
"-ERR conference is not in mixing mode
\n
"
);
return
SWITCH_STATUS_SUCCESS
;
}
if
(
argv
[
2
])
{
on
=
switch_true
(
argv
[
2
]);
if
(
on
)
{
conference_utils_set_flag
(
conference
,
CFLAG_PERSONAL_CANVAS
);
}
else
{
conference_utils_clear_flag
(
conference
,
CFLAG_PERSONAL_CANVAS
);
}
}
stream
->
write_function
(
stream
,
"+OK personal is %s
\n
"
,
on
?
"on"
:
"off"
);
return
SWITCH_STATUS_SUCCESS
;
}
switch_status_t
conference_api_sub_vid_bandwidth
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
)
{
uint32_t
i
;
...
...
src/mod/applications/mod_conference/conference_member.c
浏览文件 @
3fd41616
...
...
@@ -708,15 +708,6 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
switch_queue_create
(
&
member
->
dtmf_queue
,
100
,
member
->
pool
);
if
(
conference_utils_test_flag
(
conference
,
CFLAG_PERSONAL_CANVAS
))
{
video_layout_t
*
vlayout
=
NULL
;
if
((
vlayout
=
conference_video_get_layout
(
conference
,
conference
->
video_layout_name
,
conference
->
video_layout_group
)))
{
conference_video_init_canvas
(
conference
,
vlayout
,
&
member
->
canvas
);
conference_video_init_canvas_layers
(
conference
,
member
->
canvas
,
vlayout
);
}
}
conference
->
members
=
member
;
conference_utils_member_set_flag_locked
(
member
,
MFLAG_INTREE
);
switch_mutex_unlock
(
conference
->
member_mutex
);
...
...
src/mod/applications/mod_conference/conference_video.c
浏览文件 @
3fd41616
...
...
@@ -2055,6 +2055,7 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
int
last_file_count
=
0
;
int
layout_applied
=
0
;
int
files_playing
=
0
;
int
last_personal
=
conference_utils_test_flag
(
conference
,
CFLAG_PERSONAL_CANVAS
)
?
1
:
0
;
canvas
->
video_timer_reset
=
1
;
...
...
@@ -2068,9 +2069,9 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
int
file_count
=
0
,
check_async_file
=
0
,
check_file
=
0
;
switch_image_t
*
async_file_img
=
NULL
,
*
normal_file_img
=
NULL
,
*
file_imgs
[
2
]
=
{
0
};
switch_frame_t
file_frame
=
{
0
};
int
j
=
0
;
if
(
!
conference_utils_test_flag
(
conference
,
CFLAG_PERSONAL_CANVAS
)
)
{
int
j
=
0
,
personal
=
conference_utils_test_flag
(
conference
,
CFLAG_PERSONAL_CANVAS
)
?
1
:
0
;
if
(
!
personal
)
{
switch_mutex_lock
(
canvas
->
mutex
);
if
(
canvas
->
new_vlayout
)
{
conference_video_init_canvas_layers
(
conference
,
canvas
,
NULL
);
...
...
@@ -2094,6 +2095,12 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
now
=
switch_micro_time_now
();
if
(
last_personal
!=
personal
)
{
do_refresh
=
100
;
count_changed
=
1
;
last_personal
=
personal
;
}
if
(
members_with_video
!=
conference
->
members_with_video
)
{
do_refresh
=
100
;
count_changed
=
1
;
...
...
@@ -2103,7 +2110,7 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
count_changed
=
1
;
}
if
(
count_changed
&&
!
conference_utils_test_flag
(
conference
,
CFLAG_PERSONAL_CANVAS
)
)
{
if
(
count_changed
&&
!
personal
)
{
layout_group_t
*
lg
=
NULL
;
video_layout_t
*
vlayout
=
NULL
;
int
canvas_count
=
0
;
...
...
@@ -2189,7 +2196,7 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
int
i
;
if
(
!
imember
->
session
||
(
!
switch_channel_test_flag
(
imember
->
channel
,
CF_VIDEO_READY
)
&&
!
imember
->
avatar_png_img
)
||
conference_utils_test_flag
(
conference
,
CFLAG_PERSONAL_CANVAS
)
||
switch_core_session_read_lock
(
imember
->
session
)
!=
SWITCH_STATUS_SUCCESS
)
{
personal
||
switch_core_session_read_lock
(
imember
->
session
)
!=
SWITCH_STATUS_SUCCESS
)
{
continue
;
}
...
...
@@ -2397,7 +2404,7 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
switch_mutex_unlock
(
conference
->
member_mutex
);
if
(
conference_utils_test_flag
(
conference
,
CFLAG_PERSONAL_CANVAS
)
)
{
if
(
personal
)
{
layout_group_t
*
lg
=
NULL
;
video_layout_t
*
vlayout
=
NULL
;
conference_member_t
*
omember
;
...
...
@@ -2425,6 +2432,13 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
conference_video_init_canvas_layers
(
conference
,
imember
->
canvas
,
conference
->
new_personal_vlayout
);
layout_applied
++
;
}
if
(
!
imember
->
canvas
)
{
if
((
vlayout
=
conference_video_get_layout
(
conference
,
conference
->
video_layout_name
,
conference
->
video_layout_group
)))
{
conference_video_init_canvas
(
conference
,
vlayout
,
&
imember
->
canvas
);
conference_video_init_canvas_layers
(
conference
,
imember
->
canvas
,
vlayout
);
}
}
if
(
switch_channel_test_flag
(
imember
->
channel
,
CF_VIDEO_REFRESH_REQ
))
{
switch_channel_clear_flag
(
imember
->
channel
,
CF_VIDEO_REFRESH_REQ
);
...
...
src/mod/applications/mod_conference/mod_conference.h
浏览文件 @
3fd41616
...
...
@@ -1089,6 +1089,7 @@ switch_status_t conference_api_sub_transfer(conference_obj_t *conference, switch
switch_status_t
conference_api_sub_record
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_norecord
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_vid_bandwidth
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_vid_personal
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_dispatch
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
,
const
char
*
cmdline
,
int
argn
);
switch_status_t
conference_api_sub_syntax
(
char
**
syntax
);
switch_status_t
conference_api_main_real
(
const
char
*
cmd
,
switch_core_session_t
*
session
,
switch_stream_handle_t
*
stream
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论