Updated project files to VS2008 SP1. Removed deprecated features (and warning message...
[xiph/unicode.git] / oggdsf / src / lib / core / directshow / dsfOggDemux / CachedHTTPFileSource.h
blob3a987ca0e07ed191f47ac124a0c1d04eb7049507
1 #pragma once
5 class CachedHTTPFileSource
6 : public IFilterDataSource
7 , public CAMThread
8 , protected HTTPSocket
10 public:
11 CachedHTTPFileSource(void);
12 virtual ~CachedHTTPFileSource(void);
14 //Thread commands
15 static const int THREAD_RUN = 0;
16 static const int THREAD_EXIT = 1;
19 //IFilterDataSource
20 virtual unsigned long seek(unsigned long inPos);
21 virtual void close();
22 virtual bool open(string inSourceLocation);
23 virtual void clear();
24 virtual bool isEOF();
25 virtual unsigned long read(char* outBuffer, unsigned long inNumBytes);
27 //CAMThread pure virtuals
28 DWORD ThreadProc();
29 protected:
30 typedef pair<__int64, wstring> tMapValue;
31 typedef pair<__int64, tMapValue> tMapEntry;
33 typedef map<__int64, tMapValue> tRangeMap;
35 tRangeMap mRangeMap;
37 SingleMediaFileCache mReadFile;
38 SingleMediaFileCache mWriteFile;
40 tMapEntry mCurrentReadRange;
41 tMapEntry mCurrentWriteRange;
43 //Cache helpers
44 CachedHTTPFileSource::tMapEntry findNextHoleInData(__int64 inUpto);
45 bool inRange(CachedHTTPFileSource::tMapEntry inTestRange, __int64 inTestValue);
47 bool startThread();
48 void DataProcessLoop();
49 CCritSec* mBufferLock;