* ./src/interface/main.c: --desync now really accepts a value in ms.
* ./plugins/vcd/input_vcd.c: fixed a crash when not opening a VCD.
* ./src/video_output/vout_subpictures.c: fixed subtitles under BeOS and
other architectures which don't support overlay.
* Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: main.h,v 1.27 2001/12/30 07:09:54 sam Exp $
+ * $Id: main.h,v 1.28 2002/02/13 22:10:40 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
boolean_t b_audio; /* is audio output allowed ? */
boolean_t b_video; /* is video output allowed ? */
boolean_t b_ac3;
- int i_desync; /* relative desync of the audio ouput */
+ mtime_t i_desync; /* relative desync of the audio ouput */
/* Fast memcpy plugin used */
memcpy_module_t memcpy;
* aout_beos.cpp: BeOS audio output
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: aout_beos.cpp,v 1.19 2002/01/28 23:08:31 stef Exp $
+ * $Id: aout_beos.cpp,v 1.20 2002/02/13 22:10:40 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
}
/* Initialize some variables */
+ p_aout->i_format = AOUT_FORMAT_DEFAULT;
+ p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR,
+ AOUT_STEREO_DEFAULT );
+ p_aout->l_rate = main_GetIntVariable( AOUT_RATE_VAR, AOUT_RATE_DEFAULT );
+
p_aout->p_sys->p_format->frame_rate = 44100.0;
p_aout->p_sys->p_format->channel_count = p_aout->i_channels;
p_aout->p_sys->p_format->format = gs_audio_format::B_GS_S16;
* vout_beos.cpp: beos video output display method
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: vout_beos.cpp,v 1.39 2002/02/08 15:57:29 sam Exp $
+ * $Id: vout_beos.cpp,v 1.40 2002/02/13 22:10:40 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
static int BeosOpenDisplay( vout_thread_t *p_vout )
{
p_vout->p_sys->p_window = new VideoWindow(
- main_GetIntVariable( VOUT_WIDTH_VAR, VOUT_WIDTH_DEFAULT ) + 1,
- main_GetIntVariable( VOUT_HEIGHT_VAR, VOUT_HEIGHT_DEFAULT ) + 1,
+ main_GetIntVariable( VOUT_WIDTH_VAR, VOUT_WIDTH_DEFAULT ) - 1,
+ main_GetIntVariable( VOUT_HEIGHT_VAR, VOUT_HEIGHT_DEFAULT ) - 1,
p_vout );
if( p_vout->p_sys->p_window == NULL )
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: vpar_headers.c,v 1.12 2002/01/14 23:46:35 massiot Exp $
+ * $Id: vpar_headers.c,v 1.13 2002/02/13 22:10:40 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
{
intf_WarnMsg( 1, "vpar: no vout present, spawning one" );
+ vlc_mutex_unlock( &p_vout_bank->lock );
+
p_vpar->p_vout = vout_CreateThread(
NULL, p_vpar->sequence.i_width,
p_vpar->sequence.i_height,
if( p_vpar->p_vout == NULL )
{
intf_ErrMsg( "vpar error: can't open vout, aborting" );
- vlc_mutex_unlock( &p_vout_bank->lock );
-
p_vpar->p_fifo->b_error = 1;
return;
}
+ vlc_mutex_lock( &p_vout_bank->lock );
+
p_vout_bank->pp_vout[ p_vout_bank->i_count ] = p_vpar->p_vout;
p_vout_bank->i_count++;
}
p_input->b_error = 1;
return;
}
+ else if( p_vcd->nb_tracks <= 1 )
+ {
+ intf_ErrMsg( "input error: no movie tracks found" );
+ input_BuffersEnd( p_input->p_method_data );
+ free( p_vcd );
+ p_input->b_error = 1;
+ return;
+ }
p_vcd->p_sectors = ioctl_GetSectors( p_input->i_handle );
if ( p_vcd->p_sectors == NULL )
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: main.c,v 1.148 2002/02/06 20:44:23 gbazin Exp $
+ * $Id: main.c,v 1.149 2002/02/13 22:10:40 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
main_PutIntVariable( AOUT_VOLUME_VAR, atoi(optarg) );
break;
case OPT_DESYNC: /* --desync */
- p_main->i_desync = atoi(optarg);
+ p_main->i_desync = (mtime_t)atoi(optarg) * (mtime_t)1000;
break;
/* Video options */
* vout_pictures.c : picture management functions
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: vout_pictures.c,v 1.13 2002/02/08 15:57:29 sam Exp $
+ * $Id: vout_pictures.c,v 1.14 2002/02/13 22:10:40 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* displaying it if there are subtitles. */
if( p_subpic != NULL )
{
- //printf("memcpy (refcount != 0)\n");
/* We have subtitles. First copy the picture to
* the spare direct buffer, then render the
* subtitles. */
/* No subtitles, picture is in a directbuffer so
* we can display it directly even if it is still
* in use. */
- //printf("direct (refcount == 0)\n");
return p_pic;
}
/* Picture is in a direct buffer but isn't used by the
* decoder. We can safely render subtitles on it and
* display it. */
- //printf("direct (refcount == 0)\n");
vout_RenderSubPictures( p_vout, p_pic, p_subpic );
return p_pic;
/* Picture is not in a direct buffer, but is exactly the
* same size as the direct buffers. A memcpy() is enough,
* then render the subtitles. */
- //printf("memcpy (not a direct buffer)\n");
vout_CopyPicture( p_pic, PP_OUTPUTPICTURE[0] );
vout_RenderSubPictures( p_vout, PP_OUTPUTPICTURE[0], p_subpic );
/* This usually means software YUV, or hardware YUV with a
* different chroma. */
- /* XXX: render to the first direct buffer */
- //printf("render (not a direct buffer)\n");
- p_vout->chroma.pf_convert( p_vout, p_pic, &p_vout->p_picture[0] );
-
+ /* We render subtitles and convert image to the first direct buffer */
vout_RenderSubPictures( p_vout, p_pic, p_subpic );
+ p_vout->chroma.pf_convert( p_vout, p_pic, &p_vout->p_picture[0] );
return &p_vout->p_picture[0];
}
* vout_subpictures.c : subpicture management functions
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: vout_subpictures.c,v 1.6 2002/01/21 00:52:07 sam Exp $
+ * $Id: vout_subpictures.c,v 1.7 2002/02/13 22:10:40 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
/*****************************************************************************
* Local prototypes
*****************************************************************************/
-static void vout_RenderRGBSPU( const vout_thread_t *p_vout, picture_t *p_pic,
- const subpicture_t *p_spu );
-static void vout_RenderYUVSPU( const vout_thread_t *p_vout, picture_t *p_pic,
- const subpicture_t *p_spu );
+static void vout_RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic,
+ const subpicture_t *p_spu );
/* FIXME: fake palette - the real one has to be sought in the .IFO */
static int p_palette[4] = { 0x0000, 0x0000, 0xffff, 0x8888 };
switch( p_subpic->i_type )
{
case DVD_SUBPICTURE: /* DVD subpicture unit */
- vout_RenderRGBSPU( p_vout, p_pic, p_subpic );
- vout_RenderYUVSPU( p_vout, p_pic, p_subpic );
+ vout_RenderSPU( p_vout, p_pic, p_subpic );
break;
#if 0
return p_subpic;
}
+#if 0 /* code removed because we should use the FOURCC value instead */
/*****************************************************************************
* vout_RenderRGBSPU: draw an SPU on a picture
*****************************************************************************
static void vout_RenderRGBSPU( const vout_thread_t *p_vout, picture_t *p_pic,
const subpicture_t *p_spu )
{
-#if 0
int i_len, i_color;
u16 *p_source = (u16 *)p_spu->p_data;
}
}
}
-#endif
}
+#endif
/*****************************************************************************
- * vout_RenderYUVSPU: draw an SPU on an YUV overlay
+ * vout_RenderSPU: draw an SPU on an YUV overlay
*****************************************************************************
* This is a fast implementation of the subpicture drawing code. The data
* has been preprocessed once in spu_decoder.c, so we don't need to parse the
* RLE buffer again and again. Most sanity checks are done in spu_decoder.c
* so that this routine can be as fast as possible.
*****************************************************************************/
-static void vout_RenderYUVSPU( const vout_thread_t *p_vout, picture_t *p_pic,
- const subpicture_t *p_spu )
+static void vout_RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic,
+ const subpicture_t *p_spu )
{
int i_len, i_color;
u16 *p_source = (u16 *)p_spu->p_data;