Commit b3734e28 authored by Margaux Clerc's avatar Margaux Clerc
Browse files

JNI setPayloadTypeNumber and resetLogCollection

parent 00ef8531
......@@ -1200,6 +1200,10 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_uploadLogCollection(JNIE
linphone_core_upload_log_collection(core);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_resetLogCollection(JNIEnv* env, jobject thiz) {
linphone_core_reset_log_collection();
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_migrateToMultiTransport(JNIEnv* env
,jobject thiz
,jlong lc) {
......@@ -1603,6 +1607,7 @@ extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_findPayloadType(JNIEnv*
env->ReleaseStringUTFChars(jmime, mime);
return result;
}
extern "C" jlongArray Java_org_linphone_core_LinphoneCoreImpl_listVideoPayloadTypes(JNIEnv* env
,jobject thiz
,jlong lc) {
......@@ -1675,6 +1680,21 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getPayloadTypeBitrate(JN
return (jint)linphone_core_get_payload_type_bitrate((LinphoneCore*)lc,(PayloadType*)pt);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPayloadTypeNumber(JNIEnv* env
,jobject thiz
,jlong lc
,jlong pt
,jint number) {
linphone_core_set_payload_type_number((LinphoneCore*)lc,(PayloadType*)pt,number);
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getPayloadTypeNumber(JNIEnv* env
,jobject thiz
,jlong lc
,jlong pt) {
return (jint)linphone_core_get_payload_type_number((LinphoneCore*)lc,(PayloadType*)pt);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableAdaptiveRateControl(JNIEnv* env
,jobject thiz
,jlong lc
......
......@@ -786,6 +786,26 @@ public interface LinphoneCore {
*/
int getPayloadTypeBitrate(PayloadType pt);
/**
* Set an explicit bitrate (IP bitrate, not codec bitrate) for a given codec, in kbit/s.
* @param pt the payload type
* @param number target IP bitrate in kbit/s
*/
/**
* Force a number for a payload type. The LinphoneCore does payload type number assignment automatically. THis function is to be used mainly for tests, in order
* to override the automatic assignment mechanism.
* @param pt the payload type
* @param number
**/
void setPayloadTypeNumber(PayloadType pt, int number);
/**
* @param pt the payload type
* @return the payload type number assigned for this codec.
*/
int getPayloadTypeNumber(PayloadType pt);
/**
* Enable adaptive rate control.
* @param enable
......@@ -1889,6 +1909,11 @@ public interface LinphoneCore {
* Upload the log collection to the configured server url.
*/
public void uploadLogCollection();
/**
* Reset the log collection by removing the log files.
*/
public void resetLogCollection();
/**
......
......@@ -1274,6 +1274,18 @@ class LinphoneCoreImpl implements LinphoneCore {
public synchronized int getPayloadTypeBitrate(PayloadType pt) {
return getPayloadTypeBitrate(nativePtr, ((PayloadTypeImpl)pt).nativePtr);
}
private native void setPayloadTypeNumber(long coreptr, long payload_ptr, int number);
@Override
public synchronized void setPayloadTypeNumber(PayloadType pt, int number) {
setPayloadTypeNumber(nativePtr, ((PayloadTypeImpl)pt).nativePtr, number);
}
private native int getPayloadTypeNumber(long coreptr, long payload_ptr);
@Override
public synchronized int getPayloadTypeNumber(PayloadType pt) {
return getPayloadTypeNumber(nativePtr, ((PayloadTypeImpl)pt).nativePtr);
}
@Override
public synchronized void enableAdaptiveRateControl(boolean enable) {
enableAdaptiveRateControl(nativePtr,enable);
......@@ -1352,6 +1364,9 @@ class LinphoneCoreImpl implements LinphoneCore {
public void uploadLogCollection() {
uploadLogCollection(nativePtr);
}
@Override
public native void resetLogCollection();
private native void setPreferredFramerate(long nativePtr, float fps);
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment