Commit 1e75dc40 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Add JNI glue to enable/disable low bandwidth param in call

parent 9593053c
......@@ -1774,6 +1774,10 @@ extern "C" jstring Java_org_linphone_core_LinphoneCoreImpl_getStunServer(JNIEnv
extern "C" void Java_org_linphone_core_LinphoneCallImpl_enableLowBandwidth(JNIEnv *env, jobject thiz, jlong cp, jboolean enable) {
linphone_call_params_enable_low_bandwidth((LinphoneCallParams *)cp, enable);
extern "C" jlong Java_org_linphone_core_LinphoneCallParamsImpl_getUsedAudioCodec(JNIEnv *env, jobject thiz, jlong cp) {
return (jlong)linphone_call_params_get_used_audio_codec((LinphoneCallParams *)cp);
......@@ -1851,7 +1855,6 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_updateCall(JNIEnv *env,
return (jint) linphone_core_update_call((LinphoneCore *)lc, (LinphoneCall *)call, (const LinphoneCallParams *)params);
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPreferredVideoSize(JNIEnv *env, jobject thiz, jlong lc, jint width, jint height){
MSVideoSize vsize;
vsize.width = (int)width;
......@@ -57,4 +57,12 @@ public interface LinphoneCallParams {
* @return PayloadType or null
PayloadType getUsedVideoCodec();
* Indicate low bandwith mode.
* Configuring a call to low bandwidth mode will result in the core to activate several settings for the call in order to ensure that bitrate usage
* is lowered to the minimum possible. Typically, ptime (packetization time) will be increased, audio codec's output bitrate will be targetted to 20kbit/s provided
* that it is achievable by the codec selected after SDP handshake. Video is automatically disabled.
void enableLowBandwidth(boolean enable);
......@@ -35,7 +35,7 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
private native long getUsedAudioCodec(long nativePtr);
private native long getUsedVideoCodec(long nativePtr);
private native void destroy(long nativePtr);
private native void enableLowBandwidth(long nativePtr, boolean enable);
public boolean getVideoEnabled() {
return getVideoEnabled(nativePtr);
......@@ -79,4 +79,8 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
public boolean localConferenceMode() {
return localConferenceMode(nativePtr);
public void enableLowBandwidth(boolean enable) {
enableLowBandwidth(nativePtr, enable);
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