]> git.sesse.net Git - vlc/blobdiff - src/input/input_programs.c
* Big cleanup of the PS input plugin ;
[vlc] / src / input / input_programs.c
index 8160472abdcde571aad1a6b26f597bb343e8e515..e228ea6c69d01ab59b17841235a0be10323b3c26 100644 (file)
@@ -2,7 +2,7 @@
  * 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:
  *
@@ -51,6 +51,7 @@
  *****************************************************************************/
 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;
 
@@ -283,6 +284,44 @@ void input_DelES( input_thread_t * p_input, u16 i_id )
     }
 }
 
+#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
  *****************************************************************************/