Commit 33f6628a authored by Christophe Massiot's avatar Christophe Massiot

* mux_rate parsing ;

* Changed video decoder's error messages into warnings.
parent ef54efe5
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* control the pace of reading. * control the pace of reading.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * 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> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -153,6 +153,8 @@ typedef struct stream_descriptor_s ...@@ -153,6 +153,8 @@ typedef struct stream_descriptor_s
* (in arbitrary units) */ * (in arbitrary units) */
off_t i_seek; /* next requested location (changed off_t i_seek; /* next requested location (changed
* by the interface thread */ * 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: */ /* For DVD streams: */
int i_title_nb; int i_title_nb;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vdec_motion_common.c : common motion compensation routines common * vdec_motion_common.c : common motion compensation routines common
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * 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> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr> * Jean-Marc Dressler <polux@via.ecp.fr>
...@@ -209,7 +209,7 @@ static __inline__ void Motion420( ...@@ -209,7 +209,7 @@ static __inline__ void Motion420(
+ (i_mv_y >> 1) * i_l_stride; + (i_mv_y >> 1) * i_l_stride;
if( i_source_offset >= p_source->i_width * p_source->i_height ) 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; return;
} }
...@@ -236,7 +236,7 @@ static __inline__ void Motion420( ...@@ -236,7 +236,7 @@ static __inline__ void Motion420(
+ ((i_mv_y/2) >> 1) * i_c_stride; + ((i_mv_y/2) >> 1) * i_c_stride;
if( i_source_offset >= (p_source->i_width * p_source->i_height) / 4 ) 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; return;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* decoders. * decoders.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * 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> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -107,6 +107,7 @@ input_thread_t *input_CreateThread ( playlist_item_t *p_item, int *pi_status ) ...@@ -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_pgrm_number = 0;
p_input->stream.i_new_status = p_input->stream.i_new_rate = 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_seek = NO_SEEK;
p_input->stream.i_mux_rate = 0;
/* Initialize stream control properties. */ /* Initialize stream control properties. */
p_input->stream.control.i_status = PLAYING_S; p_input->stream.control.i_status = PLAYING_S;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mpeg_system.c: TS, PS and PES management * mpeg_system.c: TS, PS and PES management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * 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> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@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 ) ...@@ -518,9 +518,6 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data )
int i; int i;
int i_new_es_number = 0; 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 ) if( p_data->p_payload_start + 10 > p_data->p_payload_end )
{ {
intf_ErrMsg( "PSM too short : packet corrupt" ); intf_ErrMsg( "PSM too short : packet corrupt" );
...@@ -786,6 +783,7 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) ...@@ -786,6 +783,7 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
{ {
/* Read the SCR. */ /* Read the SCR. */
mtime_t scr_time; mtime_t scr_time;
u32 i_mux_rate;
if( (p_data->p_buffer[4] & 0xC0) == 0x40 ) 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 ) ...@@ -796,6 +794,9 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
<< 4) | << 4) |
((mtime_t)(U32_AT(p_data->p_buffer + 6) & 0x03FFF800) ((mtime_t)(U32_AT(p_data->p_buffer + 6) & 0x03FFF800)
>> 11); >> 11);
/* mux_rate */
i_mux_rate = (U32_AT(p_data->p_buffer + 10) & 0xFFFFFC00);
} }
else else
{ {
...@@ -805,11 +806,22 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) ...@@ -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) (((mtime_t)U16_AT(p_data->p_buffer + 5) << 14)
- (1 << 14)) | - (1 << 14)) |
((mtime_t)U16_AT(p_data->p_buffer + 7) >> 1); ((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. */ /* Call the pace control. */
//intf_Msg("+%lld", scr_time);
input_ClockManageRef( p_input, p_input->stream.pp_programs[0], input_ClockManageRef( p_input, p_input->stream.pp_programs[0],
scr_time ); 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; b_trash = 1;
} }
break; break;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video_decoder.c : video decoder thread * video_decoder.c : video decoder thread
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * 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> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gal Hendryckx <jimmy@via.ecp.fr> * Gal Hendryckx <jimmy@via.ecp.fr>
...@@ -482,7 +482,7 @@ void vdec_DecodeMacroblockC ( vdec_thread_t *p_vdec, macroblock_t * p_mb ) ...@@ -482,7 +482,7 @@ void vdec_DecodeMacroblockC ( vdec_thread_t *p_vdec, macroblock_t * p_mb )
*/ */
if( p_mb->pf_motion == 0 ) if( p_mb->pf_motion == 0 )
{ {
intf_ErrMsg( "vdec error: pf_motion set to NULL" ); intf_WarnMsg( 2, "pf_motion set to NULL" );
} }
else else
{ {
...@@ -512,7 +512,7 @@ void vdec_DecodeMacroblockBW ( vdec_thread_t *p_vdec, macroblock_t * p_mb ) ...@@ -512,7 +512,7 @@ void vdec_DecodeMacroblockBW ( vdec_thread_t *p_vdec, macroblock_t * p_mb )
*/ */
if( p_mb->pf_motion == 0 ) if( p_mb->pf_motion == 0 )
{ {
intf_ErrMsg( "vdec error: pf_motion set to NULL" ); intf_WarnMsg( 2, "pf_motion set to NULL" );
} }
else else
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vpar_blocks.c : blocks parsing * vpar_blocks.c : blocks parsing
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * 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> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr> * Jean-Marc Dressler <polux@via.ecp.fr>
...@@ -627,10 +627,6 @@ static __inline__ void DecodeMPEG1NonIntra( vpar_thread_t * p_vpar, ...@@ -627,10 +627,6 @@ static __inline__ void DecodeMPEG1NonIntra( vpar_thread_t * p_vpar,
boolean_t b_sign; boolean_t b_sign;
dct_lookup_t * p_tab; 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 */ /* Decoding of the AC coefficients */
i_nc = 0; i_nc = 0;
...@@ -710,7 +706,7 @@ static __inline__ void DecodeMPEG1NonIntra( vpar_thread_t * p_vpar, ...@@ -710,7 +706,7 @@ static __inline__ void DecodeMPEG1NonIntra( vpar_thread_t * p_vpar,
p_mb->ppi_blocks[i_b][i_pos] = i_level; 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; p_vpar->picture.b_error = 1;
} }
...@@ -858,7 +854,7 @@ static __inline__ void DecodeMPEG1Intra( vpar_thread_t * p_vpar, ...@@ -858,7 +854,7 @@ static __inline__ void DecodeMPEG1Intra( vpar_thread_t * p_vpar,
p_mb->ppi_blocks[i_b][i_pos] = i_level; 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; p_vpar->picture.b_error = 1;
} }
...@@ -967,7 +963,7 @@ static __inline__ void DecodeMPEG2NonIntra( vpar_thread_t * p_vpar, ...@@ -967,7 +963,7 @@ static __inline__ void DecodeMPEG2NonIntra( vpar_thread_t * p_vpar,
i_mismatch ^= i_level; 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; p_vpar->picture.b_error = 1;
} }
...@@ -1118,7 +1114,7 @@ static __inline__ void DecodeMPEG2Intra( vpar_thread_t * p_vpar, ...@@ -1118,7 +1114,7 @@ static __inline__ void DecodeMPEG2Intra( vpar_thread_t * p_vpar,
i_mismatch ^= i_level; 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; p_vpar->picture.b_error = 1;
} }
...@@ -1250,7 +1246,7 @@ static __inline__ int MotionCode( vpar_thread_t * p_vpar ) ...@@ -1250,7 +1246,7 @@ static __inline__ int MotionCode( vpar_thread_t * p_vpar )
if( (i_code -= 12) < 0 ) if( (i_code -= 12) < 0 )
{ {
p_vpar->picture.b_error = 1; p_vpar->picture.b_error = 1;
intf_ErrMsg( "vpar error: Invalid motion_vector code" ); intf_WarnMsg( 2, "Invalid motion_vector code" );
return 0; return 0;
} }
...@@ -1634,7 +1630,7 @@ static __inline__ void SkippedMacroblock( vpar_thread_t * p_vpar, int i_mb, ...@@ -1634,7 +1630,7 @@ static __inline__ void SkippedMacroblock( vpar_thread_t * p_vpar, int i_mb,
if( i_coding_type == I_CODING_TYPE ) 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; p_vpar->picture.b_error = 1;
return; return;
} }
...@@ -1799,7 +1795,7 @@ static __inline__ void ParseMacroblock( ...@@ -1799,7 +1795,7 @@ static __inline__ void ParseMacroblock(
if( i_inc < 0 ) 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; p_vpar->picture.b_error = 1;
return; return;
} }
...@@ -2029,7 +2025,7 @@ static __inline__ void SliceHeader( vpar_thread_t * p_vpar, ...@@ -2029,7 +2025,7 @@ static __inline__ void SliceHeader( vpar_thread_t * p_vpar,
if( *pi_mb_address < i_mb_address_save ) 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; p_vpar->picture.b_error = 1;
return; return;
} }
...@@ -2078,7 +2074,7 @@ static __inline__ void vpar_PictureData( vpar_thread_t * p_vpar, ...@@ -2078,7 +2074,7 @@ static __inline__ void vpar_PictureData( vpar_thread_t * p_vpar,
< SLICE_START_CODE_MIN) || < SLICE_START_CODE_MIN) ||
(i_dummy > SLICE_START_CODE_MAX) ) (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; p_vpar->picture.b_error = 1;
break; break;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vpar_headers.c : headers parsing * vpar_headers.c : headers parsing
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * 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> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -579,7 +579,7 @@ static void PictureHeader( vpar_thread_t * p_vpar ) ...@@ -579,7 +579,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
p_vpar->picture.i_current_structure = 0; 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 ? */ /* Do we have the reference pictures ? */
......
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