mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-01 02:39:22 +00:00
Add jni for adaptive rate control
This commit is contained in:
parent
5547298f25
commit
9d54780865
3 changed files with 37 additions and 0 deletions
|
|
@ -1287,6 +1287,20 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getPayloadTypeBitrate(JN
|
|||
return (jint)linphone_core_get_payload_type_bitrate((LinphoneCore*)lc,(PayloadType*)pt);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableAdaptiveRateControl(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
,jboolean enable) {
|
||||
linphone_core_enable_adaptive_rate_control((LinphoneCore*)lc, enable);
|
||||
}
|
||||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isAdaptiveRateControlEnabled(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
) {
|
||||
return (jboolean)linphone_core_adaptive_rate_control_enabled((LinphoneCore*)lc);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableEchoCancellation(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
|
|
|
|||
|
|
@ -707,6 +707,18 @@ public interface LinphoneCore {
|
|||
*/
|
||||
int getPayloadTypeBitrate(PayloadType pt);
|
||||
|
||||
/**
|
||||
* Enable adaptive rate control.
|
||||
* @param enable
|
||||
*/
|
||||
void enableAdaptiveRateControl(boolean enable);
|
||||
|
||||
/**
|
||||
* Enables or disable adaptive rate control.
|
||||
* @return true if adaptive rate control is enabled.
|
||||
*/
|
||||
boolean isAdaptiveRateControlEnabled();
|
||||
|
||||
/**
|
||||
* Enables or disable echo cancellation.
|
||||
* @param enable
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native long findPayloadType(long nativePtr, String mime, int clockRate, int channels);
|
||||
private native int enablePayloadType(long nativePtr, long payloadType, boolean enable);
|
||||
private native boolean isPayloadTypeEnabled(long nativePtr, long payloadType);
|
||||
private native void enableAdaptiveRateControl(long nativePtr,boolean enable);
|
||||
private native boolean isAdaptiveRateControlEnabled(long nativePtr);
|
||||
private native void enableEchoCancellation(long nativePtr,boolean enable);
|
||||
private native boolean isEchoCancellationEnabled(long nativePtr);
|
||||
private native Object getCurrentCall(long nativePtr) ;
|
||||
|
|
@ -1190,5 +1192,14 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
public synchronized int getPayloadTypeBitrate(PayloadType pt) {
|
||||
return getPayloadTypeBitrate(nativePtr, ((PayloadTypeImpl)pt).nativePtr);
|
||||
}
|
||||
@Override
|
||||
public void enableAdaptiveRateControl(boolean enable) {
|
||||
enableAdaptiveRateControl(nativePtr,enable);
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean isAdaptiveRateControlEnabled() {
|
||||
return isAdaptiveRateControlEnabled(nativePtr);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue