Added JNI methods for getting sent/received FPS in call params

This commit is contained in:
Sylvain Berfini 2017-05-29 11:12:45 +02:00
parent 07c37fdbc9
commit 57792f4014
3 changed files with 34 additions and 0 deletions

View file

@ -5101,6 +5101,16 @@ extern "C" jintArray Java_org_linphone_core_LinphoneCallParamsImpl_getReceivedVi
return arr;
}
extern "C" jfloat Java_org_linphone_core_LinphoneCallParamsImpl_getSentFramerate(JNIEnv *env, jobject thiz, jlong lcp) {
const LinphoneCallParams *params = (LinphoneCallParams *) lcp;
return (jfloat)linphone_call_params_get_sent_framerate(params);
}
extern "C" jfloat Java_org_linphone_core_LinphoneCallParamsImpl_getReceivedFramerate(JNIEnv *env, jobject thiz, jlong lcp) {
const LinphoneCallParams *params = (LinphoneCallParams *) lcp;
return (jfloat)linphone_call_params_get_received_framerate(params);
}
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_getAudioDirection(JNIEnv *env, jobject thiz, jlong ptr) {
return (jint)linphone_call_params_get_audio_direction((LinphoneCallParams *)ptr);
}

View file

@ -236,4 +236,16 @@ public interface LinphoneCallParams {
* @param dir The video stream direction associated with this call params.
**/
void setVideoDirection(MediaDirection dir);
/**
* Gets the FPS sent in a video call.
* @return the fps
*/
float getSentFramerate();
/**
* Gets the FPS received in a video call.
* @return the fps
*/
float getReceivedFramerate();
}

View file

@ -245,4 +245,16 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
public void setVideoDirection(MediaDirection direction) {
setVideoDirection(nativePtr, direction.mValue);
}
private native float getSentFramerate(long nativePtr);
@Override
public float getSentFramerate() {
return getSentFramerate(nativePtr);
}
private native float getReceivedFramerate(long nativePtr);
@Override
public float getReceivedFramerate() {
return getReceivedFramerate(nativePtr);
}
}