#include <fcntl.h>
#include <errno.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
+#include <vlc_plugin.h>
#include <vlc_sout.h>
#include <vlc_block.h>
#include <vlc_charset.h>
"of replacing it.")
vlc_module_begin();
- set_description( _("File stream output") );
- set_shortname( _("File" ));
+ 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" );
add_shortcut( "stream" );
add_bool( SOUT_CFG_PREFIX "append", 0, NULL, APPEND_TEXT,APPEND_LONGTEXT,
- VLC_TRUE );
+ true );
set_callbacks( Open, Close );
vlc_module_end();
"append", NULL
};
-static int Write( sout_access_out_t *, block_t * );
+static ssize_t Write( sout_access_out_t *, block_t * );
static int Seek ( sout_access_out_t *, off_t );
-static int Read ( sout_access_out_t *, block_t * );
+static ssize_t Read ( sout_access_out_t *, block_t * );
struct sout_access_out_sys_t
{
if( fd == -1 )
{
- msg_Err( p_access, "cannot open `%s' (%s)", p_access->psz_path,
- strerror( errno ) );
+ msg_Err( p_access, "cannot open `%s' (%m)", p_access->psz_path );
free( p_access->p_sys );
return( VLC_EGENERIC );
}
/*****************************************************************************
* Read: standard read on a file descriptor.
*****************************************************************************/
-static int Read( sout_access_out_t *p_access, block_t *p_buffer )
+static ssize_t Read( sout_access_out_t *p_access, block_t *p_buffer )
{
if( strcmp( p_access->psz_path, "-" ) )
{
/*****************************************************************************
* Write: standard write on a file descriptor.
*****************************************************************************/
-static int Write( sout_access_out_t *p_access, block_t *p_buffer )
+static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
{
size_t i_write = 0;