From 7d94757ac0eb846ae1897bb0dae2e82dc68af13e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Mon, 11 Aug 2014 13:28:58 +0200 Subject: [PATCH] Enable openh264 plugins for the "Call recording tester" --- coreapi/linphonecore.c | 6 ------ coreapi/linphonecore.h | 2 -- tester/call_tester.c | 35 ++++++++++++++++++++++------------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 15491765e..4a5a11554 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -6685,9 +6685,3 @@ bool_t linphone_core_sdp_200_ack_enabled(const LinphoneCore *lc) { void linphone_core_set_file_transfer_server(LinphoneCore *core, const char * server_url) { core->file_transfer_server=ms_strdup(server_url); } - -void linphone_core_init_openh264(void) { -#ifdef HAVE_OPENH264 - libmsopenh264_init(); -#endif -} diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 4f3f6f210..9fdb864df 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -2782,8 +2782,6 @@ LINPHONE_PUBLIC void linphone_core_set_file_transfer_server(LinphoneCore *core, **/ LINPHONE_PUBLIC const char ** linphone_core_get_supported_file_formats(LinphoneCore *core); -LINPHONE_PUBLIC void linphone_core_init_openh264(void); - #ifdef __cplusplus } #endif diff --git a/tester/call_tester.c b/tester/call_tester.c index e9e155a8e..a64193a3d 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -29,6 +29,13 @@ static void call_base(LinphoneMediaEncryption mode, bool_t enable_video,bool_t enable_relay,LinphoneFirewallPolicy policy); static void disable_all_audio_codecs_except_one(LinphoneCore *lc, const char *mime); +// prototype definition for call_recording() +#ifdef ANDROID +#ifdef HAVE_OPENH264 +extern void libmsopenh264_init(void); +#endif +#endif + void call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *msg){ char* to=linphone_address_as_string(linphone_call_get_call_log(call)->to); char* from=linphone_address_as_string(linphone_call_get_call_log(call)->from); @@ -2663,24 +2670,26 @@ static void savpf_to_savpf_call(void) { profile_call(TRUE, TRUE, TRUE, TRUE, "RTP/SAVPF"); } -#ifdef ANDROID -#ifdef HAVE_OPENH264 -extern void libmsopenh264_init(void); -#endif -#endif - static void call_recording() { -#ifdef ANDROID - linphone_core_init_openh264(); -#endif - LinphoneCoreManager *marie = linphone_core_manager_new("marie_h264_rc"); - LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_h264_rc"); - LinphoneCallParams *marieParams = linphone_core_create_default_call_parameters(marie->lc); - LinphoneCallParams *paulineParams = linphone_core_create_default_call_parameters(pauline->lc); + LinphoneCoreManager *marie = NULL; + LinphoneCoreManager *pauline = NULL; + LinphoneCallParams *marieParams = NULL; + LinphoneCallParams *paulineParams = NULL; LinphoneCall *callInst = NULL; int dummy=0; char *filepath = NULL; +#ifdef ANDROID +#ifdef HAVE_OPENH264 + libmsopenh264_init(); +#endif +#endif + + marie = linphone_core_manager_new("marie_h264_rc"); + pauline = linphone_core_manager_new("pauline_h264_rc"); + marieParams = linphone_core_create_default_call_parameters(marie->lc); + paulineParams = linphone_core_create_default_call_parameters(pauline->lc); + #ifdef ANDROID const char dirname[] = "/sdcard/Movies/liblinphone_tester"; #else