* macosx.m: MacOS X module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
- * $Id: macosx.m,v 1.21 2004/02/09 17:42:12 titer Exp $
+ * $Id: macosx.m,v 1.22 2004/02/26 13:04:55 hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
#define OPAQUENESS_LONGTEXT N_( \
"Set the transparency of the video output. 1 is non-transparent (default) " \
"0 is fully transparent.")
+
+#define STRETCH_TEXT N_("Stretch Aspect Ratio")
+#define STRETCH_LONGTEXT N_("Instead of keeping the aspect ratio " \
+ "of the movie when resizing the video, stretch the video " \
+ "to fill the entire window." )
#define OPENGL_TEXT N_("Use OpenGL")
#define OPENGL_LONGTEXT N_("Use OpenGL instead of QuickTime to " \
set_callbacks( E_(OpenVideo), E_(CloseVideo) );
add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
VLC_FALSE );
+ add_bool( "macosx-stretch", 0, NULL, STRETCH_TEXT, STRETCH_LONGTEXT,
+ VLC_FALSE );
add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL,
OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, VLC_TRUE );
add_bool( "macosx-opengl", 0, NULL, OPENGL_TEXT,
* vout.m: MacOS X video output module
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
- * $Id: vout.m,v 1.82 2004/02/25 19:27:23 titer Exp $
+ * $Id: vout.m,v 1.83 2004/02/26 13:04:55 hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
i_width = s_rect.right - s_rect.left;
i_height = s_rect.bottom - s_rect.top;
- if( i_height * p_vout->output.i_aspect < i_width * VOUT_ASPECT_FACTOR )
+ if( config_GetInt( p_vout, "macosx-stretch" ) )
+ {
+ factor_x = FixDiv( Long2Fix( i_width ),
+ Long2Fix( p_vout->output.i_width ) );
+ factor_y = FixDiv( Long2Fix( i_height ),
+ Long2Fix( p_vout->output.i_height ) );
+
+ }
+ else if( i_height * p_vout->output.i_aspect < i_width * VOUT_ASPECT_FACTOR )
{
int i_adj_width = i_height * p_vout->output.i_aspect /
VOUT_ASPECT_FACTOR;
ScaleMatrix( p_vout->p_sys->p_matrix,
factor_x, factor_y,
- Long2Fix(0), Long2Fix(0) );
-
- TranslateMatrix( p_vout->p_sys->p_matrix,
- Long2Fix(i_offset_x),
- Long2Fix(i_offset_y) );
-
+ Long2Fix(i_offset_x), Long2Fix(i_offset_y) );
}
/*****************************************************************************
(GLint) bounds.size.height );
/* Quad size is set in order to preserve the aspect ratio */
- if( bounds.size.height * p_vout->render.i_aspect <
+ if( config_GetInt( p_vout, "macosx-stretch" ) )
+ {
+ f_x = 1.0;
+ f_y = 1.0;
+ }
+ else if( bounds.size.height * p_vout->render.i_aspect <
bounds.size.width * VOUT_ASPECT_FACTOR )
{
f_x = bounds.size.height * p_vout->render.i_aspect /
[fullScreenContext makeCurrentContext];
unsigned width = CGDisplayPixelsWide( kCGDirectMainDisplay );
unsigned height = CGDisplayPixelsHigh( kCGDirectMainDisplay );
- if( height * p_vout->output.i_aspect < width * VOUT_ASPECT_FACTOR )
+
+ if( config_GetInt( p_vout, "macosx-stretch" ) )
+ {
+ f_x = 1.0;
+ f_y = 1.0;
+ }
+ else if( height * p_vout->output.i_aspect < width * VOUT_ASPECT_FACTOR )
{
f_x = (float) height * p_vout->output.i_aspect /
width / VOUT_ASPECT_FACTOR;