]> git.sesse.net Git - vlc/blobdiff - modules/demux/demuxdump.c
A bit of headers cleanup
[vlc] / modules / demux / demuxdump.c
index 1c301a6305126a06e09e35e6090b543621a85dd3..bd46e9511471677567830320a9d3c15eae5a76d1 100644 (file)
 #include <errno.h>
 
 #include <vlc/vlc.h>
-#include <vlc/input.h>
+#include <vlc_demux.h>
+#include <vlc_charset.h>
 
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-#define FILE_TEXT N_("Filename of dump")
+#define FILE_TEXT N_("Dump filename")
 #define FILE_LONGTEXT N_( \
-    "Specify a file name to which the raw stream will be dumped." )
-#define APPEND_TEXT N_("Append")
+    "Name of the file to which the raw stream will be dumped." )
+#define APPEND_TEXT N_("Append to existing file")
 #define APPEND_LONGTEXT N_( \
-    "If the file exists and this option is selected, the existing file " \
-    "will not be overwritten." )
+    "If the file already exists, it will not be overwritten." )
 
 static int  Open( vlc_object_t * );
 static void Close ( vlc_object_t * );
@@ -49,7 +49,7 @@ vlc_module_begin();
     set_shortname("Dump");
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_DEMUX );
-    set_description( _("Filedump demuxer") );
+    set_description( _("File dumpper") );
     set_capability( "demux2", 0 );
     add_file( "demuxdump-file", "stream-demux.dump", NULL, FILE_TEXT,
               FILE_LONGTEXT, VLC_FALSE );
@@ -88,7 +88,7 @@ static int Open( vlc_object_t * p_this )
 {
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys;
-    char        *psz_mode;
+    const char  *psz_mode;
     vlc_value_t val;
     vlc_bool_t  b_append;
 
@@ -121,7 +121,7 @@ static int Open( vlc_object_t * p_this )
         msg_Info( p_demux, "dumping raw stream to standard output" );
         p_sys->p_file = stdout;
     }
-    else if( ( p_sys->p_file = fopen( p_sys->psz_file, psz_mode ) ) == NULL )
+    else if( ( p_sys->p_file = utf8_fopen( p_sys->psz_file, psz_mode ) ) == NULL )
     {
         msg_Err( p_demux, "cannot create `%s' for writing", p_sys->psz_file );