]> git.sesse.net Git - vlc/blobdiff - modules/demux/rawdv.c
packetizer copy : use VLC_TS_INVALID
[vlc] / modules / demux / rawdv.c
index fcf25c0dc9e3994f14f7bacaaf903a858c6d3796..0b3c3155a15212878008345a439481f67a434763 100644 (file)
@@ -30,7 +30,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_demux.h>
 
 static int  Open ( vlc_object_t * );
 static void Close( vlc_object_t * );
 
-vlc_module_begin();
-    set_shortname( "DV" );
-    set_description( _("DV (Digital Video) demuxer") );
-    set_capability( "demux", 3 );
-    set_category( CAT_INPUT );
-    set_subcategory( SUBCAT_INPUT_DEMUX );
-    add_bool( "rawdv-hurry-up", 0, NULL, HURRYUP_TEXT, HURRYUP_LONGTEXT, false );
-    set_callbacks( Open, Close );
-    add_shortcut( "rawdv" );
-vlc_module_end();
+vlc_module_begin ()
+    set_shortname( "DV" )
+    set_description( N_("DV (Digital Video) demuxer") )
+    set_capability( "demux", 3 )
+    set_category( CAT_INPUT )
+    set_subcategory( SUBCAT_INPUT_DEMUX )
+    add_bool( "rawdv-hurry-up", false, NULL, HURRYUP_TEXT, HURRYUP_LONGTEXT, false )
+    set_callbacks( Open, Close )
+    add_shortcut( "rawdv" )
+vlc_module_end ()
 
 
 /*****************************************************************************
@@ -222,7 +222,7 @@ static int Open( vlc_object_t * p_this )
 
     p_sys->i_bitrate = 0;
 
-    es_format_Init( &p_sys->fmt_video, VIDEO_ES, VLC_FOURCC('d','v','s','d') );
+    es_format_Init( &p_sys->fmt_video, VIDEO_ES, VLC_CODEC_DV );
     p_sys->fmt_video.video.i_width = 720;
     p_sys->fmt_video.video.i_height= dv_header.dsf ? 576 : 480;;
 
@@ -239,9 +239,10 @@ static int Open( vlc_object_t * p_this )
     p_peek = p_peek_backup + 80*6+80*16*3 + 3; /* beginning of AAUX pack */
     if( *p_peek == 0x50 )
     {
-        es_format_Init( &p_sys->fmt_audio, AUDIO_ES,
-                        VLC_FOURCC('a','r','a','w') );
+        /* 12 bits non-linear will be converted to 16 bits linear */
+        es_format_Init( &p_sys->fmt_audio, AUDIO_ES, VLC_CODEC_S16L );
 
+        p_sys->fmt_audio.audio.i_bitspersample = 16;
         p_sys->fmt_audio.audio.i_channels = 2;
         switch( (p_peek[4] >> 3) & 0x07 )
         {
@@ -257,9 +258,6 @@ static int Open( vlc_object_t * p_this )
             break;
         }
 
-        /* 12 bits non-linear will be converted to 16 bits linear */
-        p_sys->fmt_audio.audio.i_bitspersample = 16;
-
         p_sys->p_es_audio = es_out_Add( p_demux->out, &p_sys->fmt_audio );
     }