Commit a6c1bfd7 authored by jehan's avatar jehan
Browse files

fix call_tester & update ms2

parent f7a80b6d
mediastreamer2 @ 37fa6e40
Subproject commit 7c83b89dd2f58d8505b69710d3c69fed4848bbd7 Subproject commit 37fa6e401a2c960bc61f4f14b5f19f9472f7f4d1
...@@ -125,7 +125,8 @@ void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreMana ...@@ -125,7 +125,8 @@ void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreMana
CU_ASSERT_PTR_NOT_NULL(c2); CU_ASSERT_PTR_NOT_NULL(c2);
if (!c1 || !c2) return; if (!c1 || !c2) return;
linphone_call_ref(c1);
linphone_call_ref(c2);
for (i=0; i<24 /*=12s need at least one exchange of SR to maybe 10s*/; i++) { for (i=0; i<24 /*=12s need at least one exchange of SR to maybe 10s*/; i++) {
if (linphone_call_get_audio_stats(c1)->round_trip_delay >0.0 if (linphone_call_get_audio_stats(c1)->round_trip_delay >0.0
&& linphone_call_get_audio_stats(c2)->round_trip_delay >0.0 && linphone_call_get_audio_stats(c2)->round_trip_delay >0.0
...@@ -145,7 +146,8 @@ void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreMana ...@@ -145,7 +146,8 @@ void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreMana
if (linphone_call_log_video_enabled(linphone_call_get_call_log(c2))) { if (linphone_call_log_video_enabled(linphone_call_get_call_log(c2))) {
CU_ASSERT_TRUE(linphone_call_get_video_stats(c2)->round_trip_delay>0.0); CU_ASSERT_TRUE(linphone_call_get_video_stats(c2)->round_trip_delay>0.0);
} }
linphone_call_unref(c1);
linphone_call_unref(c2);
} }
bool_t call_with_params(LinphoneCoreManager* caller_mgr bool_t call_with_params(LinphoneCoreManager* caller_mgr
...@@ -723,6 +725,10 @@ static bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee ...@@ -723,6 +725,10 @@ static bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee
CU_ASSERT_PTR_NOT_NULL(c1); CU_ASSERT_PTR_NOT_NULL(c1);
CU_ASSERT_PTR_NOT_NULL(c2); CU_ASSERT_PTR_NOT_NULL(c2);
if (!c1 || !c2) return FALSE;
linphone_call_ref(c1);
linphone_call_ref(c2);
CU_ASSERT_EQUAL(linphone_call_params_video_enabled(linphone_call_get_current_params(c1)),linphone_call_params_video_enabled(linphone_call_get_current_params(c2))); CU_ASSERT_EQUAL(linphone_call_params_video_enabled(linphone_call_get_current_params(c1)),linphone_call_params_video_enabled(linphone_call_get_current_params(c2)));
video_enabled=linphone_call_params_video_enabled(linphone_call_get_current_params(c1)); video_enabled=linphone_call_params_video_enabled(linphone_call_get_current_params(c1));
for (i=0;i<200;i++){ for (i=0;i<200;i++){
...@@ -762,7 +768,8 @@ static bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee ...@@ -762,7 +768,8 @@ static bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee
const LinphoneCallParams* call_param = linphone_call_get_current_params(c2); const LinphoneCallParams* call_param = linphone_call_get_current_params(c2);
CU_ASSERT_EQUAL(linphone_call_params_get_media_encryption(call_param),linphone_core_get_media_encryption(callee->lc)); CU_ASSERT_EQUAL(linphone_call_params_get_media_encryption(call_param),linphone_core_get_media_encryption(callee->lc));
} }
linphone_call_unref(c1);
linphone_call_unref(c2);
return video_enabled ? audio_success && video_success : audio_success; return video_enabled ? audio_success && video_success : audio_success;
} }
...@@ -999,8 +1006,8 @@ static bool_t add_video(LinphoneCoreManager* caller,LinphoneCoreManager* callee) ...@@ -999,8 +1006,8 @@ static bool_t add_video(LinphoneCoreManager* caller,LinphoneCoreManager* callee)
stats initial_caller_stat=caller->stat; stats initial_caller_stat=caller->stat;
stats initial_callee_stat=callee->stat; stats initial_callee_stat=callee->stat;
if (linphone_call_get_state(linphone_core_get_current_call(callee->lc)) != LinphoneCallStreamsRunning if (!linphone_core_get_current_call(callee->lc) || linphone_call_get_state(linphone_core_get_current_call(callee->lc)) != LinphoneCallStreamsRunning
|| linphone_call_get_state(linphone_core_get_current_call(caller->lc)) != LinphoneCallStreamsRunning ) { || !linphone_core_get_current_call(caller->lc) || linphone_call_get_state(linphone_core_get_current_call(caller->lc)) != LinphoneCallStreamsRunning ) {
ms_warning("bad state for adding video"); ms_warning("bad state for adding video");
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment