OOOggSeekFileReader.cpp

Go to the documentation of this file.
00001 // OOOggSeekFileReader.cpp : Defines the entry point for the console application.
00002 //
00003 
00004 #include "stdafx.h"
00005 
00006 #include <libilliCore/illicoreconfig.h>
00007 #include <libilliCore/iLE_Math.h>
00008 
00009 #include <libOOOggSeek/AutoOggSeekTable.h>
00010 
00011 #include <iostream>
00012 #include <fstream>
00013 
00014 using namespace std;
00015 
00016 #ifdef WIN32
00017 int __cdecl _tmain(int argc, _TCHAR* argv[])
00018 #else
00019 int main(int argc, char *argv[])
00020 #endif
00021 {
00022 
00023         if (argc < 2) {
00024                 cout << "Usage : OOOggSeekFileReader <seek_table_file>"<<endl;
00025 
00026         } else {
00027                 AutoOggSeekTable *locSeekTable = new AutoOggSeekTable("foo");  // Filename doesn't matter
00028                 locSeekTable->buildTableFromFile(argv[1]);
00029                 OggSeekTable::tSeekMap locSeekMap = locSeekTable->getSeekMap();
00030 
00031                 for (map<LOOG_INT64, unsigned long>::iterator i = locSeekMap.begin(); i != locSeekMap.end(); i++) {
00032                         OggSeekTable::tSeekPair locSeekPair = *i;
00033                         LOOG_UINT64 locTimePoint = locSeekPair.first;
00034                         unsigned long locBytePosition = locSeekPair.second;
00035                         cout << "Seek point: time " << locTimePoint << " at byte offset " << locBytePosition << endl;
00036                 }
00037 
00038                 delete [] locSeekTable;
00039         }
00040         return 0;
00041 }

Generated on Tue Feb 15 14:54:23 2005 for oggdsf by  doxygen 1.3.9