Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
fc139b70
提交
fc139b70
authored
7月 16, 2019
作者:
Seven Du
提交者:
Andrey Volk
7月 25, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-11934 add some conference test cases
上级
6249fa89
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
283 行增加
和
0 行删除
+283
-0
.gitignore
src/mod/applications/mod_conference/.gitignore
+5
-0
Makefile.am
src/mod/applications/mod_conference/Makefile.am
+19
-0
AEH.ttf
src/mod/applications/mod_conference/test/conf/font/AEH.ttf
+0
-0
freeswitch.xml
src/mod/applications/mod_conference/test/conf/freeswitch.xml
+52
-0
signalwire.png
...od/applications/mod_conference/test/images/signalwire.png
+0
-0
test_image.c
src/mod/applications/mod_conference/test/test_image.c
+113
-0
test_member.c
src/mod/applications/mod_conference/test/test_member.c
+94
-0
没有找到文件。
src/mod/applications/mod_conference/.gitignore
0 → 100644
浏览文件 @
fc139b70
conf/freeswitch.xml.fsxml
test/images/logo-*.png
test/images/signalwire-scaled-*.png
test/test_image
test/test_member
src/mod/applications/mod_conference/Makefile.am
浏览文件 @
fc139b70
...
@@ -15,3 +15,22 @@ mod_conference_la_LDFLAGS += -lopenal -lm
...
@@ -15,3 +15,22 @@ mod_conference_la_LDFLAGS += -lopenal -lm
mod_conference_la_CFLAGS
+=
-DOPENAL_POSITIONING
mod_conference_la_CFLAGS
+=
-DOPENAL_POSITIONING
endif
endif
noinst_LTLIBRARIES
=
libmodconference.la
libmodconference_la_SOURCES
=
$(mod_conference_la_SOURCES)
libmodconference_la_CFLAGS
=
$(AM_CFLAGS)
-I
.
noinst_PROGRAMS
=
test
/test_image
test
/test_member
test_test_image_SOURCES
=
test
/test_image.c
test_test_image_CFLAGS
=
$(AM_CFLAGS)
-I
.
test_test_image_LDFLAGS
=
$(AM_LDFLAGS)
-avoid-version
-no-undefined
$(freeswitch_LDFLAGS)
$(switch_builddir)
/libfreeswitch.la
$(CORE_LIBS)
$(APR_LIBS)
test_test_image_LDADD
=
libmodconference.la
test_test_member_SOURCES
=
test
/test_member.c
test_test_member_CFLAGS
=
$(AM_CFLAGS)
-I
.
test_test_member_LDFLAGS
=
$(AM_LDFLAGS)
-avoid-version
-no-undefined
$(freeswitch_LDFLAGS)
$(switch_builddir)
/libfreeswitch.la
$(CORE_LIBS)
$(APR_LIBS)
test_test_member_LDADD
=
libmodconference.la
TESTS
=
$(noinst_PROGRAMS)
src/mod/applications/mod_conference/test/conf/font/AEH.ttf
0 → 100644
浏览文件 @
fc139b70
File added
src/mod/applications/mod_conference/test/conf/freeswitch.xml
0 → 100644
浏览文件 @
fc139b70
<?xml version="1.0"?>
<document
type=
"freeswitch/xml"
>
<section
name=
"configuration"
description=
"Various Configuration"
>
<configuration
name=
"modules.conf"
description=
"Modules"
>
<modules>
<load
module=
"mod_sndfile"
/>
<load
module=
"mod_loopback"
/>
<load
module=
"mod_dptools"
/>
<load
module=
"mod_ssml"
/>
<load
module=
"mod_tone_stream"
/>
<load
module=
"mod_conference"
/>
<load
module=
"mod_commands"
/>
<load
module=
"mod_console"
/>
</modules>
</configuration>
<configuration
name=
"console.conf"
description=
"Console Logger"
>
<mappings>
<map
name=
"all"
value=
"console,debug,info,notice,warning,err,crit,alert"
/>
</mappings>
<settings>
<param
name=
"colorize"
value=
"true"
/>
<param
name=
"loglevel"
value=
"debug"
/>
</settings>
</configuration>
<configuration
name=
"conference.conf"
description=
"Audio Conference"
>
<profiles>
<profile
name=
"default"
>
</profile>
</profiles>
</configuration>
</section>
<section
name=
"dialplan"
description=
"Regex/XML Dialplan"
>
<context
name=
"default"
>
<extension
name=
"sample"
>
<condition
field=
"destination_number"
expression=
"^3500$"
>
<action
application=
"answer"
/>
<action
application=
"echo"
/>
</condition>
</extension>
<extension
name=
"sample"
>
<condition>
<action
application=
"info"
/>
</condition>
</extension>
</context>
</section>
</document>
src/mod/applications/mod_conference/test/images/signalwire.png
0 → 100644
浏览文件 @
fc139b70
57.3 KB
src/mod/applications/mod_conference/test/test_image.c
0 → 100644
浏览文件 @
fc139b70
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2018, Anthony Minessale II <anthm@freeswitch.org>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
*
* The Initial Developer of the Original Code is
* Anthony Minessale II <anthm@freeswitch.org>
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Chris Rienzo <chris@signalwire.com>
* Seven Du <seven@signalwire.com>
*
*
* test_image.c -- test images
*
*/
#include <switch.h>
#include <stdlib.h>
#include <test/switch_test.h>
FST_CORE_BEGIN
(
"./conf"
)
{
FST_SUITE_BEGIN
(
switch_ivr_originate
)
{
FST_SETUP_BEGIN
()
{
}
FST_SETUP_END
()
FST_TEARDOWN_BEGIN
()
{
}
FST_TEARDOWN_END
()
FST_TEST_BEGIN
(
scale_test
)
{
switch_image_t
*
img
=
switch_img_read_png
(
"images/signalwire.png"
,
SWITCH_IMG_FMT_I420
);
int
i
;
for
(
i
=
2
;
i
<=
10
;
i
+=
2
)
{
switch_image_t
*
scaled_img
=
NULL
;
char
name
[
1024
];
switch_snprintf
(
name
,
sizeof
(
name
),
"images/signalwire-scaled-I420-%d.png"
,
i
);
switch_img_scale
(
img
,
&
scaled_img
,
img
->
d_w
/
i
,
img
->
d_h
/
i
);
fst_requires
(
scaled_img
);
switch_img_write_png
(
scaled_img
,
name
);
switch_img_free
(
&
scaled_img
);
}
switch_img_free
(
&
img
);
img
=
switch_img_read_png
(
"images/signalwire.png"
,
SWITCH_IMG_FMT_ARGB
);
for
(
i
=
2
;
i
<=
10
;
i
+=
2
)
{
switch_image_t
*
scaled_img
=
NULL
;
char
name
[
1024
];
switch_snprintf
(
name
,
sizeof
(
name
),
"images/signalwire-scaled-ARGB-%d.png"
,
i
);
switch_img_scale
(
img
,
&
scaled_img
,
img
->
d_w
/
i
,
img
->
d_h
/
i
);
fst_requires
(
scaled_img
);
switch_img_write_png
(
scaled_img
,
name
);
switch_img_free
(
&
scaled_img
);
}
switch_img_free
(
&
img
);
}
FST_TEST_END
()
FST_TEST_BEGIN
(
scale_test
)
{
switch_image_t
*
img
=
switch_img_read_png
(
"images/signalwire-scaled-ARGB-8.png"
,
SWITCH_IMG_FMT_ARGB
);
char
*
font_face
=
"font/AEH.ttf"
;
char
*
fg
=
"#000000"
;
char
*
altfg
=
"#FFFFFF"
;
char
*
bg
=
NULL
;
int
font_size
=
6
;
switch_img_txt_handle_t
*
txthandle
=
NULL
;
const
char
*
txt
=
"FEESWITCH ROCKS"
;
const
char
*
alttxt
=
"freeswitch"
;
switch_img_txt_handle_create
(
&
txthandle
,
font_face
,
fg
,
bg
,
font_size
,
0
,
NULL
);
switch_img_txt_handle_render
(
txthandle
,
img
,
50
,
3
,
txt
,
NULL
,
fg
,
bg
,
font_size
,
0
);
switch_img_txt_handle_render
(
txthandle
,
img
,
60
,
15
,
alttxt
,
NULL
,
altfg
,
"#000000"
,
font_size
,
0
);
switch_img_write_png
(
img
,
"images/signalwire-scaled-ARGB-8-txt.png"
);
switch_img_free
(
&
img
);
}
FST_TEST_END
()
}
FST_SUITE_END
()
}
FST_CORE_END
()
src/mod/applications/mod_conference/test/test_member.c
0 → 100644
浏览文件 @
fc139b70
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2019, Anthony Minessale II <anthm@freeswitch.org>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
*
* The Initial Developer of the Original Code is
* Anthony Minessale II <anthm@freeswitch.org>
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Chris Rienzo <chris@signalwire.com>
* Seven Du <seven@signalwire.com>
*
*
* test_member.c -- tests member functions
*
*/
#include <switch.h>
#include <stdlib.h>
#include <mod_conference.h>
#include <conference_member.c>
#include <test/switch_test.h>
FST_CORE_BEGIN
(
"./conf"
)
{
FST_SUITE_BEGIN
(
switch_ivr_originate
)
{
FST_SETUP_BEGIN
()
{
}
FST_SETUP_END
()
FST_TEARDOWN_BEGIN
()
{
}
FST_TEARDOWN_END
()
FST_TEST_BEGIN
(
member_test
)
{
const
char
*
logo
=
"{position=left-bot,text_x=center,"
"center_offset=190,text=#000000:transparent:font/AEH.ttf:50:"
"'FREESWITCH ROCKS',alt_text_x=center,alt_center_offset=190,"
"alt_text_y=88,alt_text=#ffffff:transparent:font/AEH.ttf:40:"
"'freeswitch'}images/signalwire.png"
;
conference_member_t
smember
=
{
0
};
conference_member_t
*
member
=
&
smember
;
switch_image_t
*
img
;
int
i
;
switch_mutex_init
(
&
member
->
write_mutex
,
SWITCH_MUTEX_NESTED
,
fst_pool
);
switch_mutex_init
(
&
member
->
flag_mutex
,
SWITCH_MUTEX_NESTED
,
fst_pool
);
switch_mutex_init
(
&
member
->
fnode_mutex
,
SWITCH_MUTEX_NESTED
,
fst_pool
);
switch_mutex_init
(
&
member
->
audio_in_mutex
,
SWITCH_MUTEX_NESTED
,
fst_pool
);
switch_mutex_init
(
&
member
->
audio_out_mutex
,
SWITCH_MUTEX_NESTED
,
fst_pool
);
switch_mutex_init
(
&
member
->
read_mutex
,
SWITCH_MUTEX_NESTED
,
fst_pool
);
switch_thread_rwlock_create
(
&
member
->
rwlock
,
fst_pool
);
conference_member_set_logo
(
member
,
logo
);
img
=
member
->
video_logo
;
for
(
i
=
2
;
i
<=
10
;
i
+=
2
)
{
switch_image_t
*
scaled_img
=
NULL
;
char
name
[
1024
];
switch_snprintf
(
name
,
sizeof
(
name
),
"images/logo-signalwire-scaled-%d.png"
,
i
);
switch_img_scale
(
img
,
&
scaled_img
,
img
->
d_w
/
i
,
img
->
d_h
/
i
);
fst_requires
(
scaled_img
);
switch_img_write_png
(
scaled_img
,
name
);
switch_img_free
(
&
scaled_img
);
}
switch_img_free
(
&
img
);
}
FST_TEST_END
()
}
FST_SUITE_END
()
}
FST_CORE_END
()
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论