mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 16:49:20 +00:00
repair liblinphone_tester (android) and enable call with file player and rtp io test to run ms_audio_diff on embedded platforms, since it is much faster
than originally.
This commit is contained in:
parent
fd7f6a4c73
commit
48e8734b6f
3 changed files with 9 additions and 12 deletions
|
|
@ -136,12 +136,18 @@ static void linphone_android_ortp_log_handler(OrtpLogLevel lev, const char *fmt,
|
|||
int dumbMethodForAllowingUsageOfCpuFeaturesFromStaticLibMediastream() {
|
||||
return (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0);
|
||||
}
|
||||
|
||||
int dumbMethodForAllowingUsageOfMsAudioDiffFromStaticLibMediastream() {
|
||||
return ms_audio_diff(NULL, NULL, NULL, 0, NULL, NULL);
|
||||
}
|
||||
#endif /*ANDROID*/
|
||||
|
||||
|
||||
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *ajvm, void *reserved)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
ms_set_jvm(ajvm);
|
||||
|
||||
#endif /*ANDROID*/
|
||||
jvm=ajvm;
|
||||
return JNI_VERSION_1_2;
|
||||
|
|
|
|||
|
|
@ -2345,13 +2345,9 @@ 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) */
|
||||
#if !defined(__arm__) && !defined(__arm64__) && !TARGET_IPHONE_SIMULATOR && !defined(ANDROID)
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellopath,recordpath,&similar,audio_cmp_max_shift,NULL,NULL), 0, int, "%d");
|
||||
if (similar>=threshold)
|
||||
break;
|
||||
#else
|
||||
remove(recordpath);
|
||||
#endif
|
||||
}
|
||||
BC_ASSERT_GREATER(similar, threshold, double, "%g");
|
||||
BC_ASSERT_LOWER(similar, 1.0, double, "%g");
|
||||
|
|
@ -4367,13 +4363,8 @@ static void call_with_rtp_io_mode(void) {
|
|||
wait_for_until(pauline->lc,marie->lc,NULL,0,1000);
|
||||
end_call(pauline,marie);
|
||||
|
||||
if (ms_tags_list_contains_tag(ms_factory_get_platform_tags(ms_factory_get_fallback()), "embedded")) {
|
||||
ms_warning("Cannot run audio diff on embedded platform");
|
||||
remove(recordpath);
|
||||
} else {
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellopath, recordpath, &similar, audio_cmp_max_shift, NULL, NULL), 0, int, "%d");
|
||||
if (similar>=threshold) break;
|
||||
}
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellopath, recordpath, &similar, audio_cmp_max_shift, NULL, NULL), 0, int, "%d");
|
||||
if (similar>=threshold) break;
|
||||
}
|
||||
BC_ASSERT_GREATER(similar, threshold, double, "%g");
|
||||
BC_ASSERT_LOWER(similar, 1.0, double, "%g");
|
||||
|
|
|
|||
|
|
@ -320,7 +320,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=20;
|
||||
static const int audio_cmp_max_shift=10;
|
||||
|
||||
/*
|
||||
* this function return max value in the last 3 seconds*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue