#include "filter_picture.h"
#include <vlc_image.h>
#include <vlc_strings.h>
+#include <vlc_fs.h>
/*****************************************************************************
* Local prototypes
"creating one file per image. In this case, " \
"the number is not appended to the filename." )
+#define SCENE_HELP N_("Send your video to picture files")
#define CFG_PREFIX "scene-"
vlc_module_begin ()
set_shortname( N_( "Scene filter" ) )
set_description( N_( "Scene video filter" ) )
+ set_help(SCENE_HELP)
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_VOUT )
set_capability( "video filter2", 0 )
p_sys->i_height = p_pic->format.i_height;
}
- p_sys->scene.p_pic = picture_New( p_pic->format.i_chroma,
- p_pic->format.i_width, p_pic->format.i_height,
- p_pic->format.i_sar_num );
+ p_sys->scene.p_pic = picture_NewFromFormat( &p_pic->format );
if( p_sys->scene.p_pic )
{
picture_Copy( p_sys->scene.p_pic, p_pic );
else
{
/* switch to the final destination */
- i_ret = rename( psz_temp, psz_filename );
+#if defined (WIN32)
+ vlc_unlink( psz_filename );
+#endif
+ i_ret = vlc_rename( psz_temp, psz_filename );
if( i_ret == -1 )
{
msg_Err( p_filter, "could not rename snapshot %s %m", psz_filename );