mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-02 19:29:27 +00:00
Adding jni for in call stats
This commit is contained in:
parent
8f9ae2198a
commit
36c73a9d0a
3 changed files with 17 additions and 1 deletions
|
|
@ -3360,6 +3360,11 @@ extern "C" jstring Java_org_linphone_core_LinphoneCallStatsImpl_getDecoderName(J
|
|||
return jdecodername;
|
||||
}
|
||||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneCallStatsImpl_getIsIpV6Active(JNIEnv *env, jobject thiz,jlong stats_ptr, jlong call_ptr) {
|
||||
LinphoneCall *call = (LinphoneCall *)call_ptr;
|
||||
return (call->af == AF_INET6);
|
||||
}
|
||||
|
||||
/*payloadType*/
|
||||
extern "C" jstring Java_org_linphone_core_PayloadTypeImpl_toString(JNIEnv* env,jobject thiz,jlong ptr) {
|
||||
PayloadType* pt = (PayloadType*)ptr;
|
||||
|
|
|
|||
|
|
@ -191,4 +191,10 @@ public interface LinphoneCallStats {
|
|||
* @return The name of decoder
|
||||
*/
|
||||
public String getDecoderName(PayloadType pl);
|
||||
|
||||
/**
|
||||
* Get if ipv6 is activated
|
||||
* @return ipv6 active
|
||||
*/
|
||||
public boolean getIsIpV6Active();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ class LinphoneCallStatsImpl implements LinphoneCallStats {
|
|||
private native String getEncoderName(long nativeStatsPtr, long nativeCallPtr, long payloadPtr);
|
||||
private native String getDecoderName(long nativeStatsPtr, long nativeCallPtr, long payloadPtr);
|
||||
private native void updateStats(long nativeCallPtr, int mediaType);
|
||||
private native boolean getIsIpV6Active(long nativeStatsPtr, long nativeCallPtr);
|
||||
|
||||
protected LinphoneCallStatsImpl(long nativeCallPtr, long nativeStatsPtr) {
|
||||
nativePtr = nativeStatsPtr;
|
||||
|
|
@ -67,7 +68,7 @@ class LinphoneCallStatsImpl implements LinphoneCallStats {
|
|||
roundTripDelay = getRoundTripDelay(nativeStatsPtr);
|
||||
latePacketsCumulativeNumber = getLatePacketsCumulativeNumber(nativeStatsPtr, nativeCallPtr);
|
||||
jitterBufferSize = getJitterBufferSize(nativeStatsPtr);
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void updateRealTimeStats(LinphoneCall call){
|
||||
|
|
@ -139,4 +140,8 @@ class LinphoneCallStatsImpl implements LinphoneCallStats {
|
|||
return "";
|
||||
return getDecoderName(nativePtr, nativeCPtr, ((PayloadTypeImpl)pl).nativePtr);
|
||||
}
|
||||
|
||||
public boolean getIsIpV6Active() {
|
||||
return getIsIpV6Active(nativePtr, nativeCPtr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue