[vlc-commits] Make macosx vout module handle rotated movies.

Matthias Keiser git at videolan.org
Wed Mar 26 19:06:09 CET 2014


vlc | branch: master | Matthias Keiser <matthias at tristan-inc.com> | Fri Mar 14 01:00:08 2014 +0100| [4508f2745c7448f3a128e21152c564d8796fe5e1] | committer: David Fuhrmann

Make macosx vout module handle rotated movies.

Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4508f2745c7448f3a128e21152c564d8796fe5e1
---

 modules/video_output/macosx.m |   15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index f0ca190..4267310 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -213,7 +213,6 @@ static int Open (vlc_object_t *this)
     sys->gl.getProcAddress = OurGetProcAddress;
     sys->gl.sys = sys;
     const vlc_fourcc_t *subpicture_chromas;
-    video_format_t fmt = vd->fmt;
 
     sys->vgl = vout_display_opengl_New (&vd->fmt, &subpicture_chromas, &sys->gl);
     if (!sys->vgl) {
@@ -238,7 +237,7 @@ static int Open (vlc_object_t *this)
     vd->control = Control;
 
     /* */
-    vout_display_SendEventDisplaySize (vd, vd->source.i_visible_width, vd->source.i_visible_height, false);
+    vout_display_SendEventDisplaySize (vd, vd->fmt.i_visible_width, vd->fmt.i_visible_height, false);
 
     return VLC_SUCCESS;
 
@@ -784,16 +783,10 @@ static void OpenglSwap (vlc_gl_t *gl)
     if (b_inside) {
         @synchronized (self) {
             if (vd) {
-                vout_display_place_t place = vd->sys->place;
 
-                if (place.width > 0 && place.height > 0) {
-                    const int x = vd->source.i_x_offset +
-                    (int64_t)(ml.x - place.x) * vd->source.i_visible_width / place.width;
-                    const int y = vd->source.i_y_offset +
-                    (int64_t)((int)s_rect.size.height - (int)ml.y - place.y) * vd->source.i_visible_height / place.height;
-
-                    vout_display_SendEventMouseMoved (vd, x, y);
-                }
+                vout_display_SendMouseMovedDisplayCoordinates(vd, ORIENT_NORMAL,
+                                                              (int)ml.x, s_rect.size.height - (int)ml.y,
+                                                              &vd->sys->place);
             }
         }
     }



More information about the vlc-commits mailing list