]> sjero.net Git - linphone/blobdiff - coreapi/linphonecore_jni.cc
Add callbacks for audio (un)initialization in the echo canceller calibrator.
[linphone] / coreapi / linphonecore_jni.cc
index 6b6c3f5ce8c640bdf4c2e1cdddb4996a300bd16a..02ac62c7a8498c546a1d49f557b7fe1cca97dabc 100644 (file)
@@ -996,6 +996,8 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_startEchoCalibration(JNI
                                                                                                                                                                ,jobject data) {
        return (jint)linphone_core_start_echo_calibration((LinphoneCore*)lc
                                                                                                        , LinphoneCoreData::ecCalibrationStatus
+                                                                                                       , NULL
+                                                                                                       , NULL
                                                                                                        , data?env->NewGlobalRef(data):NULL);
 
 }
@@ -1578,6 +1580,23 @@ extern "C" jfloat Java_org_linphone_core_LinphoneCallStatsImpl_getJitterBufferSi
        return (jfloat)((LinphoneCallStats *)stats_ptr)->jitter_stats.jitter_buffer_size_ms;
 }
 
+extern "C" jfloat Java_org_linphone_core_LinphoneCallStatsImpl_getLocalLossRate(JNIEnv *env, jobject thiz,jlong stats_ptr) {
+       const LinphoneCallStats *stats = (LinphoneCallStats *)stats_ptr;
+       return stats->local_loss_rate;
+}
+
+extern "C" jfloat Java_org_linphone_core_LinphoneCallStatsImpl_getLocalLateRate(JNIEnv *env, jobject thiz, jlong stats_ptr) {
+       const LinphoneCallStats *stats = (LinphoneCallStats *)stats_ptr;
+       return stats->local_late_rate;
+}
+
+extern "C" void Java_org_linphone_core_LinphoneCallStatsImpl_updateStats(JNIEnv *env, jobject thiz, jlong call_ptr, jint mediatype) {
+       if (mediatype==LINPHONE_CALL_STATS_AUDIO)
+               linphone_call_get_audio_stats((LinphoneCall*)call_ptr);
+       else 
+               linphone_call_get_video_stats((LinphoneCall*)call_ptr);
+}
+
 /*payloadType*/
 extern "C" jstring Java_org_linphone_core_PayloadTypeImpl_toString(JNIEnv*  env,jobject  thiz,jlong ptr) {
        PayloadType* pt = (PayloadType*)ptr;
@@ -1702,7 +1721,6 @@ extern "C" jfloat Java_org_linphone_core_LinphoneCallImpl_getAverageQuality(      JNI
        return (jfloat)linphone_call_get_average_quality((LinphoneCall*)ptr);
 }
 
-
 //LinphoneFriend
 extern "C" jlong Java_org_linphone_core_LinphoneFriendImpl_newLinphoneFriend(JNIEnv*  env
                                                                                                                                                ,jobject  thiz
@@ -1855,6 +1873,12 @@ extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getPeerAddress(J
        return (jlong) linphone_chat_message_get_peer_address((LinphoneChatMessage*)ptr);
 }
 
+extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getTime(JNIEnv*  env
+                                                                                                                                               ,jobject  thiz
+                                                                                                                                               ,jlong ptr) {
+       return (jlong) linphone_chat_message_get_time((LinphoneChatMessage*)ptr);
+}
+
 extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_sendMessage(JNIEnv*  env
                                                                                                                                                ,jobject  thiz
                                                                                                                                                ,jlong ptr
@@ -2121,6 +2145,14 @@ extern "C" jint Java_org_linphone_core_LinphoneCallImpl_getDuration(JNIEnv*  env
        return (jint)linphone_call_get_duration((LinphoneCall *) ptr);
 }
 
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setSipDscp(JNIEnv* env,jobject thiz,jlong ptr, jint dscp){
+       linphone_core_set_sip_dscp((LinphoneCore*)ptr,dscp);
+}
+
+extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getSipDscp(JNIEnv* env,jobject thiz,jlong ptr){
+       return linphone_core_get_sip_dscp((LinphoneCore*)ptr);
+}
+
 extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getSignalingTransportPort(JNIEnv* env,jobject thiz,jlong ptr, jint code) {
        LCSipTransports tr;
        linphone_core_get_sip_transports((LinphoneCore *) ptr, &tr);
@@ -2425,6 +2457,22 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVideoPortRange(JNIEnv
        linphone_core_set_video_port_range((LinphoneCore *)lc, min_port, max_port);
 }
 
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setAudioDscp(JNIEnv* env,jobject thiz,jlong ptr, jint dscp){
+       linphone_core_set_audio_dscp((LinphoneCore*)ptr,dscp);
+}
+
+extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getAudioDscp(JNIEnv* env,jobject thiz,jlong ptr){
+       return linphone_core_get_audio_dscp((LinphoneCore*)ptr);
+}
+
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVideoDscp(JNIEnv* env,jobject thiz,jlong ptr, jint dscp){
+       linphone_core_set_video_dscp((LinphoneCore*)ptr,dscp);
+}
+
+extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getVideoDscp(JNIEnv* env,jobject thiz,jlong ptr){
+       return linphone_core_get_video_dscp((LinphoneCore*)ptr);
+}
+
 extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setIncomingTimeout(JNIEnv *env, jobject thiz, jlong lc, jint timeout) {
        linphone_core_set_inc_timeout((LinphoneCore *)lc, timeout);
 }