]> sjero.net Git - linphone/commitdiff
takeSnapshot and zoomVideo methods exported throught JNI
authorSylvain Berfini <Sylvain.Berfini@Belledonne-Communications.com>
Wed, 27 Jun 2012 08:16:00 +0000 (10:16 +0200)
committerSylvain Berfini <Sylvain.Berfini@Belledonne-Communications.com>
Wed, 27 Jun 2012 08:16:00 +0000 (10:16 +0200)
coreapi/linphonecore_jni.cc
java/common/org/linphone/core/LinphoneCall.java

index 79c7facf0a6107e83c00a61caa36cf93a4f27b74..3d59daffdfb424d77ecc1cf3045520b49089af59 100644 (file)
@@ -1199,6 +1199,19 @@ extern "C" jlong Java_org_linphone_core_LinphoneCallImpl_getCallLog(     JNIEnv*  en
        return (jlong)linphone_call_get_call_log((LinphoneCall*)ptr);
 }
 
+extern "C" void Java_org_linphone_core_LinphoneCallImpl_takeSnapshot(  JNIEnv*  env
+                                                                                                                                               ,jobject  thiz
+                                                                                                                                               ,jlong ptr, jstring path) {
+       const char* filePath = path != NULL ? env->GetStringUTFChars(path, NULL) : NULL;
+       linphone_call_take_video_snapshot((LinphoneCall*)ptr, filePath);
+}
+
+extern "C" void Java_org_linphone_core_LinphoneCallImpl_zoomVideo(             JNIEnv*  env
+                                                                                                                                               ,jobject  thiz
+                                                                                                                                               ,jlong ptr, jfloat zoomFactor, jfloat cx, jfloat cy) {
+       linphone_call_zoom_video((LinphoneCall*)ptr, zoomFactor, cx, cy);
+}
+
 extern "C" jboolean Java_org_linphone_core_LinphoneCallImpl_isIncoming(        JNIEnv*  env
                                                                                                                                                ,jobject  thiz
                                                                                                                                                ,jlong ptr) {
index 4d8e23d80cca0ff8c53abf666f1e7949ac03c7bb..c42ebb74019b6588240c2d7d2959f71f901b5394 100644 (file)
@@ -244,4 +244,14 @@ public interface LinphoneCall {
        boolean isInConference();
        
        float getPlayVolume();
+       
+       /**
+        * Take a photo of currently received video and write it into a jpeg file.
+        */
+       void takeSnapshot(String path);
+       
+       /**
+        * Scale the video by factor, and center it using cx,cy point
+        */
+       void zoomVideo(float factor, float cx, float cy);
 }