mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 17:59:21 +00:00
Add video codecs preference. Integrate JNI code for getting list of available video codecs.
This commit is contained in:
parent
fb6a4a0bb5
commit
6df330a6b4
2 changed files with 27 additions and 2 deletions
|
|
@ -85,9 +85,10 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native void setDownloadBandwidth(long nativePtr, int bw);
|
||||
private native void setPreferredVideoSize(long nativePtr, int width, int heigth);
|
||||
private native int[] getPreferredVideoSize(long nativePtr);
|
||||
|
||||
private native void setRing(long nativePtr, String path);
|
||||
private native String getRing(long nativePtr);
|
||||
private native long[] listVideoPayloadTypes(long nativePtr);
|
||||
|
||||
|
||||
private static String TAG = "LinphoneCore";
|
||||
|
||||
|
|
@ -415,4 +416,17 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
public PayloadType[] listVideoCodecs() {
|
||||
long[] typesPtr = listVideoPayloadTypes(nativePtr);
|
||||
if (typesPtr == null) return null;
|
||||
|
||||
PayloadType[] codecs = new PayloadType[typesPtr.length];
|
||||
|
||||
for (int i=0; i < codecs.length; i++) {
|
||||
codecs[i] = new PayloadTypeImpl(typesPtr[i]);
|
||||
}
|
||||
|
||||
return codecs;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,10 +24,21 @@ class PayloadTypeImpl implements PayloadType {
|
|||
protected final long nativePtr;
|
||||
|
||||
private native String toString(long ptr);
|
||||
|
||||
private native String getMime(long ptr);
|
||||
private native int getRate(long ptr);
|
||||
|
||||
protected PayloadTypeImpl(long aNativePtr) {
|
||||
nativePtr = aNativePtr;
|
||||
}
|
||||
|
||||
public int getRate() {
|
||||
return getRate(nativePtr);
|
||||
}
|
||||
|
||||
public String getMime() {
|
||||
return getMime(nativePtr);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return toString(nativePtr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue