OggStreamMapper.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 //#include "OggDemuxPacketSourcePin.h"
00004 //#include "OggDemuxPacketSourceFilter.h"
00005 
00006 #include <libOOOgg/IOggCallback.h>
00007 #include <vector>
00008 using namespace std;
00009 
00010 
00011 class OggStreamMapper
00012         :       public IOggCallback
00013 {
00014 public:
00015 
00016         enum eStreamState {
00017                 STRMAP_READY,
00018                 STRMAP_PARSING_BOS_PAGES,
00019                 STRMAP_PARSING_HEADERS,
00020                 STRMAP_DATA,
00021                 STRMAP_FINISHED,
00022                 STRMAP_ERROR
00023 
00024         };
00025         OggStreamMapper(OggDemuxPacketSourceFilter* inParentFilter, CCritSec* inParentFilterLock);
00026         virtual ~OggStreamMapper(void);
00027 
00028         //IOggCallback Interface
00029         virtual bool acceptOggPage(OggPage* inOggPage);
00030 
00031         eStreamState streamState();
00032 
00033         bool allStreamsReady();
00034 
00035         unsigned long numPins()                         {               return mPins.size();            }
00036         OggDemuxPacketSourcePin* getPinByIndex(unsigned long inIndex);
00037 
00038 protected:
00039         eStreamState mStreamState;
00040         vector<OggDemuxPacketSourcePin*> mPins;
00041         OggDemuxPacketSourceFilter* mParentFilter;
00042         CCritSec* mParentFilterLock;
00043 
00044         OggPacket* mFishHeadPacket;
00045         unsigned long mSkeletonSerialNo;
00046 
00047         bool addNewPin(OggPage* inOggPage);
00048         OggDemuxPacketSourcePin* getMatchingPin(unsigned long inSerialNo);
00049 
00050         bool handleFishHead(OggPage* inOggPage);
00051         bool isFishHead(OggPage* inOggPage);
00052 };

Generated on Thu Feb 16 23:48:13 2006 for oggdsf by  doxygen 1.3.9