srtp: add Java impl
This commit is contained in:
parent
c0e8108a12
commit
0a14943579
2 changed files with 29 additions and 1 deletions
|
@ -28,6 +28,8 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
|
||||||
private native void enableVideo(long nativePtr, boolean b);
|
private native void enableVideo(long nativePtr, boolean b);
|
||||||
private native boolean getVideoEnabled(long nativePtr);
|
private native boolean getVideoEnabled(long nativePtr);
|
||||||
private native void audioBandwidth(long nativePtr, int bw);
|
private native void audioBandwidth(long nativePtr, int bw);
|
||||||
|
private native void setMediaEncryption(long nativePtr, String menc);
|
||||||
|
private native String getMediaEncryption(long nativePtr);
|
||||||
private native void destroy(long nativePtr);
|
private native void destroy(long nativePtr);
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,4 +50,12 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
|
||||||
public void setAudioBandwidth(int value) {
|
public void setAudioBandwidth(int value) {
|
||||||
audioBandwidth(nativePtr, value);
|
audioBandwidth(nativePtr, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMediaEncryption() {
|
||||||
|
return getMediaEncryption(nativePtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMediaEnctyption(String menc) {
|
||||||
|
setMediaEncryption(nativePtr, menc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,12 @@ class LinphoneCoreImpl implements LinphoneCore {
|
||||||
private native void enableEchoLimiter(long nativePtr2, boolean val);
|
private native void enableEchoLimiter(long nativePtr2, boolean val);
|
||||||
private native int setVideoDevice(long nativePtr2, int id);
|
private native int setVideoDevice(long nativePtr2, int id);
|
||||||
private native int getVideoDevice(long nativePtr2);
|
private native int getVideoDevice(long nativePtr2);
|
||||||
|
private native String getMediaEncryption(long nativePtr);
|
||||||
|
private native void setMediaEncryption(long nativePtr, String menc);
|
||||||
|
private native boolean isMediaEncryptionMandatory(long nativePtr);
|
||||||
|
private native void setMediaEncryptionMandatory(long nativePtr, boolean yesno);
|
||||||
|
|
||||||
|
|
||||||
LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException {
|
LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException {
|
||||||
mListener=listener;
|
mListener=listener;
|
||||||
nativePtr = newLinphoneCore(listener,userConfig.getCanonicalPath(),factoryConfig.getCanonicalPath(),userdata);
|
nativePtr = newLinphoneCore(listener,userConfig.getCanonicalPath(),factoryConfig.getCanonicalPath(),userdata);
|
||||||
|
@ -545,4 +550,17 @@ class LinphoneCoreImpl implements LinphoneCore {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMediaEncryption() {
|
||||||
|
return getMediaEncryption(nativePtr);
|
||||||
|
}
|
||||||
|
public boolean isMediaEncryptionMandatory() {
|
||||||
|
return isMediaEncryptionMandatory(nativePtr);
|
||||||
|
}
|
||||||
|
public void setMediaEncryption(String menc) {
|
||||||
|
setMediaEncryption(nativePtr, menc);
|
||||||
|
}
|
||||||
|
public void setMediaEncryptionMandatory(boolean yesno) {
|
||||||
|
setMediaEncryptionMandatory(nativePtr, yesno);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue