From 43cfba30a841d8b2cf97252888374c0dd6bb2831 Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Wed, 26 Sep 2001 12:32:25 +0000 Subject: [PATCH] By default, use the real size of the stream for the video output size. --- configure.in | 4 +-- include/video_output.h | 4 +-- plugins/beos/vout_beos.cpp | 6 +--- plugins/sdl/vout_sdl.c | 8 ++---- plugins/x11/vout_x11.c | 10 ++----- plugins/x11/vout_xvideo.c | 8 ++---- src/spu_decoder/spu_decoder.c | 4 +-- src/video_decoder/vpar_headers.c | 5 ++-- src/video_output/video_output.c | 48 ++++++++++++++++++-------------- 9 files changed, 46 insertions(+), 51 deletions(-) diff --git a/configure.in b/configure.in index 6981997f7b..d02a0d66e9 100644 --- a/configure.in +++ b/configure.in @@ -120,10 +120,10 @@ void foo() { int meuh; ntohl(meuh); }],, AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) dnl Check for inline function size limit -CFLAGS="${save_CFLAGS} -finline-limit-20000" +CFLAGS="${save_CFLAGS} -finline-limit-30000" AC_MSG_CHECKING([if \$CC accepts -finline-limit]) AC_TRY_COMPILE([],, - save_CFLAGS="${save_CFLAGS} -finline-limit-20000"; AC_MSG_RESULT(yes), + save_CFLAGS="${save_CFLAGS} -finline-limit-30000"; AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) dnl Check for Darwin plugin linking flags diff --git a/include/video_output.h b/include/video_output.h index 4c7bcfa970..1d236417d3 100644 --- a/include/video_output.h +++ b/include/video_output.h @@ -5,7 +5,7 @@ * thread, and destroy a previously oppenned video output thread. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: video_output.h,v 1.61 2001/05/30 17:03:11 sam Exp $ + * $Id: video_output.h,v 1.62 2001/09/26 12:32:25 massiot Exp $ * * Authors: Vincent Seguin * @@ -278,7 +278,7 @@ typedef struct vout_thread_s void vout_InitBank ( void ); void vout_EndBank ( void ); -vout_thread_t * vout_CreateThread ( int *pi_status ); +vout_thread_t * vout_CreateThread ( int *pi_status, int i_width, int i_height ); void vout_DestroyThread ( vout_thread_t *p_vout, int *pi_status ); vout_fifo_t * vout_CreateFifo ( void ); diff --git a/plugins/beos/vout_beos.cpp b/plugins/beos/vout_beos.cpp index 3031996b3b..625852f3aa 100644 --- a/plugins/beos/vout_beos.cpp +++ b/plugins/beos/vout_beos.cpp @@ -2,7 +2,7 @@ * vout_beos.cpp: beos video output display method ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: vout_beos.cpp,v 1.29 2001/09/12 01:30:07 tcastley Exp $ + * $Id: vout_beos.cpp,v 1.30 2001/09/26 12:32:25 massiot Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -350,10 +350,6 @@ int vout_Create( vout_thread_t *p_vout ) } /* Set video window's size */ - p_vout->i_width = main_GetIntVariable( VOUT_WIDTH_VAR, - VOUT_WIDTH_DEFAULT ); - p_vout->i_height = main_GetIntVariable( VOUT_HEIGHT_VAR, - VOUT_HEIGHT_DEFAULT ); p_vout->b_scale = true; intf_Msg("Initial Width: %d Height: %d", diff --git a/plugins/sdl/vout_sdl.c b/plugins/sdl/vout_sdl.c index 39c826b8c1..ec21d18476 100644 --- a/plugins/sdl/vout_sdl.c +++ b/plugins/sdl/vout_sdl.c @@ -2,7 +2,7 @@ * vout_sdl.c: SDL video output display method ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vout_sdl.c,v 1.62 2001/08/06 20:45:55 gbazin Exp $ + * $Id: vout_sdl.c,v 1.63 2001/09/26 12:32:25 massiot Exp $ * * Authors: Samuel Hocevar * Pierre Baillet @@ -193,10 +193,8 @@ static int vout_Create( vout_thread_t *p_vout ) VOUT_FULLSCREEN_DEFAULT ); p_vout->p_sys->b_overlay = main_GetIntVariable( VOUT_OVERLAY_VAR, VOUT_OVERLAY_DEFAULT ); - p_vout->p_sys->i_width = main_GetIntVariable( VOUT_WIDTH_VAR, - VOUT_WIDTH_DEFAULT ); - p_vout->p_sys->i_height = main_GetIntVariable( VOUT_HEIGHT_VAR, - VOUT_HEIGHT_DEFAULT ); + p_vout->p_sys->i_width = p_vout->i_width; + p_vout->p_sys->i_height = p_vout->i_height; p_vout->p_sys->p_display = NULL; p_vout->p_sys->p_overlay = NULL; diff --git a/plugins/x11/vout_x11.c b/plugins/x11/vout_x11.c index 555e7aa4f5..9b98c076e2 100644 --- a/plugins/x11/vout_x11.c +++ b/plugins/x11/vout_x11.c @@ -2,7 +2,7 @@ * vout_x11.c: X11 video output display method ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vout_x11.c,v 1.30 2001/08/03 16:04:17 gbazin Exp $ + * $Id: vout_x11.c,v 1.31 2001/09/26 12:32:25 massiot Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -794,12 +794,8 @@ static int X11CreateWindow( vout_thread_t *p_vout ) else { /* Set main window's size */ - p_vout->p_sys->i_width = main_GetIntVariable( VOUT_WIDTH_VAR, - VOUT_WIDTH_DEFAULT ); - p_vout->p_sys->i_height = main_GetIntVariable( VOUT_HEIGHT_VAR, - VOUT_HEIGHT_DEFAULT ); - p_vout->i_width = p_vout->p_sys->i_width; - p_vout->i_height = p_vout->p_sys->i_height; + p_vout->p_sys->i_width = p_vout->i_width; + p_vout->p_sys->i_height = p_vout->i_height; } /* Prepare window manager hints and properties */ diff --git a/plugins/x11/vout_xvideo.c b/plugins/x11/vout_xvideo.c index e6c0a798ce..4a1636e29a 100644 --- a/plugins/x11/vout_xvideo.c +++ b/plugins/x11/vout_xvideo.c @@ -2,7 +2,7 @@ * vout_xvideo.c: Xvideo video output display method ***************************************************************************** * Copyright (C) 1998, 1999, 2000, 2001 VideoLAN - * $Id: vout_xvideo.c,v 1.26 2001/08/22 14:23:57 sam Exp $ + * $Id: vout_xvideo.c,v 1.27 2001/09/26 12:32:25 massiot Exp $ * * Authors: Shane Harper * Vincent Seguin @@ -802,10 +802,8 @@ static int XVideoCreateWindow( vout_thread_t *p_vout ) } else { - p_vout->p_sys->i_window_width = main_GetIntVariable( VOUT_WIDTH_VAR, - VOUT_WIDTH_DEFAULT ); - p_vout->p_sys->i_window_height = main_GetIntVariable( VOUT_HEIGHT_VAR, - VOUT_HEIGHT_DEFAULT ); + p_vout->p_sys->i_window_width = p_vout->i_width; + p_vout->p_sys->i_window_height = p_vout->i_height; } /* Prepare window manager hints and properties */ diff --git a/src/spu_decoder/spu_decoder.c b/src/spu_decoder/spu_decoder.c index 09949ef6b5..be9b49f949 100644 --- a/src/spu_decoder/spu_decoder.c +++ b/src/spu_decoder/spu_decoder.c @@ -2,7 +2,7 @@ * spu_decoder.c : spu decoder thread ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: spu_decoder.c,v 1.48 2001/08/06 13:13:06 sam Exp $ + * $Id: spu_decoder.c,v 1.49 2001/09/26 12:32:25 massiot Exp $ * * Authors: Samuel Hocevar * @@ -96,7 +96,7 @@ vlc_thread_t spudec_CreateThread( vdec_config_t * p_config ) { intf_WarnMsg( 1, "spudec: no vout present, spawning one" ); - p_spudec->p_vout = vout_CreateThread( NULL ); + p_spudec->p_vout = vout_CreateThread( NULL, 0, 0 ); /* Everything failed */ if( p_spudec->p_vout == NULL ) diff --git a/src/video_decoder/vpar_headers.c b/src/video_decoder/vpar_headers.c index f4d8e2c746..2f410aba8e 100644 --- a/src/video_decoder/vpar_headers.c +++ b/src/video_decoder/vpar_headers.c @@ -2,7 +2,7 @@ * vpar_headers.c : headers parsing ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: vpar_headers.c,v 1.8 2001/09/06 13:16:26 massiot Exp $ + * $Id: vpar_headers.c,v 1.9 2001/09/26 12:32:25 massiot Exp $ * * Authors: Christophe Massiot * Stéphane Borel @@ -419,7 +419,8 @@ static void SequenceHeader( vpar_thread_t * p_vpar ) { intf_WarnMsg( 1, "vpar: no vout present, spawning one" ); - p_vpar->p_vout = vout_CreateThread( NULL ); + p_vpar->p_vout = vout_CreateThread( NULL, p_vpar->sequence.i_width, + p_vpar->sequence.i_height ); /* Everything failed */ if( p_vpar->p_vout == NULL ) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index d19e3db4e3..6ccd6756e8 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -5,7 +5,7 @@ * thread, and destroy a previously oppened video output thread. ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: video_output.c,v 1.139 2001/09/25 11:46:14 massiot Exp $ + * $Id: video_output.c,v 1.140 2001/09/26 12:32:25 massiot Exp $ * * Authors: Vincent Seguin * @@ -120,7 +120,7 @@ void vout_EndBank ( void ) * If pi_status is NULL, then the function will block until the thread is ready. * If not, it will be updated using one of the THREAD_* constants. *****************************************************************************/ -vout_thread_t * vout_CreateThread ( int *pi_status ) +vout_thread_t * vout_CreateThread ( int *pi_status, int i_width, int i_height ) { vout_thread_t * p_vout; /* thread descriptor */ int i_status; /* thread status */ @@ -174,26 +174,32 @@ vout_thread_t * vout_CreateThread ( int *pi_status ) /* Initialize some fields used by the system-dependant method - these * fields will probably be modified by the method, and are only * preferences */ - p_vout->i_changes = 0; - p_vout->i_width = main_GetIntVariable( VOUT_WIDTH_VAR, - VOUT_WIDTH_DEFAULT ); - p_vout->i_height = main_GetIntVariable( VOUT_HEIGHT_VAR, - VOUT_HEIGHT_DEFAULT ); - p_vout->i_bytes_per_line = p_vout->i_width * 2; - p_vout->i_screen_depth = main_GetIntVariable( VOUT_DEPTH_VAR, + p_vout->i_changes = 0; + p_vout->i_width = main_GetIntVariable( VOUT_WIDTH_VAR, 0 ); + if( !p_vout->i_width ) + { + p_vout->i_width = i_width ? i_width : VOUT_WIDTH_DEFAULT; + } + p_vout->i_height = main_GetIntVariable( VOUT_HEIGHT_VAR, 0 ); + if( !p_vout->i_height ) + { + p_vout->i_height = i_height ? i_height : VOUT_HEIGHT_DEFAULT; + } + p_vout->i_bytes_per_line = p_vout->i_width * 2; + p_vout->i_screen_depth = main_GetIntVariable( VOUT_DEPTH_VAR, VOUT_DEPTH_DEFAULT ); - p_vout->i_bytes_per_pixel = 2; - p_vout->f_gamma = VOUT_GAMMA_DEFAULT; // FIXME: replace with - // variable - p_vout->b_need_render = 1; - p_vout->b_YCbr = 0; - - p_vout->b_grayscale = main_GetIntVariable( VOUT_GRAYSCALE_VAR, - VOUT_GRAYSCALE_DEFAULT ); - p_vout->b_info = 0; - p_vout->b_interface = 0; - p_vout->b_scale = 1; - p_vout->b_fullscreen = main_GetIntVariable( VOUT_FULLSCREEN_VAR, + p_vout->i_bytes_per_pixel = 2; + p_vout->f_gamma = VOUT_GAMMA_DEFAULT; // FIXME: replace with + // variable + p_vout->b_need_render = 1; + p_vout->b_YCbr = 0; + + p_vout->b_grayscale = main_GetIntVariable( VOUT_GRAYSCALE_VAR, + VOUT_GRAYSCALE_DEFAULT ); + p_vout->b_info = 0; + p_vout->b_interface = 0; + p_vout->b_scale = 1; + p_vout->b_fullscreen = main_GetIntVariable( VOUT_FULLSCREEN_VAR, VOUT_FULLSCREEN_DEFAULT ); intf_WarnMsg( 3, "vout info: asking for %dx%d, %d/%d bpp (%d Bpl)",