]> sjero.net Git - linphone/commitdiff
Add JNI for used codecs.
authorGhislain MARY <ghislain.mary@belledonne-communications.com>
Wed, 26 Sep 2012 10:43:45 +0000 (12:43 +0200)
committerGhislain MARY <ghislain.mary@belledonne-communications.com>
Wed, 26 Sep 2012 10:46:08 +0000 (12:46 +0200)
coreapi/linphonecore_jni.cc
java/common/org/linphone/core/LinphoneCallParams.java

index cb1c72335d15683bc365d1211dd4dc6531364632..a237b1865144e216c6a5cc07470c7df489856b50 100644 (file)
@@ -946,6 +946,14 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setMediaEncryption(JNIEn
        linphone_core_set_media_encryption((LinphoneCore*)lc,(LinphoneMediaEncryption)menc);
 }
 
+extern "C" long Java_org_linphone_core_LinphoneCallParamsImpl_getUsedAudioCodec(JNIEnv *env, jobject thiz, jlong cp) {
+       return (long)linphone_call_params_get_used_audio_codec((LinphoneCallParams *)cp);
+}
+
+extern "C" long Java_org_linphone_core_LinphoneCallParamsImpl_getUsedVideoCodec(JNIEnv *env, jobject thiz, jlong cp) {
+       return (long)linphone_call_params_get_used_video_codec((LinphoneCallParams *)cp);
+}
+
 extern "C" int Java_org_linphone_core_LinphoneCallParamsImpl_getMediaEncryption(JNIEnv*  env
                                                                                                                                                        ,jobject  thiz
                                                                                                                                                        ,jlong cp
index 5bf06733717f369069d9adad40a1f370351d7b3a..2dd497c9c346f4cf511a6d1448181ee24c3b0cdb 100644 (file)
@@ -34,7 +34,7 @@ public interface LinphoneCallParams {
         * @param value 0 to disable limitation
         */
        void setAudioBandwidth(int value);
-       
+
        /**
         * return selected media encryption
         * @return MediaEncryption.None MediaEncryption.SRTP or MediaEncryption.ZRTP
@@ -45,5 +45,16 @@ public interface LinphoneCallParams {
         * @params menc: MediaEncryption.None, MediaEncryption.SRTP or MediaEncryption.ZRTP
         */
        void setMediaEnctyption(MediaEncryption menc);
-       
+
+       /**
+        * Get the currently used audio codec
+        * @return PayloadType or null
+        */
+       PayloadType getUsedAudioCodec();
+
+       /**
+        * Get the currently used video codec
+        * @return PayloadType or null
+        */
+       PayloadType getUsedVideoCodec();
 }