Add getPlayer() method to LinphoneCore class

This commit is contained in:
François Grisez 2014-10-17 13:38:37 +02:00
parent 54e6f89dac
commit 9e55c63875
3 changed files with 17 additions and 0 deletions

View file

@ -2445,6 +2445,10 @@ extern "C" jfloat Java_org_linphone_core_LinphoneCallImpl_getAverageQuality( JNI
return (jfloat)linphone_call_get_average_quality((LinphoneCall*)ptr);
}
extern "C" jlong Java_org_linphone_core_LinphoneCallImpl_getPlayer(JNIEnv *env, jobject thiz, jlong callPtr) {
return (jlong)linphone_call_get_player((LinphoneCall *)callPtr);
}
//LinphoneFriend
extern "C" jlong Java_org_linphone_core_LinphoneFriendImpl_newLinphoneFriend(JNIEnv* env
,jobject thiz

View file

@ -333,4 +333,11 @@ public interface LinphoneCall {
* @return an Object.
*/
Object getUserData();
/**
* Get a call player
* Call player enable to stream a media file through a call
* @return A player
*/
public LinphonePlayer getPlayer();
}

View file

@ -245,4 +245,10 @@ class LinphoneCallImpl implements LinphoneCall {
public Object getUserData() {
return userData;
}
private native long getPlayer(long callPtr);
@Override
public LinphonePlayer getPlayer() {
return new LinphonePlayerImpl(getPlayer(nativePtr));
}
}