Commit fae2bf32 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Added hasCrappyOpenGL for Android

parent 111434ee
......@@ -2315,7 +2315,8 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_needsEchoCalibration
return TRUE;
}
SoundDeviceDescription *sound_description = sound_device_description_get();
MSDevicesInfo *devices = ms_factory_get_devices_info(factory);
SoundDeviceDescription *sound_description = ms_devices_info_get_sound_device_description(devices);
if(sound_description != NULL && sound_description == &genericSoundDeviceDescriptor){
return TRUE;
}
......@@ -2325,6 +2326,19 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_needsEchoCalibration
return TRUE;
}
extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_hasCrappyOpenGL(JNIEnv *env, jobject thiz, jlong lcptr) {
LinphoneCore *lc = (LinphoneCore*) lcptr;
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 && sound_description == &genericSoundDeviceDescriptor){
return FALSE;
}
if (sound_description->flags & DEVICE_HAS_CRAPPY_OPENGL) return TRUE;
return FALSE;
}
extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_hasBuiltInEchoCanceler(JNIEnv *env, jobject thiz, jlong lcptr) {
MSSndCard *sndcard;
LinphoneCore *lc = (LinphoneCore*) lcptr;
......
......@@ -1330,6 +1330,11 @@ public interface LinphoneCore {
* If the device has a builtin echo canceller, it will return false.
*/
boolean hasBuiltInEchoCanceler();
/**
* Returns true if the OpenGL on this device is crappy and we need to use the old Android display
*/
boolean hasCrappyOpenGL();
void enableIpv6(boolean enable);
......
......@@ -1108,6 +1108,11 @@ class LinphoneCoreImpl implements LinphoneCore {
public synchronized boolean hasBuiltInEchoCanceler() {
return hasBuiltInEchoCanceler(nativePtr);
}
private native boolean hasCrappyOpenGL(long ptr);
@Override
public synchronized boolean hasCrappyOpenGL() {
return hasCrappyOpenGL(nativePtr);
}
private native void declineCall(long coreptr, long callptr, int reason);
@Override
public synchronized void declineCall(LinphoneCall aCall, Reason reason) {
......
mediastreamer2 @ 52806d2c
Subproject commit 91cf887343448db8d1a67e5e62647fad4f40c680
Subproject commit 52806d2c5dde697d190ce33f2b5bad386e5bb74f
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