#include <vlc_vout.h>
#include <vlc_filter.h>
#include <vlc_osd.h>
+#include <vlc_fs.h>
#include <ctype.h>
#include <fcntl.h>
vlc_mutex_lock( &p_sys->lock );
if( p_sys->i_inputfd == -1 )
{
- p_sys->i_inputfd = open( p_sys->psz_inputfile, O_RDONLY | O_NONBLOCK );
+ p_sys->i_inputfd = vlc_open( p_sys->psz_inputfile, O_RDONLY | O_NONBLOCK );
if( p_sys->i_inputfd == -1 )
{
- msg_Warn( p_filter, "Failed to grab input file: %s (%s)",
- p_sys->psz_inputfile, strerror( errno ) );
+ msg_Warn( p_filter, "Failed to grab input file: %s (%m)",
+ p_sys->psz_inputfile );
}
else
{
if( p_sys->i_outputfd == -1 )
{
- p_sys->i_outputfd = open( p_sys->psz_outputfile,
+ p_sys->i_outputfd = vlc_open( p_sys->psz_outputfile,
O_WRONLY | O_NONBLOCK );
if( p_sys->i_outputfd == -1 )
{
if( errno != ENXIO )
{
- msg_Warn( p_filter, "Failed to grab output file: %s (%s)",
- p_sys->psz_outputfile, strerror( errno ) );
+ msg_Warn( p_filter, "Failed to grab output file: %s (%m)",
+ p_sys->psz_outputfile );
}
}
else
/* We hit an error */
if( errno != EAGAIN )
{
- msg_Warn( p_filter, "Error on input file: %s",
- strerror( errno ) );
+ msg_Warn( p_filter, "Error on input file: %m" );
close( p_sys->i_inputfd );
p_sys->i_inputfd = -1;
}
/* We hit an error */
if( errno != EAGAIN )
{
- msg_Warn( p_filter, "Error on output file: %s",
- strerror( errno ) );
+ msg_Warn( p_filter, "Error on output file: %m" );
close( p_sys->i_outputfd );
p_sys->i_outputfd = -1;
}