Commit 57792f40 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

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

parent 07c37fdb
......@@ -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);
}
......
......@@ -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();
}
......@@ -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);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment