/* dvd_es.c: functions to find and select ES
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_es.c,v 1.12 2002/06/01 12:31:58 sam Exp $
+ * $Id: dvd_es.c,v 1.13 2002/06/02 13:49:35 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
p_dvd = (thread_dvd_data_t*)(p_input->p_access_data);
/* Select Video stream (always 0) */
- if( !config_GetInt( p_input, "novideo" ) )
+ if( config_GetInt( p_input, "video" ) )
{
input_SelectES( p_input, p_input->stream.pp_es[0] );
}
/* Select audio stream */
- if( p_dvd->i_audio_nb > 0 && !config_GetInt( p_input, "noaudio" ) )
+ if( p_dvd->i_audio_nb > 0 && config_GetInt( p_input, "audio" ) )
{
/* For audio: first one if none or a not existing one specified */
i_audio = config_GetInt( p_input, "audio-channel" );
}
/* Select subtitle */
- if( p_dvd->i_spu_nb > 0 && !config_GetInt( p_input, "novideo" ) )
+ if( p_dvd->i_spu_nb > 0 && config_GetInt( p_input, "video" ) )
{
/* for spu, default is none */
i_spu = config_GetInt( p_input, "spu-channel" );
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: input_dvdread.c,v 1.39 2002/06/01 12:31:59 sam Exp $
+ * $Id: input_dvdread.c,v 1.40 2002/06/02 13:49:35 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
p_dvd = (thread_dvd_data_t*)(p_input->p_access_data);
- if( !config_GetInt( p_input, "novideo" ) )
+ if( config_GetInt( p_input, "video" ) )
{
input_SelectES( p_input, p_input->stream.pp_es[0] );
}
- if( !config_GetInt( p_input, "noaudio" ) )
+ if( config_GetInt( p_input, "audio" ) )
{
/* For audio: first one if none or a not existing one specified */
int i_audio = config_GetInt( p_input, "audio-channel" );
}
}
- if( !config_GetInt( p_input, "novideo" ) )
+ if( config_GetInt( p_input, "video" ) )
{
/* for spu, default is none */
int i_spu = config_GetInt( p_input, "spu-channel" );
* spu_decoder.c : spu decoder thread
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: spu_decoder.c,v 1.25 2002/06/01 12:32:00 sam Exp $
+ * $Id: spu_decoder.c,v 1.26 2002/06/02 13:49:35 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Rudolf Cornelissen <rag.cornelissen@inter.nl.net>
/* RV16 target, scaling */
case FOURCC_RV16:
+ /* XXX: this is a COMPLETE HACK, memcpy is unable to do u16s anyway */
/* FIXME: get this from the DVD */
for( i_color = 0; i_color < 4; i_color++ )
{
p_dest = p_pic->p->p_pixels + ( i_width >> 6 ) * 2
/* Add the picture coordinates and the SPU coordinates */
+ ( (p_spu->i_x * i_xscale) >> 6 ) * 2
- + ( (p_spu->i_y * i_yscale) >> 6 ) * p_vout->output.i_width * 2;
+ + ( (p_spu->i_y * i_yscale) >> 6 ) * p_pic->p->i_pitch;
/* Draw until we reach the bottom of the subtitle */
for( i_y = 0 ; i_y < i_height ; )
if( i_ytmp + 1 >= ( i_y >> 6 ) )
{
/* Just one line : we precalculate i_y >> 6 */
- i_yreal = p_vout->output.i_width * 2 * i_ytmp;
+ i_yreal = p_pic->p->i_pitch * i_ytmp;
/* Draw until we reach the end of the line */
for( i_x = i_width ; i_x ; )
}
else
{
- i_yreal = p_vout->output.i_width * 2 * i_ytmp;
- i_ynext = p_vout->output.i_width * 2 * i_y >> 6;
+ i_yreal = p_pic->p->i_pitch * i_ytmp;
+ i_ynext = p_pic->p->i_pitch * i_y >> 6;
/* Draw until we reach the end of the line */
for( i_x = i_width ; i_x ; )
case 0x0f:
i_len = i_xscale * ( *p_source++ >> 2 );
for( i_ytmp = i_yreal ; i_ytmp < i_ynext ;
- i_ytmp += p_vout->output.i_width * 2 )
+ i_ytmp += p_pic->p->i_pitch )
{
memset( p_dest - 2 * ( i_x >> 6 ) + i_ytmp,
p_clut16[ i_color ],
/* FIXME: we should do transparency */
i_len = i_xscale * ( *p_source++ >> 2 );
for( i_ytmp = i_yreal ; i_ytmp < i_ynext ;
- i_ytmp += p_vout->output.i_width * 2 )
+ i_ytmp += p_pic->p->i_pitch )
{
memset( p_dest - 2 * ( i_x >> 6 ) + i_ytmp,
p_clut16[ i_color ],
p_dest = p_pic->p->p_pixels + ( i_width >> 6 ) * 4
/* Add the picture coordinates and the SPU coordinates */
+ ( (p_spu->i_x * i_xscale) >> 6 ) * 4
- + ( (p_spu->i_y * i_yscale) >> 6 ) * p_vout->output.i_width * 4;
+ + ( (p_spu->i_y * i_yscale) >> 6 ) * p_pic->p->i_pitch;
/* Draw until we reach the bottom of the subtitle */
for( i_y = 0 ; i_y < i_height ; )
if( i_ytmp + 1 >= ( i_y >> 6 ) )
{
/* Just one line : we precalculate i_y >> 6 */
- i_yreal = p_vout->output.i_width * 4 * i_ytmp;
+ i_yreal = p_pic->p->i_pitch * i_ytmp;
/* Draw until we reach the end of the line */
for( i_x = i_width ; i_x ; )
}
else
{
- i_yreal = p_vout->output.i_width * 4 * i_ytmp;
- i_ynext = p_vout->output.i_width * 4 * i_y >> 6;
+ i_yreal = p_pic->p->i_pitch * i_ytmp;
+ i_ynext = p_pic->p->i_pitch * i_y >> 6;
/* Draw until we reach the end of the line */
for( i_x = i_width ; i_x ; )
case 0x0f:
i_len = i_xscale * ( *p_source++ >> 2 );
for( i_ytmp = i_yreal ; i_ytmp < i_ynext ;
- i_ytmp += p_vout->output.i_width * 4 )
+ i_ytmp += p_pic->p->i_pitch )
{
memset( p_dest - 4 * ( i_x >> 6 ) + i_ytmp,
p_clut32[ i_color ],
/* FIXME: we should do transparency */
i_len = i_xscale * ( *p_source++ >> 2 );
for( i_ytmp = i_yreal ; i_ytmp < i_ynext ;
- i_ytmp += p_vout->output.i_width * 4 )
+ i_ytmp += p_pic->p->i_pitch )
{
memset( p_dest - 4 * ( i_x >> 6 ) + i_ytmp,
p_clut32[ i_color ],