From a149f36615d7c95b8207852ef90e4b985f1aacb3 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 17 Feb 2015 12:47:08 +0100 Subject: [PATCH] Add getter API for play_file and record_file. --- coreapi/linphonecore.c | 7 +++++++ coreapi/linphonecore.h | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 0fe68a0ae..ae7a22222 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5747,6 +5747,10 @@ void linphone_core_set_use_files(LinphoneCore *lc, bool_t yesno){ lc->use_files=yesno; } +const char * linphone_core_get_play_file(const LinphoneCore *lc) { + return lc->play_file; +} + /** * Sets a wav file to be played when putting somebody on hold, * or when files are used instead of soundcards (see linphone_core_set_use_files()). @@ -5769,6 +5773,9 @@ void linphone_core_set_play_file(LinphoneCore *lc, const char *file){ } } +const char * linphone_core_get_record_file(const LinphoneCore *lc) { + return lc->rec_file; +} /** * Sets a wav file where incoming stream is to be recorded, diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 5a6b7f108..a909bb644 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -3006,7 +3006,32 @@ void linphone_core_show_video(LinphoneCore *lc, bool_t show); #define linphone_core_use_files(lc, yesno) linphone_core_set_use_files(lc, yesno) /*play/record support: use files instead of soundcard*/ LINPHONE_PUBLIC void linphone_core_set_use_files(LinphoneCore *lc, bool_t yesno); + +/** + * Get the wav file that is played when putting somebody on hold, + * or when files are used instead of soundcards (see linphone_core_set_use_files()). + * + * The file is a 16 bit linear wav file. + * @ingroup media_parameters + * @param[in] lc LinphoneCore object + * @return The path to the file that is played when putting somebody on hold. + */ +LINPHONE_PUBLIC const char * linphone_core_get_play_file(const LinphoneCore *lc); + LINPHONE_PUBLIC void linphone_core_set_play_file(LinphoneCore *lc, const char *file); + +/** + * Get the wav file where incoming stream is recorded, + * when files are used instead of soundcards (see linphone_core_set_use_files()). + * + * This feature is different from call recording (linphone_call_params_set_record_file()) + * The file is a 16 bit linear wav file. + * @ingroup media_parameters + * @param[in] lc LinphoneCore object + * @return The path to the file where incoming stream is recorded. +**/ +LINPHONE_PUBLIC const char * linphone_core_get_record_file(const LinphoneCore *lc); + LINPHONE_PUBLIC void linphone_core_set_record_file(LinphoneCore *lc, const char *file); LINPHONE_PUBLIC void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms);