Commit 93d57e99 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Added methods in core required for Android

parent 9c440ebf
......@@ -324,3 +324,22 @@ int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibration
ec_calibrator_start(lc->ecc);
return 0;
}
bool_t linphone_core_has_builtin_echo_canceller(LinphoneCore *lc) {
MSFactory * factory = linphone_core_get_ms_factory(lc);
MSDevicesInfo *devices = ms_factory_get_devices_info(factory);
SoundDeviceDescription *sound_description = ms_devices_info_get_sound_device_description(devices);
if (sound_description == NULL) return FALSE;
if (sound_description->flags & DEVICE_HAS_BUILTIN_AEC) return TRUE;
return FALSE;
}
bool_t linphone_core_is_echo_canceller_calibration_required(LinphoneCore *lc) {
MSFactory * factory = linphone_core_get_ms_factory(lc);
MSDevicesInfo *devices = ms_factory_get_devices_info(factory);
SoundDeviceDescription *sound_description = ms_devices_info_get_sound_device_description(devices);
if (sound_description == NULL) return TRUE;
if (sound_description->flags & DEVICE_HAS_BUILTIN_AEC) return FALSE;
if (sound_description->delay != 0) return FALSE;
return TRUE;
}
......@@ -7371,3 +7371,12 @@ void linphone_core_check_for_update(LinphoneCore *lc, const char *current_versio
}
#endif
}
bool_t linphone_core_has_crappy_opengl(LinphoneCore *lc) {
MSFactory * factory = linphone_core_get_ms_factory(lc);
MSDevicesInfo *devices = ms_factory_get_devices_info(factory);
SoundDeviceDescription *sound_description = ms_devices_info_get_sound_device_description(devices);
if (sound_description == NULL) return FALSE;
if (sound_description->flags & DEVICE_HAS_CRAPPY_OPENGL) return TRUE;
return FALSE;
}
\ No newline at end of file
......@@ -59,16 +59,42 @@ typedef void (*LinphoneEcCalibrationAudioUninit)(void *data);
**/
LINPHONE_PUBLIC int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibrationCallback cb,
LinphoneEcCalibrationAudioInit audio_init_cb, LinphoneEcCalibrationAudioUninit audio_uninit_cb, void *cb_data);
/**
* Start the simulation of call to test the latency with an external device
* @param lc The core.
* @param rate Sound sample rate.
* @ingroup misc
**/
LINPHONE_PUBLIC LinphoneStatus linphone_core_start_echo_tester(LinphoneCore *lc, unsigned int rate);
/**
* Stop the simulation of call
* @ingroup misc
**/
LINPHONE_PUBLIC LinphoneStatus linphone_core_stop_echo_tester(LinphoneCore *lc);
/**
* Check whether the device is flagged has crappy opengl
* @returns TRUE if crappy opengl flag is set, FALSE otherwise
* @ingroup misc
**/
LINPHONE_PUBLIC bool_t linphone_core_has_crappy_opengl(LinphoneCore *lc);
/**
* Check whether the device has a hardware echo canceller
* @returns TRUE if it does, FALSE otherwise
* @ingroup misc
**/
LINPHONE_PUBLIC bool_t linphone_core_has_builtin_echo_canceller(LinphoneCore *lc);
/**
* Check whether the device is echo canceller calibration is required
* @returns TRUE if it is required, FALSE otherwise
* @ingroup misc
**/
LINPHONE_PUBLIC bool_t linphone_core_is_echo_canceller_calibration_required(LinphoneCore *lc);
/**
* @ingroup IOS
* Special function to warm up dtmf feeback stream. #linphone_core_stop_dtmf_stream must() be called before entering FG mode
......
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