summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/parseargs.c
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-02-20 12:30:31 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-02-20 12:30:31 +0000
commit1e1fcd158ae0b63a215b0d79ea147e0d91a40a79 (patch)
treecfa8e7b41a73cfacf8ef00c0cbd44f4e19959b8c /recordmydesktop/src/parseargs.c
parent225a939a00490c2e6f45cd068abd514c96dde50e (diff)
added configurable ringbuffer size,
corrected a mistake that blocked compilation(from last commit at shminfo initialization), removed the options from USAGE in the manpage and the program ,since it's too bloated to be usefull git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@285 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src/parseargs.c')
-rw-r--r--recordmydesktop/src/parseargs.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/recordmydesktop/src/parseargs.c b/recordmydesktop/src/parseargs.c
index 4643bf1..a2a55c4 100644
--- a/recordmydesktop/src/parseargs.c
+++ b/recordmydesktop/src/parseargs.c
@@ -46,19 +46,7 @@ void PrintConfig(void){
int ParseArgs(int argc,char **argv,ProgArgs *arg_return){
int i;
char *usage="\nUsage:\n"
- "\trecordmydesktop [-h| --help| --version| --print-config|"
- " -delay n[H|h|M|m]| -windowid id_of_window|\n"
- "\t-display DISPLAY| -x X| -y Y|-width N| -height N|"
- " -fps N(number>0)| --on-the-fly-encoding|\n"
- "\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)|"
- " -buffer-size N(number>0)| -device SOUND_DEVICE|\n"
- "\t -use-jack port1 port2... portn| --no-sound| --with-shared|"
- " --no-cond-shared| -shared-threshold n|"
- " --full-shots|\n"
- "\t --quick-subsampling| -workdir DIR| --zero-compression| --no-wm-check|"
- " --overwite| -o filename]^filename\n\n\n"
+ "\trecordmydesktop [OPTIONS]^filename\n\n\n"
"General Options:\n"
"\t-h or --help\t\tPrint this help and exit.\n"
@@ -97,7 +85,9 @@ int ParseArgs(int argc,char **argv,ProgArgs *arg_return){
"\t-freq N\t\t\t\tA positive number denoting desired sound frequency.\n"
"\t-buffer-size N\t\t\tA positive number denoting the desired"
- " sound buffer size(in frames)\n"
+ " sound buffer size (in frames,when using ALSA or OSS)\n"
+ "\t-ring-buffer-size N\t\tA float number denoting the desired"
+ " ring buffer size (in seconds,when using JACK only).\n"
"\t-device SOUND_DEVICE\t\tSound device(default "
DEFAULT_AUDIO_DEVICE
@@ -504,6 +494,24 @@ int ParseArgs(int argc,char **argv,ProgArgs *arg_return){
return 1;
}
}
+ else if(!strcmp(argv[i],"-ring-buffer-size")){
+ if(i+1<argc){
+ float num=atof(argv[i+1]);
+ if(num>0.0)
+ arg_return->jack_ringbuffer_secs=num;
+ else{
+ fprintf(stderr,"Argument Usage: --ring-buffer-size"
+ " N(floating point number>0.0)\n");
+ return 1;
+ }
+ }
+ else{
+ fprintf(stderr,"Argument Usage: --ring-buffer-size"
+ " N(floating point number>0.0)\n");
+ return 1;
+ }
+ i++;
+ }
else if(!strcmp(argv[i],"--no-sound"))
arg_return->nosound=1;
else if(!strcmp(argv[i],"--drop-frames"))
© All Rights Reserved