]> sjero.net Git - linphone/commitdiff
zoom: float to float* so the app can know about zoom limits
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@linphone.org>
Thu, 26 Apr 2012 13:30:08 +0000 (15:30 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@linphone.org>
Thu, 26 Apr 2012 13:30:47 +0000 (15:30 +0200)
coreapi/linphonecore.c
coreapi/linphonecore.h
mediastreamer2

index a7ccef4025dbddc8c233cae2f09cb4fad1d718b6..a8440a63daf3b887a4011ccd9729025d8e15a91c 100644 (file)
@@ -4782,7 +4782,7 @@ void linphone_core_init_default_params(LinphoneCore*lc, LinphoneCallParams *para
        params->in_conference=FALSE;
 }
 
-void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float cx, float cy) {
+void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy) {
     VideoStream* vstream = call->videostream;
     float zoom[3];
     
@@ -4790,18 +4790,18 @@ void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float cx, f
         zoom_factor = 1;
     float halfsize = 0.5 * 1.0 / zoom_factor;
     
-    if ((cx - halfsize) < 0)
-        cx = 0 + halfsize;
-    if ((cx + halfsize) > 1)
-        cx = 1 - halfsize;
-    if ((cy - halfsize) < 0)
-        cy = 0 + halfsize;
-    if ((cy + halfsize) > 1)
-        cy = 1 - halfsize;
+    if ((*cx - halfsize) < 0)
+        *cx = 0 + halfsize;
+    if ((*cx + halfsize) > 1)
+        *cx = 1 - halfsize;
+    if ((*cy - halfsize) < 0)
+        *cy = 0 + halfsize;
+    if ((*cy + halfsize) > 1)
+        *cy = 1 - halfsize;
     
     zoom[0] = zoom_factor;
-    zoom[1] = cx;
-    zoom[2] = cy;
+    zoom[1] = *cx;
+    zoom[2] = *cy;
     ms_filter_call_method(vstream->output, MS_VIDEO_DISPLAY_ZOOM, &zoom);
 }
 
index d3a514a69141e24410f7780a59a94ac472631d14..bd10556a054e6925a98e9644819e85b81e2e248d 100644 (file)
@@ -1134,7 +1134,7 @@ typedef struct LinphoneTunnel LinphoneTunnel;
 */
 LinphoneTunnel *linphone_core_get_tunnel(LinphoneCore *lc);
     
-    void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float cx, float cy);
+void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy);
 
 #ifdef __cplusplus
 }
index 43c1923468d962aa5577ebcf6d8674ef9d426e40..37474c877a7f4e1c458c6f9edf1302e75d929dd1 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 43c1923468d962aa5577ebcf6d8674ef9d426e40
+Subproject commit 37474c877a7f4e1c458c6f9edf1302e75d929dd1