1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-04 09:11:33 +02:00

* mux_rate parsing ;

* Changed video decoder's error messages into warnings.
This commit is contained in:
Christophe Massiot 2001-02-19 19:08:59 +00:00
parent ef54efe5dd
commit 33f6628a44
7 changed files with 40 additions and 29 deletions

View File

@ -4,7 +4,7 @@
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.21 2001/02/19 03:12:26 stef Exp $
* $Id: input_ext-intf.h,v 1.22 2001/02/19 19:08:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
@ -153,6 +153,8 @@ typedef struct stream_descriptor_s
* (in arbitrary units) */
off_t i_seek; /* next requested location (changed
* by the interface thread */
u32 i_mux_rate; /* the rate we read the stream (in
* units of 50 bytes/s) ; 0 if undef */
/* For DVD streams: */
int i_title_nb;

View File

@ -2,7 +2,7 @@
* vdec_motion_common.c : common motion compensation routines common
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vdec_motion_common.c,v 1.3 2001/02/13 13:01:14 massiot Exp $
* $Id: vdec_motion_common.c,v 1.4 2001/02/19 19:08:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
@ -209,7 +209,7 @@ static __inline__ void Motion420(
+ (i_mv_y >> 1) * i_l_stride;
if( i_source_offset >= p_source->i_width * p_source->i_height )
{
intf_ErrMsg( "vdec error: bad motion vector (lum)" );
intf_WarnMsg( 2, "Bad motion vector (lum)" );
return;
}
@ -236,7 +236,7 @@ static __inline__ void Motion420(
+ ((i_mv_y/2) >> 1) * i_c_stride;
if( i_source_offset >= (p_source->i_width * p_source->i_height) / 4 )
{
intf_ErrMsg( "vdec error: bad motion vector (chroma)" );
intf_WarnMsg( 2, "Bad motion vector (chroma)" );
return;
}

View File

@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.83 2001/02/18 03:32:02 polux Exp $
* $Id: input.c,v 1.84 2001/02/19 19:08:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
@ -107,6 +107,7 @@ input_thread_t *input_CreateThread ( playlist_item_t *p_item, int *pi_status )
p_input->stream.i_pgrm_number = 0;
p_input->stream.i_new_status = p_input->stream.i_new_rate = 0;
p_input->stream.i_seek = NO_SEEK;
p_input->stream.i_mux_rate = 0;
/* Initialize stream control properties. */
p_input->stream.control.i_status = PLAYING_S;

View File

@ -2,7 +2,7 @@
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: mpeg_system.c,v 1.36 2001/02/14 15:58:29 henri Exp $
* $Id: mpeg_system.c,v 1.37 2001/02/19 19:08:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
@ -518,9 +518,6 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data )
int i;
int i_new_es_number = 0;
intf_Msg("input info: Your stream contains Program Stream Map information");
intf_Msg("input info: Please send a mail to <massiot@via.ecp.fr>");
if( p_data->p_payload_start + 10 > p_data->p_payload_end )
{
intf_ErrMsg( "PSM too short : packet corrupt" );
@ -786,6 +783,7 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
{
/* Read the SCR. */
mtime_t scr_time;
u32 i_mux_rate;
if( (p_data->p_buffer[4] & 0xC0) == 0x40 )
{
@ -796,6 +794,9 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
<< 4) |
((mtime_t)(U32_AT(p_data->p_buffer + 6) & 0x03FFF800)
>> 11);
/* mux_rate */
i_mux_rate = (U32_AT(p_data->p_buffer + 10) & 0xFFFFFC00);
}
else
{
@ -805,11 +806,22 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
(((mtime_t)U16_AT(p_data->p_buffer + 5) << 14)
- (1 << 14)) |
((mtime_t)U16_AT(p_data->p_buffer + 7) >> 1);
/* mux_rate */
i_mux_rate = (U32_AT(p_data->p_buffer + 8) & 0x8FFFFE);
}
/* Call the pace control. */
//intf_Msg("+%lld", scr_time);
input_ClockManageRef( p_input, p_input->stream.pp_programs[0],
scr_time );
if( i_mux_rate != p_input->stream.i_mux_rate
&& p_input->stream.i_mux_rate )
{
intf_WarnMsg(2,
"Mux_rate changed - expect cosmetic errors");
}
p_input->stream.i_mux_rate = i_mux_rate;
b_trash = 1;
}
break;

View File

@ -2,7 +2,7 @@
* video_decoder.c : video decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_decoder.c,v 1.46 2001/02/11 01:15:11 sam Exp $
* $Id: video_decoder.c,v 1.47 2001/02/19 19:08:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gaël Hendryckx <jimmy@via.ecp.fr>
@ -482,7 +482,7 @@ void vdec_DecodeMacroblockC ( vdec_thread_t *p_vdec, macroblock_t * p_mb )
*/
if( p_mb->pf_motion == 0 )
{
intf_ErrMsg( "vdec error: pf_motion set to NULL" );
intf_WarnMsg( 2, "pf_motion set to NULL" );
}
else
{
@ -512,7 +512,7 @@ void vdec_DecodeMacroblockBW ( vdec_thread_t *p_vdec, macroblock_t * p_mb )
*/
if( p_mb->pf_motion == 0 )
{
intf_ErrMsg( "vdec error: pf_motion set to NULL" );
intf_WarnMsg( 2, "pf_motion set to NULL" );
}
else
{

View File

@ -2,7 +2,7 @@
* vpar_blocks.c : blocks parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_blocks.c,v 1.76 2001/02/13 13:01:15 massiot Exp $
* $Id: vpar_blocks.c,v 1.77 2001/02/19 19:08:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
@ -627,10 +627,6 @@ static __inline__ void DecodeMPEG1NonIntra( vpar_thread_t * p_vpar,
boolean_t b_sign;
dct_lookup_t * p_tab;
/* There should be no D picture in non-intra blocks */
if( p_vpar->picture.i_coding_type == D_CODING_TYPE )
intf_ErrMsg("vpar error : D-picture in non intra block");
/* Decoding of the AC coefficients */
i_nc = 0;
@ -710,7 +706,7 @@ static __inline__ void DecodeMPEG1NonIntra( vpar_thread_t * p_vpar,
p_mb->ppi_blocks[i_b][i_pos] = i_level;
}
intf_ErrMsg("vpar error: DCT coeff (non-intra) is out of bounds");
intf_WarnMsg( 2, "DCT coeff (non-intra) is out of bounds" );
p_vpar->picture.b_error = 1;
}
@ -858,7 +854,7 @@ static __inline__ void DecodeMPEG1Intra( vpar_thread_t * p_vpar,
p_mb->ppi_blocks[i_b][i_pos] = i_level;
}
intf_ErrMsg("vpar error: DCT coeff (intra) is out of bounds");
intf_WarnMsg( 2, "DCT coeff (intra) is out of bounds" );
p_vpar->picture.b_error = 1;
}
@ -967,7 +963,7 @@ static __inline__ void DecodeMPEG2NonIntra( vpar_thread_t * p_vpar,
i_mismatch ^= i_level;
}
intf_ErrMsg("vpar error: DCT coeff (non-intra) is out of bounds");
intf_WarnMsg( 2, "DCT coeff (non-intra) is out of bounds" );
p_vpar->picture.b_error = 1;
}
@ -1118,7 +1114,7 @@ static __inline__ void DecodeMPEG2Intra( vpar_thread_t * p_vpar,
i_mismatch ^= i_level;
}
intf_ErrMsg("vpar error: DCT coeff (intra) is out of bounds");
intf_WarnMsg( 2, "DCT coeff (intra) is out of bounds" );
p_vpar->picture.b_error = 1;
}
@ -1250,7 +1246,7 @@ static __inline__ int MotionCode( vpar_thread_t * p_vpar )
if( (i_code -= 12) < 0 )
{
p_vpar->picture.b_error = 1;
intf_ErrMsg( "vpar error: Invalid motion_vector code" );
intf_WarnMsg( 2, "Invalid motion_vector code" );
return 0;
}
@ -1634,7 +1630,7 @@ static __inline__ void SkippedMacroblock( vpar_thread_t * p_vpar, int i_mb,
if( i_coding_type == I_CODING_TYPE )
{
intf_ErrMsg("vpar error: skipped macroblock in I-picture");
intf_WarnMsg( 2, "skipped macroblock in I-picture" );
p_vpar->picture.b_error = 1;
return;
}
@ -1799,7 +1795,7 @@ static __inline__ void ParseMacroblock(
if( i_inc < 0 )
{
intf_ErrMsg( "vpar error: bad address increment (%d)", i_inc );
intf_WarnMsg( 2, "Bad address increment (%d)", i_inc );
p_vpar->picture.b_error = 1;
return;
}
@ -2029,7 +2025,7 @@ static __inline__ void SliceHeader( vpar_thread_t * p_vpar,
if( *pi_mb_address < i_mb_address_save )
{
intf_ErrMsg( "vpar error: slices do not follow, maybe a PES has been trashed" );
intf_WarnMsg( 2, "Slices do not follow" );
p_vpar->picture.b_error = 1;
return;
}
@ -2078,7 +2074,7 @@ static __inline__ void vpar_PictureData( vpar_thread_t * p_vpar,
< SLICE_START_CODE_MIN) ||
(i_dummy > SLICE_START_CODE_MAX) )
{
intf_ErrMsg("vpar error: premature end of picture");
intf_WarnMsg( 2, "Premature end of picture" );
p_vpar->picture.b_error = 1;
break;
}

View File

@ -2,7 +2,7 @@
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_headers.c,v 1.78 2001/02/13 13:01:15 massiot Exp $
* $Id: vpar_headers.c,v 1.79 2001/02/19 19:08:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
@ -579,7 +579,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
p_vpar->picture.i_current_structure = 0;
intf_ErrMsg("vpar error: odd number of field pictures.");
intf_WarnMsg( 2, "Odd number of field pictures." );
}
/* Do we have the reference pictures ? */