mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 01:39:20 +00:00
Add JNI wrapper for AVPF parameters of the proxy config.
This commit is contained in:
parent
19e8cea754
commit
f11f588729
3 changed files with 48 additions and 0 deletions
|
|
@ -2944,6 +2944,18 @@ extern "C" jint Java_org_linphone_core_LinphoneProxyConfigImpl_getPrivacy(JNIEnv
|
|||
return linphone_proxy_config_get_privacy((LinphoneProxyConfig *) ptr);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_enableAvpf(JNIEnv *env, jobject thiz, jlong ptr, jboolean enable) {
|
||||
linphone_proxy_config_enable_avpf((LinphoneProxyConfig *)ptr, (bool)enable);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_setAvpfRRInterval(JNIEnv *env, jobject thiz, jlong ptr, jint interval) {
|
||||
linphone_proxy_config_set_avpf_rr_interval((LinphoneProxyConfig *)ptr, (uint8_t)interval);
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_getAvpfRRInterval(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
return (jint)linphone_proxy_config_get_avpf_rr_interval((LinphoneProxyConfig *)ptr);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneCallImpl_getDuration(JNIEnv* env,jobject thiz,jlong ptr) {
|
||||
return (jint)linphone_call_get_duration((LinphoneCall *) ptr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,6 +163,24 @@ public interface LinphoneProxyConfig {
|
|||
*/
|
||||
int getPrivacy();
|
||||
|
||||
/**
|
||||
* Indicates whether AVPF/SAVPF must be used for calls using this proxy config.
|
||||
* @param enable True to enable AVPF/SAVF, false to disable it.
|
||||
*/
|
||||
void enableAvpf(boolean enable);
|
||||
|
||||
/**
|
||||
* Set the interval between regular RTCP reports when using AVPF/SAVPF.
|
||||
* @param interval The interval in seconds (between 0 and 5 seconds).
|
||||
*/
|
||||
void setAvpfRRInterval(int interval);
|
||||
|
||||
/**
|
||||
* Get the interval between regular RTCP reports when using AVPF/SAVPF.
|
||||
* @return The interval in seconds.
|
||||
*/
|
||||
int getAvpfRRInterval();
|
||||
|
||||
|
||||
/**
|
||||
* Set optional contact parameters that will be added to the contact information sent in the registration.
|
||||
|
|
|
|||
|
|
@ -198,6 +198,24 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
|
|||
return getPrivacy(nativePtr);
|
||||
}
|
||||
|
||||
private native void enableAvpf(long nativePtr, boolean enable);
|
||||
@Override
|
||||
public void enableAvpf(boolean enable) {
|
||||
enableAvpf(nativePtr, enable);
|
||||
}
|
||||
|
||||
private native void setAvpfRRInterval(long nativePtr, int interval);
|
||||
@Override
|
||||
public void setAvpfRRInterval(int interval) {
|
||||
setAvpfRRInterval(nativePtr, interval);
|
||||
}
|
||||
|
||||
private native int getAvpfRRInterval(long nativePtr);
|
||||
@Override
|
||||
public int getAvpfRRInterval() {
|
||||
return getAvpfRRInterval(nativePtr);
|
||||
}
|
||||
|
||||
private native String getContactParameters(long ptr);
|
||||
@Override
|
||||
public String getContactParameters() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue