/* epid by Jacob Balazer http://www-personal.umich.edu/~balazer/atsc/ This program is licensed free for personal use. You may not distribute the source or executable. */ #include #include #include //i rule #define BUFFER_SIZE_MB 69 #define EPIDSIZE 20 /* define NULLPACKETS will replace packets with null packets instead of just clearing the payload */ #define NULLPACKETS /* define INVERSE will erase PIDs that you _do not_ specify on the command line */ #define notINVERSE int main(int argc, char **argv); void usage(char *argv); int main(int argc, char **argv) { FILE *input, *output; unsigned char *buffer; int buffersize, datasize; int pid; unsigned int zero, one, two, three; #ifdef DEBUG int pidcount[8192]; #endif unsigned char epid[8192]; int packetcount=0, erasecount=0, x, r, argpos, savefiles; WIN32_FIND_DATA FileData; HANDLE hSearch; char *filepattern, *inputfilename, outputfilename[255]; if(argc<2) usage(argv[0]); /* check for -s input argument */ if(argv[1][0] == '-' && argv[1][1] == 's') { savefiles=1; argpos=2; } else { savefiles=0; argpos=1; } filepattern = argv[argpos]; argpos++; /* set up table of PIDs to erase - epid[PID] == 0 if PID is not to be erased epid[PID] == 1 if PID is to be erased */ for(x=0; x<8192; x++) epid[x]=0; for(x=0; (x<(argc-argpos) && x [0xPID] [0xPID] ...\n", argv); printf(" -s: save input files instead of overwriting them\n"); exit(1); }