summaryrefslogtreecommitdiff
path: root/rMD-exp/src
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-11-08 16:01:00 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-11-08 16:01:00 +0000
commitfd4a7480e74008c0e654ad9bf790a8fa6625e661 (patch)
tree788f239de9462be4e688550b7e9377ed25aa0b77 /rMD-exp/src
parentb3ef3b6cb05fbedb3e224521afd19b2c43d3a7db (diff)
added --overwrite option and updated manpage accordingly
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@152 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'rMD-exp/src')
-rw-r--r--rMD-exp/src/init_encoder.c4
-rw-r--r--rMD-exp/src/parseargs.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/rMD-exp/src/init_encoder.c b/rMD-exp/src/init_encoder.c
index 4edfef1..84d36aa 100644
--- a/rMD-exp/src/init_encoder.c
+++ b/rMD-exp/src/init_encoder.c
@@ -66,8 +66,8 @@ void InitEncoder(ProgData *pdata,EncData *enc_data_t,int buffer_ready){
ogg_stream_init(&(enc_data_t)->m_ogg_ts,y1);
if(!pdata->args.nosound)
ogg_stream_init(&(enc_data_t)->m_ogg_vs,y2);
-
- IncrementalNaming(&(pdata)->args.filename);
+ if(!pdata->args.overwrite)
+ IncrementalNaming(&(pdata)->args.filename);
(enc_data_t)->fp=fopen((pdata)->args.filename,"w");
if((enc_data_t)->fp==NULL){
fprintf(stderr,"Cannot open file %s for writting!\n",(pdata)->args.filename);
diff --git a/rMD-exp/src/parseargs.c b/rMD-exp/src/parseargs.c
index 72a2681..c7d20fd 100644
--- a/rMD-exp/src/parseargs.c
+++ b/rMD-exp/src/parseargs.c
@@ -36,7 +36,7 @@ int ParseArgs(int argc,char **argv,ProgArgs *arg_return){
"\t -v_quality n| -s_quality n| -v_bitrate n| --no-framedrop| -dummy-cursor color|\n"
"\t --no-cursor| -freq N(number>0)| -channels N(number>0)| -device SOUND_DEVICE|\n"
"\t --no-sound| --with-shared| --no-cond-shared| -shared-threshold n| --full-shots|\n"
- "\t --quick-subsampling| -workdir DIR| --zero-compression| --no-wm-check| -o filename]^filename\n\n\n"
+ "\t --quick-subsampling| -workdir DIR| --zero-compression| --no-wm-check| --overwite| -o filename]^filename\n\n\n"
"General Options:\n"
"\t-h or --help\t\tPrint this help and exit.\n"
@@ -77,6 +77,8 @@ int ParseArgs(int argc,char **argv,ProgArgs *arg_return){
"\t--zero-compression\tImage data are always cached uncompressed.\n"
"\t-workdir DIR\t\tLocation where a temporary directory will be created to hold project files(default $HOME).\n"
"\t-delay n[H|h|M|m]\tNumber of secs(default),minutes or hours before capture starts(number can be float)\n"
+ "\t--overwrite\t\tIf there is already a file with the same name, delete it\n"
+ "\t\t\t\t(default is to add a number postfix to the new one).\n"
"\t-o filename\t\tName of recorded video(default out.ogg).\n"
"\n\tIf no other options are specified, filename can be given without the -o switch.\n\n\n";
@@ -399,6 +401,8 @@ int ParseArgs(int argc,char **argv,ProgArgs *arg_return){
else if(!strcmp(argv[i],"--on-the-fly-encoding")){
arg_return->encOnTheFly=1;
}
+ else if(!strcmp(argv[i],"--overwrite"))
+ arg_return->overwrite=1;
else if(!strcmp(argv[i],"--no-wm-check"))
arg_return->nowmcheck=1;
else if(!strcmp(argv[i],"--zero-compression")){
© All Rights Reserved