]> git.sesse.net Git - vlc/commitdiff
* Finally fixed MacOS X aspect ratio. If you know how to center the
authorChristophe Massiot <massiot@videolan.org>
Wed, 17 Apr 2002 23:03:35 +0000 (23:03 +0000)
committerChristophe Massiot <massiot@videolan.org>
Wed, 17 Apr 2002 23:03:35 +0000 (23:03 +0000)
picture in the screen, and make the remaining space black instead of
white, PLEASE drop me a mail !

README - Mac OS X.rtf
plugins/macosx/macosx.h
plugins/macosx/vout_macosx.c

index 9132a3c68b838ae9c4114c318927875bbc308ba5..cbd753ca5c4dca38294667091c12adafbb281f15 100644 (file)
@@ -94,6 +94,12 @@ If VLC is slow on your G4 system, try and quit or hide all running applications.
 \f0\b0 \ulnone VLC doesn't support DivX or OpenDivX or MPEG-4 files at present. We are working on it too, but this isn't expected to happen in the near future.\
 \
 \
+
+\f1\b \ul 7. The fullscreen menu item has disappeared. This sucks !\
+
+\f0\b0 \ulnone The menu item has been temporarily removed for technical reasons. It doesn't mean that the feature has been removed. To turn on fullscreen mode, just hit 'f' in the video window. To go back to windowed mode, hit 'f' again.\
+\
+\
 Thanks for reading this file. For additional information, subscribe to the vlc mailing list on \ul http://www.videolan.org/.\ulnone \
 -- \
 Christophe Massiot <massiot@via.ecp.fr>, 6 Apr 2002, for the VideoLAN team.}
\ No newline at end of file
index 63e1b2f18971949d3db916a5e93646612b224199..266775729dcf40921a5caf03157bf816a54f2d9f 100644 (file)
@@ -2,7 +2,7 @@
  * macosx.h: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: macosx.h,v 1.5 2002/02/18 01:34:44 jlj Exp $
+ * $Id: macosx.h,v 1.6 2002/04/17 23:03:35 massiot Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Eugenio Jarosiewicz <ej0@cise.ufl.edu>
@@ -57,6 +57,7 @@ typedef struct vout_sys_s
     CGrafPtr p_qdport;
     ImageSequence i_seq;
     MatrixRecordPtr p_matrix;
+    Rect display_rect;
     DecompressorComponent img_dc;
     ImageDescriptionHandle h_img_descr;
 } vout_sys_t;
index 9e1357a39acf2b9000a555276bfce0eacc8b9136..648a8b159fa05b8eb90c99ce773a4f9b7d5ad540 100644 (file)
@@ -518,10 +518,37 @@ static void QTScaleMatrix( vout_thread_t *p_vout )
 
     GetPortBounds( p_vout->p_sys->p_qdport, &s_rect );
 
-    factor_x = FixDiv( Long2Fix( s_rect.right - s_rect.left ),
-                       Long2Fix( p_vout->output.i_width ) );
-    factor_y = FixDiv( Long2Fix( s_rect.bottom - s_rect.top ),
-                       Long2Fix( p_vout->output.i_height ) );
+    if( (s_rect.bottom - s_rect.top) * p_vout->render.i_aspect
+        < (s_rect.right - s_rect.left) * VOUT_ASPECT_FACTOR )
+    {
+        factor_x = FixDiv( Long2Fix( (s_rect.bottom - s_rect.top)
+                            * p_vout->render.i_aspect / VOUT_ASPECT_FACTOR ),
+                           Long2Fix( p_vout->render.i_width ) );
+        factor_y = FixDiv( Long2Fix( s_rect.bottom - s_rect.top ),
+                           Long2Fix( p_vout->render.i_height ) );
+#if 0
+        p_vout->p_sys->display_rect.top = 0;
+        p_vout->p_sys->display_rect.bottom = s_rect.bottom - s_rect.top;
+        p_vout->p_sys->display_rect.left = 12;
+        p_vout->p_sys->display_rect.right = 12 + (s_rect.bottom - s_rect.top)
+                            * p_vout->render.i_aspect / VOUT_ASPECT_FACTOR;
+#endif
+    }
+    else
+    {
+        factor_x = FixDiv( Long2Fix( s_rect.right - s_rect.left ),
+                           Long2Fix( p_vout->render.i_width ) );
+        factor_y = FixDiv( Long2Fix( (s_rect.right - s_rect.left)
+                            * VOUT_ASPECT_FACTOR / p_vout->render.i_aspect ),
+                           Long2Fix( p_vout->render.i_height ) );
+#if 0
+        p_vout->p_sys->display_rect.top = 12;
+        p_vout->p_sys->display_rect.bottom = 12 + (s_rect.right - s_rect.left)
+                            * VOUT_ASPECT_FACTOR / p_vout->render.i_aspect;
+        p_vout->p_sys->display_rect.left = 0;
+        p_vout->p_sys->display_rect.right = s_rect.right - s_rect.left;
+#endif
+    }
 
     SetIdentityMatrix( p_vout->p_sys->p_matrix );
     ScaleMatrix( p_vout->p_sys->p_matrix,