forked from mirrors/linphone-iphone
Add the setPreferredVideoSizeByName() method to LinphoneCore.
This commit is contained in:
parent
959334d742
commit
c852b3f8f7
3 changed files with 19 additions and 0 deletions
|
|
@ -2493,6 +2493,12 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPreferredVideoSize(JN
|
|||
linphone_core_set_preferred_video_size((LinphoneCore *)lc, vsize);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setPreferredVideoSizeByName(JNIEnv *env, jobject thiz, jlong lc, jstring jName) {
|
||||
const char* cName = env->GetStringUTFChars(jName, NULL);
|
||||
linphone_core_set_preferred_video_size_by_name((LinphoneCore *)lc, cName);
|
||||
env->ReleaseStringUTFChars(jName, cName);
|
||||
}
|
||||
|
||||
extern "C" jintArray Java_org_linphone_core_LinphoneCoreImpl_getPreferredVideoSize(JNIEnv *env, jobject thiz, jlong lc){
|
||||
MSVideoSize vsize = linphone_core_get_preferred_video_size((LinphoneCore *)lc);
|
||||
jintArray arr = env->NewIntArray(2);
|
||||
|
|
|
|||
|
|
@ -863,6 +863,14 @@ public interface LinphoneCore {
|
|||
*
|
||||
**/
|
||||
void setPreferredVideoSize(VideoSize vSize);
|
||||
/**
|
||||
* Sets the preferred video size giving a known size name.
|
||||
*
|
||||
* This applies only to the stream that is captured and sent to the remote party,
|
||||
* since we accept all standard video size on the receive path.
|
||||
* @param name A known video name (eg. vga or 720p)
|
||||
**/
|
||||
void setPreferredVideoSizeByName(String name);
|
||||
/**
|
||||
* get current preferred video size for sending.
|
||||
* @return video size
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native void setUploadBandwidth(long nativePtr, int bw);
|
||||
private native void setDownloadBandwidth(long nativePtr, int bw);
|
||||
private native void setPreferredVideoSize(long nativePtr, int width, int heigth);
|
||||
private native void setPreferredVideoSizeByName(long nativePtr, String name);
|
||||
private native int[] getPreferredVideoSize(long nativePtr);
|
||||
private native void setRing(long nativePtr, String path);
|
||||
private native String getRing(long nativePtr);
|
||||
|
|
@ -451,6 +452,10 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
setPreferredVideoSize(nativePtr, vSize.width, vSize.height);
|
||||
}
|
||||
|
||||
public synchronized void setPreferredVideoSizeByName(String name) {
|
||||
setPreferredVideoSizeByName(nativePtr, name);
|
||||
}
|
||||
|
||||
public synchronized VideoSize getPreferredVideoSize() {
|
||||
int[] nativeSize = getPreferredVideoSize(nativePtr);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue