From 57a2bde8a22d52a8aa8d3bffeb18c8ebe88a4b5c Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Fri, 12 Nov 2010 09:03:10 +0100 Subject: [PATCH] implement enable video call java binding --- coreapi/linphonecore_jni.cc | 14 ++++++++++++ .../org/linphone/core/LinphoneCore.java | 22 +++++++++++++++++-- .../common/org/linphone/core/VideoWindow.java | 5 ----- mediastreamer2 | 2 +- 4 files changed, 35 insertions(+), 8 deletions(-) delete mode 100644 java/common/org/linphone/core/VideoWindow.java diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index d22edef61..cf2a99c06 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -562,6 +562,20 @@ extern "C" long Java_org_linphone_core_LinphoneCoreImpl_createChatRoom(JNIEnv* return (long)lResult; } +extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableVideo(JNIEnv* env + ,jobject thiz + ,jlong lc + ,jboolean vcap_enabled + ,jboolean display_enabled) { + linphone_core_enable_video((LinphoneCore*)lc, vcap_enabled,display_enabled); + +} +extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isVideoEnabled(JNIEnv* env + ,jobject thiz + ,jlong lc) { + return linphone_core_video_enabled((LinphoneCore*)lc); +} + //ProxyConfig extern "C" jlong Java_org_linphone_core_LinphoneProxyConfigImpl_newLinphoneProxyConfig(JNIEnv* env,jobject thiz) { diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 655f95f4d..e9471201d 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -372,6 +372,24 @@ public interface LinphoneCore { */ LinphoneChatRoom createChatRoom(String to); - public void setVideoWindow(VideoWindow w); - public void setPreviewWindow(VideoWindow w); + public void setVideoWindow(Object w); + public void setPreviewWindow(Object w); + /** + * Enables video globally. + * + * + * This function does not have any effect during calls. It just indicates #LinphoneCore to + * initiate future calls with video or not. The two boolean parameters indicate in which + * direction video is enabled. Setting both to false disables video entirely. + * + * @param vcap_enabled indicates whether video capture is enabled + * @param display_enabled indicates whether video display should be shown + * + **/ + void enableVideo(boolean vcap_enabled, boolean display_enabled); + /** + * Returns TRUE if video is enabled, FALSE otherwise. + * + ***/ + boolean isVideoEnabled(); } diff --git a/java/common/org/linphone/core/VideoWindow.java b/java/common/org/linphone/core/VideoWindow.java deleted file mode 100644 index d4a46b931..000000000 --- a/java/common/org/linphone/core/VideoWindow.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.linphone.core; - -public interface VideoWindow { - -} diff --git a/mediastreamer2 b/mediastreamer2 index ffacf5671..e59157a44 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit ffacf56718c198cb80a290f7a65975916d8a9b6b +Subproject commit e59157a44a7b6aa1f1fa756325047e98c2be3786