X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fscene.c;h=86749936f68cd83bfeea1699397f7d600a05a269;hb=ffce1e460279dab9e890ae6f28074fb5bffc70d9;hp=0e9a3f783f3df01f4a95848988e96f3b3c5f5149;hpb=7d0e62b8727f27c865587131c5b7ae9445d5ea59;p=vlc diff --git a/modules/video_filter/scene.c b/modules/video_filter/scene.c index 0e9a3f783f..86749936f6 100644 --- a/modules/video_filter/scene.c +++ b/modules/video_filter/scene.c @@ -38,6 +38,7 @@ #include "filter_picture.h" #include #include +#include /***************************************************************************** * Local prototypes @@ -85,31 +86,33 @@ static void SavePicture( filter_t *, picture_t * ); "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 ) /* General options */ - add_string( CFG_PREFIX "format", "png", NULL, + add_string( CFG_PREFIX "format", "png", FORMAT_TEXT, FORMAT_LONGTEXT, false ) - add_integer( CFG_PREFIX "width", -1, NULL, + add_integer( CFG_PREFIX "width", -1, WIDTH_TEXT, WIDTH_LONGTEXT, true ) - add_integer( CFG_PREFIX "height", -1, NULL, + add_integer( CFG_PREFIX "height", -1, HEIGHT_TEXT, HEIGHT_LONGTEXT, true ) - add_string( CFG_PREFIX "prefix", "scene", NULL, + add_string( CFG_PREFIX "prefix", "scene", PREFIX_TEXT, PREFIX_LONGTEXT, false ) - add_string( CFG_PREFIX "path", NULL, NULL, + add_string( CFG_PREFIX "path", NULL, PATH_TEXT, PATH_LONGTEXT, false ) - add_bool( CFG_PREFIX "replace", false, NULL, + add_bool( CFG_PREFIX "replace", false, REPLACE_TEXT, REPLACE_LONGTEXT, false ) /* Snapshot method */ - add_integer( CFG_PREFIX "ratio", 50, NULL, + add_integer( CFG_PREFIX "ratio", 50, RATIO_TEXT, RATIO_LONGTEXT, false ) set_callbacks( Create, Destroy ) @@ -316,7 +319,10 @@ static void SavePicture( filter_t *p_filter, picture_t *p_pic ) else { /* switch to the final destination */ - i_ret = rename( psz_temp, psz_filename ); +#if defined (WIN32) || defined(__OS2__) + 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 );