]> git.sesse.net Git - vlc/blobdiff - modules/demux/mpeg/m4v.c
* ALL: changed the prototype of input_AddES() to include enough information so we...
[vlc] / modules / demux / mpeg / m4v.c
index 942acdead320c64b52845984ad7c4d5e6d008cf5..5edf1a4b69eca08423924344ff668351fa66b519 100644 (file)
@@ -2,7 +2,7 @@
  * m4v.c : MPEG-4 video Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: m4v.c,v 1.1 2003/01/12 06:39:45 fenrir Exp $
+ * $Id: m4v.c,v 1.5 2003/05/05 22:23:36 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -40,7 +40,7 @@ static int  Demux ( input_thread_t * );
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
-    set_description( _("MPEG-4 video elementary stream demux" ) );
+    set_description( _("MPEG-4 video elementary stream demuxer" ) );
     set_capability( "demux", 0 );
     set_callbacks( Activate, NULL );
     add_shortcut( "m4v" );
@@ -129,8 +129,7 @@ static int Activate( vlc_object_t * p_this )
     /* create our ES */
     p_demux->p_es = input_AddES( p_input,
                                  p_input->stream.p_selected_program,
-                                 1, /* id */
-                                 0 );
+                                 1 /* id */, VIDEO_ES, NULL, 0 );
     if( !p_demux->p_es )
     {
         vlc_mutex_unlock( &p_input->stream.stream_lock );
@@ -140,7 +139,6 @@ static int Activate( vlc_object_t * p_this )
     }
     p_demux->p_es->i_stream_id = 1;
     p_demux->p_es->i_fourcc = VLC_FOURCC('m','p','4','v');
-    p_demux->p_es->i_cat = VIDEO_ES;
 
     input_SelectES( p_input, p_demux->p_es );
 
@@ -148,8 +146,8 @@ static int Activate( vlc_object_t * p_this )
     vlc_mutex_unlock( &p_input->stream.stream_lock );
 
     vlc_mutex_lock( &p_input->stream.stream_lock );
-    p_category = input_InfoCategory( p_input, "mpeg" );
-    input_AddInfo( p_category, "input type", "video MPEG-4 (raw ES)" );
+    p_category = input_InfoCategory( p_input, _("mpeg") );
+    input_AddInfo( p_category, _("Input Type"), _("Video MPEG-4 (raw ES)") );
     vlc_mutex_unlock( &p_input->stream.stream_lock );
 
     return( 0 );
@@ -220,7 +218,7 @@ static int Demux( input_thread_t * p_input )
         if( ( i_peek = input_Peek( p_input, &p_peek, 512 ) ) < 5 )
         {
             /* Stream shorter than 4 bytes... */
-            msg_Err( p_input, "cannot peek()" );
+            msg_Warn( p_input, "cannot peek()" );
             return( 0 );
         }
 
@@ -234,7 +232,7 @@ static int Demux( input_thread_t * p_input )
                                           &p_data,
                                           i_size ) ) < 0 )
         {
-            msg_Err( p_input, "error while reading data" );
+            msg_Warn( p_input, "error while reading data" );
             break;
         }
         PESAddDataPacket( p_pes, p_data );
@@ -246,7 +244,7 @@ static int Demux( input_thread_t * p_input )
         if( ( i_peek = input_Peek( p_input, &p_peek, 512 ) ) < 5 )
         {
             /* Stream shorter than 4 bytes... */
-            msg_Err( p_input, "cannot peek()" );
+            msg_Warn( p_input, "cannot peek()" );
             return( 0 );
         }
 
@@ -266,7 +264,7 @@ static int Demux( input_thread_t * p_input )
                                           &p_data,
                                           i_size ) ) < 0 )
         {
-            msg_Err( p_input, "error while reading data" );
+            msg_Warn( p_input, "error while reading data" );
             break;
         }
         PESAddDataPacket( p_pes, p_data );