* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.4 2000/12/19 19:08:51 massiot Exp $
+ * $Id: input_programs.c,v 1.5 2000/12/20 16:04:31 massiot Exp $
*
* Authors:
*
*****************************************************************************/
void input_InitStream( input_thread_t * p_input, size_t i_data_len )
{
+ p_input->stream.i_stream_id = 0;
p_input->stream.i_pgrm_number = 0;
p_input->stream.pp_programs = NULL;
}
}
+#ifdef STATS
+/*****************************************************************************
+ * input_DumpStream: dumps the contents of a stream descriptor
+ *****************************************************************************/
+void input_DumpStream( input_thread_t * p_input )
+{
+ int i, j;
+#define S p_input->stream
+ intf_Msg( "input info: Dumping stream ID 0x%x\n", S.i_stream_id );
+ if( S.b_seekable )
+ intf_Msg( "input info: seekable stream, position: %d/%d\n",
+ S.i_tell, S.i_size );
+ else
+ intf_Msg( "input info: %s\n", S.b_pace_control ? "pace controlled" :
+ "pace un-controlled" );
+#undef S
+ for( i = 0; i < p_input->stream.i_pgrm_number; i++ )
+ {
+#define P p_input->stream.pp_programs[i]
+ intf_Msg( "input info: Dumping program 0x%x, version %d (%s)\n",
+ P->i_number, P->i_version,
+ P->b_is_ok ? "complete" : "partial" );
+ if( P->i_synchro_state == SYNCHRO_OK )
+ intf_Msg( "input info: synchro absolute delta : %lld (jitter : %lld)\n",
+ P->delta_absolute, P->delta_cr );
+#undef P
+ for( j = 0; j < p_input->stream.pp_programs[i]->i_es_number; j++ )
+ {
+#define ES p_input->stream.pp_programs[i]->pp_es[j]
+ intf_Msg( "input info: ES 0x%x, stream 0x%x, type 0x%x, %s\n",
+ ES->i_id, ES->i_stream_id, ES->i_type,
+ ES->p_decoder_fifo != NULL ? "selected" : "not selected");
+#undef ES
+ }
+ }
+}
+#endif
+
/*****************************************************************************
* InitDecConfig: initializes a decoder_config_t
*****************************************************************************/