mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-27 21:36:21 +00:00
tester: use H264 codec when using mire webcam because VP8 does not handle Mire properly, leading to failed tests on iOS
This commit is contained in:
parent
d8158669f3
commit
e374b6505f
2 changed files with 78 additions and 27 deletions
|
|
@ -3220,6 +3220,12 @@ void call_base_with_configfile(LinphoneMediaEncryption mode, bool_t enable_video
|
||||||
LinphoneCoreManager* pauline = linphone_core_manager_new(pauline_rc);
|
LinphoneCoreManager* pauline = linphone_core_manager_new(pauline_rc);
|
||||||
bool_t call_ok;
|
bool_t call_ok;
|
||||||
|
|
||||||
|
// important: VP8 has really poor performances with the mire camera, at least
|
||||||
|
// on iOS - so when ever h264 is available, let's use it instead
|
||||||
|
if (linphone_core_find_payload_type(pauline->lc,"h264", -1, -1)!=NULL) {
|
||||||
|
disable_all_video_codecs_except_one(pauline->lc,"h264");
|
||||||
|
disable_all_video_codecs_except_one(marie->lc,"h264");
|
||||||
|
}
|
||||||
linphone_core_set_video_device(pauline->lc,liblinphone_tester_mire_id);
|
linphone_core_set_video_device(pauline->lc,liblinphone_tester_mire_id);
|
||||||
linphone_core_set_video_device(marie->lc,liblinphone_tester_mire_id);
|
linphone_core_set_video_device(marie->lc,liblinphone_tester_mire_id);
|
||||||
|
|
||||||
|
|
@ -4104,6 +4110,13 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
|
||||||
pol.automatically_accept=1;
|
pol.automatically_accept=1;
|
||||||
pol.automatically_initiate=1;
|
pol.automatically_initiate=1;
|
||||||
|
|
||||||
|
// important: VP8 has really poor performances with the mire camera, at least
|
||||||
|
// on iOS - so when ever h264 is available, let's use it instead
|
||||||
|
if (linphone_core_find_payload_type(pauline->lc,"h264", -1, -1)!=NULL) {
|
||||||
|
disable_all_video_codecs_except_one(pauline->lc,"h264");
|
||||||
|
disable_all_video_codecs_except_one(marie->lc,"h264");
|
||||||
|
}
|
||||||
|
|
||||||
linphone_core_enable_video_capture(pauline->lc, TRUE);
|
linphone_core_enable_video_capture(pauline->lc, TRUE);
|
||||||
linphone_core_enable_video_display(pauline->lc, TRUE);
|
linphone_core_enable_video_display(pauline->lc, TRUE);
|
||||||
linphone_core_set_video_policy(pauline->lc,&pol);
|
linphone_core_set_video_policy(pauline->lc,&pol);
|
||||||
|
|
@ -4223,6 +4236,13 @@ static void record_call(const char *filename, bool_t enableVideo, const char *vi
|
||||||
marie = linphone_core_manager_new("marie_h264_rc");
|
marie = linphone_core_manager_new("marie_h264_rc");
|
||||||
pauline = linphone_core_manager_new("pauline_h264_rc");
|
pauline = linphone_core_manager_new("pauline_h264_rc");
|
||||||
|
|
||||||
|
// important: VP8 has really poor performances with the mire camera, at least
|
||||||
|
// on iOS - so when ever h264 is available, let's use it instead
|
||||||
|
if (linphone_core_find_payload_type(pauline->lc,"h264", -1, -1)!=NULL) {
|
||||||
|
disable_all_video_codecs_except_one(pauline->lc,"h264");
|
||||||
|
disable_all_video_codecs_except_one(marie->lc,"h264");
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(HAVE_OPENH264) && defined(ANDROID)
|
#if defined(HAVE_OPENH264) && defined(ANDROID)
|
||||||
libmsopenh264_init(linphone_core_get_ms_factory(marie->lc));
|
libmsopenh264_init(linphone_core_get_ms_factory(marie->lc));
|
||||||
linphone_core_reload_ms_plugins(marie->lc, NULL);
|
linphone_core_reload_ms_plugins(marie->lc, NULL);
|
||||||
|
|
@ -4877,7 +4897,15 @@ static void video_call_with_re_invite_inactive_followed_by_re_invite_base(Linpho
|
||||||
|
|
||||||
marie = linphone_core_manager_new( "marie_rc");
|
marie = linphone_core_manager_new( "marie_rc");
|
||||||
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||||
|
|
||||||
linphone_core_set_avpf_mode(pauline->lc,TRUE);
|
linphone_core_set_avpf_mode(pauline->lc,TRUE);
|
||||||
|
|
||||||
|
// important: VP8 has really poor performances with the mire camera, at least
|
||||||
|
// on iOS - so when ever h264 is available, let's use it instead
|
||||||
|
if (linphone_core_find_payload_type(pauline->lc,"h264", -1, -1)!=NULL) {
|
||||||
|
disable_all_video_codecs_except_one(pauline->lc,"h264");
|
||||||
|
disable_all_video_codecs_except_one(marie->lc,"h264");
|
||||||
|
}
|
||||||
linphone_core_set_video_device(pauline->lc,liblinphone_tester_mire_id);
|
linphone_core_set_video_device(pauline->lc,liblinphone_tester_mire_id);
|
||||||
linphone_core_set_video_device(marie->lc,liblinphone_tester_mire_id);
|
linphone_core_set_video_device(marie->lc,liblinphone_tester_mire_id);
|
||||||
linphone_core_set_avpf_mode(marie->lc,TRUE);
|
linphone_core_set_avpf_mode(marie->lc,TRUE);
|
||||||
|
|
@ -5030,6 +5058,14 @@ static void classic_video_entry_phone_setup(void) {
|
||||||
linphone_core_set_avpf_mode(callee_mgr->lc, LinphoneAVPFEnabled);
|
linphone_core_set_avpf_mode(callee_mgr->lc, LinphoneAVPFEnabled);
|
||||||
linphone_core_set_video_policy(caller_mgr->lc, &vpol);
|
linphone_core_set_video_policy(caller_mgr->lc, &vpol);
|
||||||
linphone_core_set_video_policy(callee_mgr->lc, &vpol);
|
linphone_core_set_video_policy(callee_mgr->lc, &vpol);
|
||||||
|
|
||||||
|
// important: VP8 has really poor performances with the mire camera, at least
|
||||||
|
// on iOS - so when ever h264 is available, let's use it instead
|
||||||
|
if (linphone_core_find_payload_type(caller_mgr->lc,"h264", -1, -1)!=NULL) {
|
||||||
|
disable_all_video_codecs_except_one(caller_mgr->lc,"h264");
|
||||||
|
disable_all_video_codecs_except_one(callee_mgr->lc,"h264");
|
||||||
|
}
|
||||||
|
|
||||||
linphone_core_set_video_device(caller_mgr->lc, liblinphone_tester_mire_id);
|
linphone_core_set_video_device(caller_mgr->lc, liblinphone_tester_mire_id);
|
||||||
linphone_core_set_video_device(callee_mgr->lc, liblinphone_tester_mire_id);
|
linphone_core_set_video_device(callee_mgr->lc, liblinphone_tester_mire_id);
|
||||||
|
|
||||||
|
|
@ -5195,6 +5231,14 @@ static void call_with_complex_late_offering(void){
|
||||||
linphone_core_enable_video_display(marie->lc, TRUE);
|
linphone_core_enable_video_display(marie->lc, TRUE);
|
||||||
linphone_core_set_video_policy(pauline->lc, &vpol);
|
linphone_core_set_video_policy(pauline->lc, &vpol);
|
||||||
linphone_core_set_video_policy(marie->lc, &vpol);
|
linphone_core_set_video_policy(marie->lc, &vpol);
|
||||||
|
|
||||||
|
// important: VP8 has really poor performances with the mire camera, at least
|
||||||
|
// on iOS - so when ever h264 is available, let's use it instead
|
||||||
|
if (linphone_core_find_payload_type(pauline->lc,"h264", -1, -1)!=NULL) {
|
||||||
|
disable_all_video_codecs_except_one(pauline->lc,"h264");
|
||||||
|
disable_all_video_codecs_except_one(marie->lc,"h264");
|
||||||
|
}
|
||||||
|
|
||||||
linphone_core_set_video_device(pauline->lc,liblinphone_tester_mire_id);
|
linphone_core_set_video_device(pauline->lc,liblinphone_tester_mire_id);
|
||||||
linphone_core_set_video_device(marie->lc,liblinphone_tester_mire_id);
|
linphone_core_set_video_device(marie->lc,liblinphone_tester_mire_id);
|
||||||
|
|
||||||
|
|
@ -5700,8 +5744,8 @@ static void custom_rtp_modifier(bool_t pauseResumeTest, bool_t recordTest) {
|
||||||
rtp_stats_t pauline_rtp_stats = linphone_call_stats_get_rtp_stats(pauline_stats);
|
rtp_stats_t pauline_rtp_stats = linphone_call_stats_get_rtp_stats(pauline_stats);
|
||||||
ms_message("Marie sent %i RTP packets and received %i (for real)", (int)marie_rtp_stats.packet_sent, (int)marie_rtp_stats.packet_recv);
|
ms_message("Marie sent %i RTP packets and received %i (for real)", (int)marie_rtp_stats.packet_sent, (int)marie_rtp_stats.packet_recv);
|
||||||
ms_message("Pauline sent %i RTP packets and received %i (for real)", (int)pauline_rtp_stats.packet_sent, (int)pauline_rtp_stats.packet_recv);
|
ms_message("Pauline sent %i RTP packets and received %i (for real)", (int)pauline_rtp_stats.packet_sent, (int)pauline_rtp_stats.packet_recv);
|
||||||
BC_ASSERT_TRUE(data_marie->packetReceivedCount == marie_rtp_stats.packet_recv);
|
BC_ASSERT_EQUAL(data_marie->packetReceivedCount, marie_rtp_stats.packet_recv, int, "%i");
|
||||||
BC_ASSERT_TRUE(data_marie->packetSentCount == marie_rtp_stats.packet_sent);
|
BC_ASSERT_EQUAL(data_marie->packetSentCount, marie_rtp_stats.packet_sent, int, "%i");
|
||||||
// There can be a small difference between the number of packets received in the modifier and the number processed in reception because the processing is asynchronous
|
// There can be a small difference between the number of packets received in the modifier and the number processed in reception because the processing is asynchronous
|
||||||
BC_ASSERT_TRUE(data_pauline->packetReceivedCount - pauline_rtp_stats.packet_recv < 20);
|
BC_ASSERT_TRUE(data_pauline->packetReceivedCount - pauline_rtp_stats.packet_recv < 20);
|
||||||
BC_ASSERT_TRUE(data_pauline->packetSentCount == pauline_rtp_stats.packet_sent);
|
BC_ASSERT_TRUE(data_pauline->packetSentCount == pauline_rtp_stats.packet_sent);
|
||||||
|
|
@ -6421,7 +6465,6 @@ static void call_with_ice_in_ipv4_with_v6_enabled(void) {
|
||||||
} else ms_warning("Test skipped, need both ipv6 and v4 available");
|
} else ms_warning("Test skipped, need both ipv6 and v4 available");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
test_t call_tests[] = {
|
test_t call_tests[] = {
|
||||||
TEST_NO_TAG("Early declined call", early_declined_call),
|
TEST_NO_TAG("Early declined call", early_declined_call),
|
||||||
TEST_NO_TAG("Call declined", call_declined),
|
TEST_NO_TAG("Call declined", call_declined),
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,14 @@ static void early_media_with_multicast_base(bool_t video) {
|
||||||
linphone_core_enable_video_capture(marie->lc, TRUE);
|
linphone_core_enable_video_capture(marie->lc, TRUE);
|
||||||
linphone_core_enable_video_display(marie->lc, FALSE);
|
linphone_core_enable_video_display(marie->lc, FALSE);
|
||||||
|
|
||||||
|
// important: VP8 has really poor performances with the mire camera, at least
|
||||||
|
// on iOS - so when ever h264 is available, let's use it instead
|
||||||
|
if (linphone_core_find_payload_type(pauline->lc,"h264", -1, -1)!=NULL) {
|
||||||
|
disable_all_video_codecs_except_one(pauline->lc,"h264");
|
||||||
|
disable_all_video_codecs_except_one(pauline2->lc,"h264");
|
||||||
|
disable_all_video_codecs_except_one(marie->lc,"h264");
|
||||||
|
}
|
||||||
|
|
||||||
linphone_core_set_video_device(pauline->lc, liblinphone_tester_mire_id);
|
linphone_core_set_video_device(pauline->lc, liblinphone_tester_mire_id);
|
||||||
linphone_core_set_video_device(pauline2->lc, liblinphone_tester_mire_id);
|
linphone_core_set_video_device(pauline2->lc, liblinphone_tester_mire_id);
|
||||||
linphone_core_set_video_device(marie->lc, liblinphone_tester_mire_id);
|
linphone_core_set_video_device(marie->lc, liblinphone_tester_mire_id);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue