From: Stephen B. <ste...@ad...> - 2003-11-28 04:58:50
|
Hello, Here is a CVS patch to enable CRC error protection for mp2enc via command-line. Index: aenc/musicin.c =================================================================== RCS file: /cvsroot/mjpeg/mjpeg_play/aenc/musicin.c,v retrieving revision 1.17 diff -u -r1.17 musicin.c --- aenc/musicin.c 23 Sep 2002 19:46:42 -0000 1.17 +++ aenc/musicin.c 28 Nov 2003 04:52:37 -0000 @@ -134,6 +134,7 @@ printf(" num must be one of 32000, 44100, 48000\n"); printf(" -s Force stereo output (default)\n"); printf(" -m Force mono output\n"); + printf(" -e Use CRC error protection\n"); printf(" -V Force VCD compatible output (same as: -b 224 - r 44100 -s)\n"); printf(" -? Print this lot out\n"); exit(0); @@ -167,7 +168,7 @@ info->lay = 2; info->emphasis = 0; info->extension = 0; - info->error_protection = FALSE; + info->error_protection = 0; info->copyright = 0; info->original = 0; @@ -177,7 +178,7 @@ brt = 0; - while( (n=getopt(argc,argv,"b:o:r:smv:V")) != EOF) + while( (n=getopt(argc,argv,"b:o:r:smeVv:")) != EOF) { switch(n) { @@ -202,6 +203,10 @@ mono = 1; stereo = 0; break; + + case 'e': + info->error_protection = 1; + break; case 'V': video_cd = 1; @@ -241,7 +246,7 @@ if(stereo && mono) { - mjpeg_error("Options -s and -m are mutally exclusive!"); + mjpeg_error("Options -s and -m are mutually exclusive!"); Usage(argv[0]); } if(mono) chans_out = 1; @@ -249,19 +254,25 @@ if(video_cd && mono) { - mjpeg_error("Options -v and -m are mutally exclusive!"); + mjpeg_error("Options -V and -m are mutually exclusive!"); Usage(argv[0]); } if(video_cd && freq_out!=0 && freq_out!=44100) { - mjpeg_error("Option -v requires sample rate 44100!"); + mjpeg_error("Option -V requires sample rate 44100!"); Usage(argv[0]); } if(video_cd && brt!=0 && brt!=224) { - mjpeg_error("Option -v requires bit rate 224 KBit/s!"); + mjpeg_error("Option -V requires bit rate 224 KBit/s!"); + Usage(argv[0]); + } + + if(video_cd && info->error_protection ) + { + mjpeg_error("Options -V and -e are mutually exclusive!"); Usage(argv[0]); } Index: docs/mp2enc.1 =================================================================== RCS file: /cvsroot/mjpeg/mjpeg_play/docs/mp2enc.1,v retrieving revision 1.4 diff -u -r1.4 mp2enc.1 --- docs/mp2enc.1 23 Oct 2003 17:14:03 -0000 1.4 +++ docs/mp2enc.1 28 Nov 2003 04:52:38 -0000 @@ -18,6 +18,8 @@ ] .RB [ -m ] +.RB [ -e +] .RB [ -V ] .RB [ -? ] @@ -78,10 +80,13 @@ Useful if you've captured a mono signal in stereo and your player can handle mono MPEG. .TP +.BI -e +Use CRC error protection. +.TP .BI -V Force VCD comaptible output. Same as -b 224 -r 44100 -s. .TP -.BI -o outputpathname +.BI -o \ outputpathname The name of the output file to generate. If '-' is given as the pathname output is written to standard output. .SH AUTHOR This man page was written by Andrew Stevens. Enjoy, -- Stephen Beahm mailto:ste...@ad... |