]> sjero.net Git - linphone/commitdiff
Add JNI to get lowBandwidthMode value
authorSylvain Berfini <sylvain.berfini@belledonne-communications.com>
Tue, 8 Jan 2013 09:43:48 +0000 (10:43 +0100)
committerSylvain Berfini <sylvain.berfini@belledonne-communications.com>
Tue, 8 Jan 2013 09:43:48 +0000 (10:43 +0100)
coreapi/linphonecore_jni.cc
java/common/org/linphone/core/LinphoneCallParams.java
java/impl/org/linphone/core/LinphoneCallParamsImpl.java

index 5ed0b907f1bc2cef9b6c4ed03e6f89c86396517c..a6a561c86d6f627c29604eae1900988e1a0c8b49 100644 (file)
@@ -1792,6 +1792,9 @@ extern "C" jstring Java_org_linphone_core_LinphoneCoreImpl_getStunServer(JNIEnv
 }
 
 //CallParams
+extern "C" jboolean Java_org_linphone_core_LinphoneCallParamsImpl_isLowBandwidthEnabled(JNIEnv *env, jobject thiz, jlong cp) {
+       return (jboolean) linphone_call_params_low_bandwidth_enabled((LinphoneCallParams *)cp);
+}
 
 extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_enableLowBandwidth(JNIEnv *env, jobject thiz, jlong cp, jboolean enable) {
        linphone_call_params_enable_low_bandwidth((LinphoneCallParams *)cp, enable);
index 730a99dc2c8fe430d5ffef38eda721cb45fa8142..f8c7c097f36cdf5566487d08834ab636bd1e73a8 100644 (file)
@@ -65,4 +65,11 @@ public interface LinphoneCallParams {
         * that it is achievable by the codec selected after SDP handshake. Video is automatically disabled.
        **/
        void enableLowBandwidth(boolean enable);
+       
+       /**
+        * Use to know if this call has been configured in low bandwidth mode.
+        * <br> When enabled, this param may transform a call request with video in audio only mode.
+        * @return true if low bandwidth has been configured/detected
+        */
+       boolean isLowBandwidthEnabled();
 }
index be3495a8dda6cdfcd2afc1058013feb642d7fc49..b2ae4fe66dca6576fa78eff5686872cab8a55e17 100644 (file)
@@ -36,6 +36,7 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
        private native long getUsedVideoCodec(long nativePtr);
        private native void destroy(long nativePtr);
        private native void enableLowBandwidth(long nativePtr, boolean enable);
+       private native void isLowBandwidthEnabled(long nativePtr);
        
        public boolean getVideoEnabled() {
                return getVideoEnabled(nativePtr);
@@ -83,4 +84,8 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
        public void enableLowBandwidth(boolean enable) {
                enableLowBandwidth(nativePtr, enable);
        }
+       
+       public boolean isLowBandwidthEnabled() {
+               return isLowBandwidthEnabled(nativePtr);
+       }
 }