Commit 695669c9 authored by Sam Hocevar's avatar Sam Hocevar

(new in MAIN)

  * ./plugins/dvd/dvd_es.c, ./plugins/satellite/input_satellite.c,
    ./plugins/dvdread/input_dvdread.c: updated outdated variable names.
(ported from 0_4_1_branch)
  * ./plugins/spudec/spu_decoder.c: fixed a margin bug in the SPU renderer
    which caused subtitles to appear slanted in odd width windows.
parent 9d64d522
......@@ -4,6 +4,8 @@
HEAD
* ./plugins/dvd/dvd_es.c, ./plugins/satellite/input_satellite.c,
./plugins/dvdread/input_dvdread.c: updated outdated variable names.
* ./src/playlist/playlist.c, src/input/input.c: added safety checks to
prevent crashes on next file.
* ./src/misc/objects.c: commented all functions.
......@@ -34,6 +36,8 @@ HEAD
0.4.1
Not released yet
* ./plugins/spudec/spu_decoder.c: fixed a margin bug in the SPU renderer
which caused subtitles to appear slanted in odd width windows.
* ./plugins/gtk/gtk_display.c, ./plugins/win32/mainframe.cpp: we deactivate
popup menus when no stream is being played, even in network mode.
* ./src/input/mpeg_system.c: removed unnecessarily verbose message.
......
/* 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: Stphane Borel <stef@via.ecp.fr>
*
......@@ -255,13 +255,13 @@ void DVDLaunchDecoders( input_thread_t * p_input )
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" );
......@@ -295,7 +295,7 @@ void DVDLaunchDecoders( input_thread_t * p_input )
}
/* 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" );
......
......@@ -6,7 +6,7 @@
* 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: Stphane Borel <stef@via.ecp.fr>
*
......@@ -1204,12 +1204,12 @@ static void DvdReadLauchDecoders( input_thread_t * p_input )
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" );
......@@ -1244,7 +1244,7 @@ static void DvdReadLauchDecoders( input_thread_t * p_input )
}
}
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" );
......
......@@ -409,7 +409,7 @@ int SatelliteSetProgram( input_thread_t * p_input,
{
case MPEG1_VIDEO_ES:
case MPEG2_VIDEO_ES:
if ( !config_GetInt( p_input, "novideo" ) )
if ( config_GetInt( p_input, "video" ) )
{
ioctl_SetDMXFilter( p_es->i_id, &p_es->i_demux_fd, 1);
input_SelectES( p_input , p_es );
......@@ -417,7 +417,7 @@ int SatelliteSetProgram( input_thread_t * p_input,
break;
case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES:
if ( !config_GetInt( p_input, "noaudio" ) )
if ( config_GetInt( p_input, "audio" ) )
{
ioctl_SetDMXFilter( p_es->i_id, &p_es->i_demux_fd, 2);
input_SelectES( p_input , p_es );
......
......@@ -2,7 +2,7 @@
* 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>
......@@ -884,6 +884,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
/* 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++ )
{
......@@ -900,7 +901,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
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 ; )
......@@ -912,7 +913,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
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 ; )
......@@ -948,8 +949,8 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
}
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 ; )
......@@ -966,7 +967,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
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 ],
......@@ -979,7 +980,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
/* 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 ],
......@@ -1015,7 +1016,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
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 ; )
......@@ -1027,7 +1028,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
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 ; )
......@@ -1061,8 +1062,8 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
}
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 ; )
......@@ -1079,7 +1080,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
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 ],
......@@ -1092,7 +1093,7 @@ static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic,
/* 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 ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment