From f056bb1085b23b34e8d35a1f6c7f68c3e46186d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Tue, 5 Aug 2014 15:54:00 +0200 Subject: [PATCH] Make "Call recording" tester writes in a wav file when video support is disabled. --- configure.ac | 2 +- mediastreamer2 | 2 +- tester/call_tester.c | 13 ++++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 092b41129..8d4c80155 100644 --- a/configure.ac +++ b/configure.ac @@ -537,7 +537,7 @@ fi dnl conditionnal build of video support AC_ARG_ENABLE(video, - [AS_HELP_STRING([--enable-video], [Turn on video support compiling])], + [AS_HELP_STRING([--enable-video], [Turn on video support compiling (default=yes)])], [case "${enableval}" in yes) video=true ;; no) video=false ;; diff --git a/mediastreamer2 b/mediastreamer2 index e3fe44b86..a1746a013 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit e3fe44b86513914192078d2096d83592cfeb41ff +Subproject commit a1746a0139adcd656f29019c8b251d3947fe5580 diff --git a/tester/call_tester.c b/tester/call_tester.c index 095df01c9..510988a13 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -550,6 +550,7 @@ static void disable_all_audio_codecs_except_one(LinphoneCore *lc, const char *mi linphone_core_enable_payload_type(lc,pt,TRUE); } +#ifdef VIDEO_ENABLED static void disable_all_video_codecs_except_one(LinphoneCore *lc, const char *mime) { const MSList *codecs = linphone_core_get_video_codecs(lc); const MSList *it = NULL; @@ -561,6 +562,7 @@ static void disable_all_video_codecs_except_one(LinphoneCore *lc, const char *mi CU_ASSERT_PTR_NOT_NULL_FATAL(pt = linphone_core_find_payload_type(lc, mime, -1, -1)); linphone_core_enable_payload_type(lc, pt, TRUE); } +#endif static void call_failed_because_of_codecs(void) { LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc"); @@ -2667,7 +2669,13 @@ static void recording_call() { LinphoneCallParams *marieParams = linphone_core_create_default_call_parameters(marie->lc); LinphoneCallParams *paulineParams = linphone_core_create_default_call_parameters(pauline->lc); LinphoneCall *callInst = NULL; + +#ifdef VIDEO_ENABLED const char filename[] = "recording.mkv"; +#else + const char filename[] = "recording.wav"; +#endif + const char dirname[] = ".test"; char *filepath = NULL; @@ -2683,17 +2691,20 @@ static void recording_call() { CU_ASSERT_EQUAL(remove(filepath), 0); } + linphone_call_params_set_record_file(marieParams, filepath); + +#ifdef VIDEO_ENABLED linphone_core_enable_video_display(marie->lc, TRUE); linphone_core_enable_video_display(pauline->lc, FALSE); linphone_core_enable_video_capture(marie->lc, TRUE); linphone_core_enable_video_capture(pauline->lc, TRUE); linphone_call_params_enable_video(marieParams, TRUE); - linphone_call_params_set_record_file(marieParams, filepath); linphone_call_params_enable_video(paulineParams, TRUE); disable_all_video_codecs_except_one(marie->lc, "H264"); disable_all_video_codecs_except_one(pauline->lc, "H264"); +#endif CU_ASSERT_TRUE(call_with_params(marie, pauline, marieParams, paulineParams)); CU_ASSERT_PTR_NOT_NULL(callInst = linphone_core_get_current_call(marie->lc));