Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
1f887db6
Commit
1f887db6
authored
Sep 11, 2015
by
Simon Morlat
Browse files
adapt to new MSAudioDiff api
parent
14f40b46
Changes
4
Hide whitespace changes
Inline
Side-by-side
mediastreamer2
@
f8673538
Subproject commit
e9b2d8d4e1ce790f72b1c02c3d3242651f22672d
Subproject commit
f867353887f9091d6b16958c3a859be5523ba9f7
tester/call_tester.c
View file @
1f887db6
...
...
@@ -2415,7 +2415,7 @@ static void call_with_file_player(void) {
end_call
(
marie
,
pauline
);
/*cannot run on iphone simulator because locks main loop beyond permitted time (should run
on another thread) */
BC_ASSERT_EQUAL
(
ms_audio_diff
(
hellopath
,
recordpath
,
&
similar
,
audio_cmp_
max_shift
,
NULL
,
NULL
),
0
,
int
,
"%d"
);
BC_ASSERT_EQUAL
(
ms_audio_diff
(
hellopath
,
recordpath
,
&
similar
,
&
audio_cmp_
params
,
NULL
,
NULL
),
0
,
int
,
"%d"
);
if
(
similar
>=
threshold
)
break
;
}
...
...
@@ -2492,7 +2492,7 @@ static void call_with_mkv_file_player(void) {
}
end_call
(
marie
,
pauline
);
#ifdef DO_AUDIO_CMP
BC_ASSERT_EQUAL
(
ms_audio_diff
(
hellowav
,
recordpath
,
&
similar
,
audio_cmp_
max_shift
,
NULL
,
NULL
),
0
,
int
,
"%d"
);
BC_ASSERT_EQUAL
(
ms_audio_diff
(
hellowav
,
recordpath
,
&
similar
,
&
audio_cmp_
params
,
NULL
,
NULL
),
0
,
int
,
"%d"
);
BC_ASSERT_GREATER
(
similar
,
threshold
,
double
,
"%f"
);
BC_ASSERT_LOWER
(
similar
,
1
.
0
,
double
,
"%f"
);
if
(
similar
>
threshold
&&
similar
<=
1
.
0
)
{
...
...
@@ -4326,7 +4326,7 @@ static void simple_stereo_call(const char *codec_name, int clock_rate, int bitra
min_threshold
=
.
4
f
;
max_threshold
=
.
6
f
;
}
BC_ASSERT_EQUAL
(
ms_audio_diff
(
recordpath
,
stereo_file
,
&
similar
,
audio_cmp_
max_shift
,
completion_cb
,
NULL
),
0
,
int
,
"%d"
);
BC_ASSERT_EQUAL
(
ms_audio_diff
(
stereo_file
,
recordpath
,
&
similar
,
&
audio_cmp_
params
,
completion_cb
,
NULL
),
0
,
int
,
"%d"
);
BC_ASSERT_GREATER
(
similar
,
min_threshold
,
double
,
"%g"
);
BC_ASSERT_LOWER
(
similar
,
max_threshold
,
double
,
"%g"
);
if
(
similar
<
min_threshold
||
similar
>
max_threshold
){
...
...
@@ -4544,7 +4544,7 @@ static void call_with_rtp_io_mode(void) {
wait_for_until
(
pauline
->
lc
,
marie
->
lc
,
NULL
,
0
,
1000
);
end_call
(
pauline
,
marie
);
BC_ASSERT_EQUAL
(
ms_audio_diff
(
hellopath
,
recordpath
,
&
similar
,
audio_cmp_
max_shift
,
NULL
,
NULL
),
0
,
int
,
"%d"
);
BC_ASSERT_EQUAL
(
ms_audio_diff
(
hellopath
,
recordpath
,
&
similar
,
&
audio_cmp_
params
,
NULL
,
NULL
),
0
,
int
,
"%d"
);
if
(
similar
>=
threshold
)
break
;
}
BC_ASSERT_GREATER
(
similar
,
threshold
,
double
,
"%g"
);
...
...
@@ -4819,7 +4819,7 @@ static void custom_rtp_modifier(bool_t pauseResumeTest, bool_t recordTest) {
end_call
(
pauline
,
marie
);
// Now we compute a similarity factor between the original file and the one we recorded on the callee side
BC_ASSERT_EQUAL
(
ms_audio_diff
(
hellopath
,
recordpath
,
&
similar
,
audio_cmp_
max_shift
,
NULL
,
NULL
),
0
,
int
,
"%d"
);
BC_ASSERT_EQUAL
(
ms_audio_diff
(
hellopath
,
recordpath
,
&
similar
,
&
audio_cmp_
params
,
NULL
,
NULL
),
0
,
int
,
"%d"
);
BC_ASSERT_GREATER
(
similar
,
threshold
,
double
,
"%g"
);
BC_ASSERT_LOWER
(
similar
,
1
.
0
,
double
,
"%g"
);
...
...
tester/liblinphone_tester.h
View file @
1f887db6
...
...
@@ -24,6 +24,7 @@
#include "bc_tester_utils.h"
#include "linphonecore.h"
#include <mediastreamer2/msutils.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
...
...
@@ -320,7 +321,7 @@ bool_t pause_call_1(LinphoneCoreManager* mgr_1,LinphoneCall* call_1,LinphoneCore
bool_t
compare_files
(
const
char
*
path1
,
const
char
*
path2
);
void
check_media_direction
(
LinphoneCoreManager
*
mgr
,
LinphoneCall
*
call
,
MSList
*
lcs
,
LinphoneMediaDirection
audio_dir
,
LinphoneMediaDirection
video_dir
);
static
const
int
audio_cmp_max_shift
=
10
;
extern
const
MSAudioDiffParams
audio_cmp_params
;
/*
* this function return max value in the last 3 seconds*/
...
...
tester/tester.c
View file @
1f887db6
...
...
@@ -37,6 +37,8 @@ static int liblinphone_tester_keep_accounts_flag = 0;
static
int
liblinphone_tester_keep_record_files
=
FALSE
;
int
manager_count
=
0
;
const
MSAudioDiffParams
audio_cmp_params
=
{
10
,
2000
};
const
char
*
test_domain
=
"sipopen.example.org"
;
const
char
*
auth_domain
=
"sip.example.org"
;
const
char
*
test_username
=
"liblinphone_tester"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment