-#include <vlc/vlc.h>
-#include <vlc/input.h>
-
-#include <sys/types.h>
-
-/*****************************************************************************
- * Local prototypes
- *****************************************************************************/
-static int Activate ( vlc_object_t * );
-static int Demux ( input_thread_t * );
-static void Desactivate ( vlc_object_t * );
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_demux.h>
+#include <vlc_sout.h>
+
+#define ACCESS_TEXT N_("Dump module")
+#define FILE_TEXT N_("Dump filename")
+#define FILE_LONGTEXT N_( \
+ "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 already exists, it will not be overwritten." )
+
+static int Open( vlc_object_t * );
+static void Close ( vlc_object_t * );
+
+vlc_module_begin ()
+ set_shortname("Dump")
+ set_category( CAT_INPUT )
+ set_subcategory( SUBCAT_INPUT_DEMUX )
+ set_description( N_("File dumper") )
+ set_capability( "demux", 0 )
+ add_module( "demuxdump-access", "sout access", "file", ACCESS_TEXT,
+ ACCESS_TEXT, true )
+ add_savefile( "demuxdump-file", "stream-demux.dump", FILE_TEXT,
+ FILE_LONGTEXT, false )
+ add_bool( "demuxdump-append", false, APPEND_TEXT, APPEND_LONGTEXT,
+ false )
+ set_callbacks( Open, Close )
+ add_shortcut( "dump" )
+vlc_module_end ()