-vlc_module_begin();
- set_description( _("File stream ouput") );
- set_capability( "sout access", 50 );
- add_shortcut( "file" );
- set_callbacks( Open, Close );
-vlc_module_end();
-
-struct sout_access_out_sys_t
-{
- FILE *p_file;
+static int Open ( vlc_object_t * );
+static void Close( vlc_object_t * );
+
+#define SOUT_CFG_PREFIX "sout-file-"
+#define OVERWRITE_TEXT N_("Overwrite existing file")
+#define OVERWRITE_LONGTEXT N_( \
+ "If the file already exists, it will be overwritten.")
+#define APPEND_TEXT N_("Append to file")
+#define APPEND_LONGTEXT N_( "Append to file if it exists instead " \
+ "of replacing it.")
+#define FORMAT_TEXT N_("Format time and date")
+#define FORMAT_LONGTEXT N_("Perform ISO C time and date formatting " \
+ "on the file path")
+#define SYNC_TEXT N_("Synchronous writing")
+#define SYNC_LONGTEXT N_( "Open the file with synchronous writing.")
+
+vlc_module_begin ()
+ set_description( N_("File stream output") )
+ set_shortname( N_("File" ))
+ set_capability( "sout access", 50 )
+ set_category( CAT_SOUT )
+ set_subcategory( SUBCAT_SOUT_ACO )
+ add_shortcut( "file", "stream", "fd" )
+ add_bool( SOUT_CFG_PREFIX "overwrite", true, OVERWRITE_TEXT,
+ OVERWRITE_LONGTEXT, true )
+ add_bool( SOUT_CFG_PREFIX "append", false, APPEND_TEXT,APPEND_LONGTEXT,
+ true )
+ add_bool( SOUT_CFG_PREFIX "format", false, FORMAT_TEXT, FORMAT_LONGTEXT,
+ true )
+#ifdef O_SYNC
+ add_bool( SOUT_CFG_PREFIX "sync", false, SYNC_TEXT,SYNC_LONGTEXT,
+ false )
+#endif
+ set_callbacks( Open, Close )
+vlc_module_end ()
+