#include <assert.h>
#include <vlc_stream.h>
#include <vlc_input.h>
-#include <vlc_charset.h>
+#include <vlc_fs.h>
/*****************************************************************************
/* Retreive path */
char *psz_path = var_CreateGetNonEmptyString( s, "input-record-path" );
if( !psz_path )
- psz_path = config_GetUserDir( VLC_HOME_DIR );
+ psz_path = config_GetUserDir( VLC_DOWNLOAD_DIR );
if( !psz_path )
return VLC_ENOMEM;
if( !psz_file )
return VLC_ENOMEM;
- f = utf8_fopen( psz_file, "wb" );
+ f = vlc_fopen( psz_file, "wb" );
if( !f )
{
free( psz_file );
return VLC_EGENERIC;
}
+
+ /* signal new record file */
+ var_SetString( s->p_libvlc, "record-file", psz_file );
+
msg_Dbg( s, "Recording into %s", psz_file );
free( psz_file );