Commit 57fc3171 authored by Simon Morlat's avatar Simon Morlat

Rework and clarify the "Call with ICE and video added" test family.

add_video() no longer exists and is replaced by request_video(), since this function doesn't guarantee video to be established depending on receiver's policy.
Also, it no longer modifies the video policy, for clarity. Instead, it uses linphone_core_accept_call_update() to accept video despite of video policy.
parent 14a04d41
......@@ -650,7 +650,12 @@ static void call_updated_by_remote(LinphoneCore *lc, LinphoneCall *call){
linphone_core_notify_display_status(lc,_("Call is updated by remote."));
linphone_call_set_state(call, LinphoneCallUpdatedByRemote,"Call updated by remote");
if (call->defer_update == FALSE){
linphone_core_accept_call_update(lc,call,NULL);
if (call->state == LinphoneCallUpdatedByRemote){
linphone_core_accept_call_update(lc,call,NULL);
}else{
/*otherwise it means that the app responded by linphone_core_accept_call_update
* within the callback, so job is already done.*/
}
}else{
if (call->state == LinphoneCallUpdatedByRemote){
ms_message("LinphoneCall [%p]: UpdatedByRemoted was signaled but defered. LinphoneCore expects the application to call "
......
......@@ -1834,7 +1834,7 @@ static void _call_with_media_relay(bool_t random_ports) {
liblinphone_tester_check_rtcp(pauline,marie);
#ifdef VIDEO_ENABLED
BC_ASSERT_TRUE(add_video(pauline,marie, TRUE));
BC_ASSERT_TRUE(request_video(pauline,marie, TRUE));
liblinphone_tester_check_rtcp(pauline,marie);
#endif
end_call(pauline, marie);
......@@ -2285,7 +2285,7 @@ void call_base_with_configfile(LinphoneMediaEncryption mode, bool_t enable_video
#ifdef VIDEO_ENABLED
if (enable_video) {
if (linphone_core_video_supported(marie->lc)) {
BC_ASSERT_TRUE(add_video(pauline,marie, TRUE));
BC_ASSERT_TRUE(request_video(pauline,marie, TRUE));
if (policy == LinphonePolicyUseIce){
BC_ASSERT_TRUE(check_ice(pauline, marie, enable_tunnel ? LinphoneIceStateReflexiveConnection
: LinphoneIceStateHostConnection));
......@@ -3722,7 +3722,7 @@ static void call_with_fqdn_in_sdp(void) {
liblinphone_tester_check_rtcp(pauline,marie);
#ifdef VIDEO_ENABLED
BC_ASSERT_TRUE(add_video(pauline,marie, TRUE));
BC_ASSERT_TRUE(request_video(pauline,marie, TRUE));
liblinphone_tester_check_rtcp(pauline,marie);
#endif
end_call(pauline, marie);
......
This diff is collapsed.
......@@ -340,7 +340,7 @@ bool_t call_with_params2(LinphoneCoreManager* caller_mgr
, bool_t build_callee_params);
bool_t call(LinphoneCoreManager* caller_mgr,LinphoneCoreManager* callee_mgr);
bool_t add_video(LinphoneCoreManager* caller,LinphoneCoreManager* callee, bool_t change_video_policy);
bool_t request_video(LinphoneCoreManager* caller,LinphoneCoreManager* callee, bool_t use_accept_call_update);
void end_call(LinphoneCoreManager *m1, LinphoneCoreManager *m2);
void disable_all_audio_codecs_except_one(LinphoneCore *lc, const char *mime, int rate);
void disable_all_video_codecs_except_one(LinphoneCore *lc, const char *mime);
......
......@@ -140,7 +140,7 @@ static void call_with_tunnel_base(LinphoneTunnelMode tunnel_mode, bool_t with_si
}
#ifdef VIDEO_ENABLED
if (with_video_and_ice){
BC_ASSERT_TRUE(add_video(pauline, marie, TRUE));
BC_ASSERT_TRUE(request_video(pauline, marie, TRUE));
}
#endif
end_call(pauline,marie);
......
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