/** graps cdis Compile with g++ -o cdigrap cdigrap.cpp -lmpeg */ #ifdef CONFIG_H #include "config.h" #endif #include "inputPlugin.h" #if defined(HAVE_GETOPT_H) #include #endif void usage() { cout << "cdigrab grabs video cds"<"<= argn ) { usage(); exit(-1); } InputStream* in=InputPlugin::createInputStream(args[optind]); in->open(args[optind]); if (startBytes != 0) { cout << "seeking to :"<seek(startBytes); } char* buffer=new char[len]; int cnt=0; FILE* f=fopen(fname,"a+"); while(1) { if (in->eof() == true) { cout << "******* plugin->getStreamState() EOF"<read(buffer,len); fwrite(buffer,len,1,f); cnt++; cout << "grapped:"<