Commit 1b78b453 authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Added LinphoneCall's setVideoWindowId method in JNI wrapper

parent 78824b02
......@@ -7846,6 +7846,21 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallImpl_setListener(JNIEn
linphone_call_set_next_video_frame_decoded_callback(call, _next_video_frame_decoded_callback, listener);
extern "C" void Java_org_linphone_core_LinphoneCallImpl_setVideoWindowId(JNIEnv* env
,jobject thiz
,jlong lc
,jobject obj) {
jobject oldWindow = (jobject) linphone_call_get_native_video_window_id((LinphoneCall*)lc);
if (obj != NULL) {
obj = env->NewGlobalRef(obj);
ms_message("Java_org_linphone_core_LinphoneCallImpl_setVideoWindowId(): NewGlobalRef(%p)",obj);
}else ms_message("Java_org_linphone_core_LinphoneCallImpl_setVideoWindowId(): setting to NULL");
linphone_call_set_native_video_window_id((LinphoneCall*)lc,(void *)obj);
if (oldWindow != NULL) {
ms_message("Java_org_linphone_core_LinphoneCallImpl_setVideoWindowId(): DeleteGlobalRef(%p)",oldWindow);
* returns the java TunnelConfig associated with a C LinphoneTunnelConfig.
......@@ -20,6 +20,8 @@ package org.linphone.core;
import java.util.Vector;
* Object representing a call. Calls are created using {@link LinphoneCore#invite(LinphoneAddress)} or passed to the application by listener {@link LinphoneCoreListener#callState}
......@@ -404,6 +406,13 @@ public interface LinphoneCall {
void setListener(LinphoneCall.LinphoneCallListener listener);
* Set the native video window id where the video is to be displayed.
* On Android, it must be of type {@link AndroidVideoWindowImpl}
* @param w window of type {@link AndroidVideoWindowImpl}
void setVideoWindow(Object w);
* Indicates if remote party requested automatic answering to be performed.
* This is an indication - the application remains responsible for answering the call.
......@@ -45,6 +45,7 @@ class LinphoneCallImpl implements LinphoneCall {
private native float getAverageQuality(long nativePtr);
private native boolean mediaInProgress(long nativePtr);
private native void setListener(long ptr, LinphoneCallListener listener);
private native void setVideoWindowId(long nativePtr, Object wid);
native private long getDiversionAddress(long nativePtr);
native private Object getStats(long nativePtr, int stream_type);
native private LinphoneCore getCore(long nativePtr);
......@@ -295,6 +296,11 @@ class LinphoneCallImpl implements LinphoneCall {
setListener(nativePtr, listener);
public synchronized void setVideoWindow(Object w) {
setVideoWindowId(nativePtr, w);
public LinphoneAddress getDiversionAddress() {
long lNativePtr = getDiversionAddress(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