]> git.sesse.net Git - vlc/commitdiff
* Added a 'd' keystroke to dump the stream contents (for debugging
authorChristophe Massiot <massiot@videolan.org>
Thu, 22 Feb 2001 16:17:12 +0000 (16:17 +0000)
committerChristophe Massiot <massiot@videolan.org>
Thu, 22 Feb 2001 16:17:12 +0000 (16:17 +0000)
purposes).

include/input.h
include/input_ext-intf.h
include/keystrokes.h
plugins/sdl/vout_sdl.c
src/input/input_programs.c
src/interface/interface.c

index 655a49782dc06c81f3616bae78bef09c052abf11..657bbcf0487634054dadebc3a620c0004ec41e37 100644 (file)
@@ -2,7 +2,7 @@
  * input.h: structures of the input not exported to other modules
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input.h,v 1.31 2001/02/22 08:44:45 stef Exp $
+ * $Id: input.h,v 1.32 2001/02/22 16:17:12 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -59,7 +59,6 @@ struct pgrm_descriptor_s * input_AddProgram ( struct input_thread_s *,
 void input_DelProgram( struct input_thread_s *, struct pgrm_descriptor_s * );
 struct input_area_s * input_AddArea( struct input_thread_s * );
 void input_DelArea   ( struct input_thread_s *, struct input_area_s * );
-void input_DumpStream( struct input_thread_s * );
 struct es_descriptor_s * input_FindES( struct input_thread_s *, u16 );
 struct es_descriptor_s * input_AddES ( struct input_thread_s *,
                                        struct pgrm_descriptor_s *, u16,
index 2c2f11635375df38066619ac5239717d61aa06d3..bef94752d6cd5dd1558c8bb930aa8a8bceef619a 100644 (file)
@@ -4,7 +4,7 @@
  * control the pace of reading. 
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.24 2001/02/20 08:47:24 stef Exp $
+ * $Id: input_ext-intf.h,v 1.25 2001/02/22 16:17:12 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -342,4 +342,5 @@ void input_DestroyThread( struct input_thread_s *, int *pi_status );
 void input_SetStatus( struct input_thread_s *, int );
 void input_SetRate  ( struct input_thread_s *, int );
 void input_Seek     ( struct input_thread_s *, off_t );
+void input_DumpStream( struct input_thread_s * );
 
index 8595c3f996c865b130354d65267e7afb0684aeac..e2aa9cc7bae97086b24d2d47563fcec5aec1a518 100644 (file)
@@ -12,6 +12,7 @@
 #define INTF_KEY_TOGGLE_INTERFACE   0x09
 #define INTF_KEY_TOGGLE_INFO        0x0A
 #define INTF_KEY_TOGGLE_SCALING     0x0B
-#define INTF_KEY_UNKNOWN            0x0C
+#define INTF_KEY_DUMP_STREAM        0x0C
+#define INTF_KEY_UNKNOWN            0x0D
 
 #endif
index 73a8a24137383c4201a7810f59a8f287ca9177c9..c2acc2af45880c474efc438a57a0bbb300eec5f8 100644 (file)
@@ -201,7 +201,8 @@ static int vout_Create( vout_thread_t *p_vout )
     intf_AssignKey(p_intf, SDLK_c,      INTF_KEY_TOGGLE_GRAYSCALE, 0);
     intf_AssignKey(p_intf, SDLK_SPACE,  INTF_KEY_TOGGLE_INTERFACE, 0);
     intf_AssignKey(p_intf, SDLK_i,      INTF_KEY_TOGGLE_INFO, 0);
-    intf_AssignKey(p_intf, SDLK_s,      INTF_KEY_TOGGLE_SCALING, 0); }
+    intf_AssignKey(p_intf, SDLK_s,      INTF_KEY_TOGGLE_SCALING, 0);
+    intf_AssignKey(p_intf, SDLK_d,      INTF_KEY_DUMP_STREAM, 0); }
 
     return( 0 );
 }
index 69cd64696625ece697df4952acba463650b8bcaf..f486078e56bfa4a16b0fe622833c9a80e3741b01 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.34 2001/02/22 08:44:45 stef Exp $
+ * $Id: input_programs.c,v 1.35 2001/02/22 16:17:12 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -473,7 +473,6 @@ void input_DelES( input_thread_t * p_input, es_descriptor_t * p_es )
     
 }
 
-#ifdef STATS
 /*****************************************************************************
  * input_DumpStream: dumps the contents of a stream descriptor
  *****************************************************************************/
@@ -506,7 +505,6 @@ void input_DumpStream( input_thread_t * p_input )
         }
     }
 }
-#endif
 
 /*****************************************************************************
  * InitDecConfig: initializes a decoder_config_t
index 2bdce6c9292ab5e9060960b118b0544b695031a3..233ca5fbb89dbb652952a59780f73ca6a5f16e87 100644 (file)
@@ -306,6 +306,7 @@ void intf_AssignNormalKeys( intf_thread_t *p_intf)
     intf_AssignKey( p_intf , ' ', INTF_KEY_TOGGLE_INTERFACE, 0);
     intf_AssignKey( p_intf , 'i', INTF_KEY_TOGGLE_INFO, 0);
     intf_AssignKey( p_intf , 's', INTF_KEY_TOGGLE_SCALING, 0);
+    intf_AssignKey( p_intf , 'd', INTF_KEY_DUMP_STREAM, 0);
 }   
 
 /*****************************************************************************
@@ -364,6 +365,14 @@ int intf_ProcessKey( intf_thread_t *p_intf, int g_key )
             p_main->p_vout->i_changes |= VOUT_GAMMA_CHANGE;
         }
         break;
+   case INTF_KEY_DUMP_STREAM:
+        if( p_intf->p_input != NULL )
+        {
+            vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
+            input_DumpStream( p_intf->p_input );
+            vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
+        }
+        break;
    default:                                                   /* unknown key */
         return( 1 );
     }