mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Add JNI for detect VBR codec
This commit is contained in:
parent
0778de48aa
commit
c7f6a5a4f8
3 changed files with 22 additions and 1 deletions
|
|
@ -1272,6 +1272,13 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isPayloadTypeEnabled
|
|||
return (jboolean) linphone_core_payload_type_enabled((LinphoneCore*)lc, (PayloadType*)pt);
|
||||
}
|
||||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_payloadTypeIsVbr(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
,jlong pt) {
|
||||
return (jboolean) linphone_core_payload_type_is_vbr((LinphoneCore*)lc, (PayloadType*)pt);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPayloadTypeBitrate(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
|
|
|
|||
|
|
@ -689,10 +689,17 @@ public interface LinphoneCore {
|
|||
void enablePayloadType(PayloadType pt, boolean enable) throws LinphoneCoreException;
|
||||
|
||||
/**
|
||||
* Returns whether or not the payload is enabled in linphonecore.
|
||||
* @param pt the payload type
|
||||
* @return whether or not the payload is enabled in linphonecore.
|
||||
*/
|
||||
boolean isPayloadTypeEnabled(PayloadType pt);
|
||||
|
||||
/**
|
||||
* @param pt the payload type
|
||||
* @return whether or not the payload epresents a VBR codec
|
||||
*/
|
||||
boolean payloadTypeIsVbr(PayloadType pt);
|
||||
|
||||
/**
|
||||
* Set an explicit bitrate (IP bitrate, not codec bitrate) for a given codec, in kbit/s.
|
||||
* @param pt the payload type
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native long findPayloadType(long nativePtr, String mime, int clockRate, int channels);
|
||||
private native int enablePayloadType(long nativePtr, long payloadType, boolean enable);
|
||||
private native boolean isPayloadTypeEnabled(long nativePtr, long payloadType);
|
||||
private native boolean payloadTypeIsVbr(long nativePtr, long payloadType);
|
||||
private native void enableAdaptiveRateControl(long nativePtr,boolean enable);
|
||||
private native boolean isAdaptiveRateControlEnabled(long nativePtr);
|
||||
private native void enableEchoCancellation(long nativePtr,boolean enable);
|
||||
|
|
@ -341,6 +342,12 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
isValid();
|
||||
return isPayloadTypeEnabled(nativePtr, ((PayloadTypeImpl)pt).nativePtr);
|
||||
}
|
||||
|
||||
public synchronized boolean payloadTypeIsVbr(PayloadType pt) {
|
||||
isValid();
|
||||
return payloadTypeIsVbr(nativePtr, ((PayloadTypeImpl)pt).nativePtr);
|
||||
}
|
||||
|
||||
public synchronized void enableEchoCancellation(boolean enable) {
|
||||
isValid();
|
||||
enableEchoCancellation(nativePtr, enable);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue