5 class CachedHTTPFileSource
6 : public IFilterDataSource
11 CachedHTTPFileSource(void);
12 virtual ~CachedHTTPFileSource(void);
15 static const int THREAD_RUN
= 0;
16 static const int THREAD_EXIT
= 1;
20 virtual unsigned long seek(unsigned long inPos
);
22 virtual bool open(string inSourceLocation
);
25 virtual unsigned long read(char* outBuffer
, unsigned long inNumBytes
);
27 //CAMThread pure virtuals
30 typedef pair
<__int64
, wstring
> tMapValue
;
31 typedef pair
<__int64
, tMapValue
> tMapEntry
;
33 typedef map
<__int64
, tMapValue
> tRangeMap
;
37 SingleMediaFileCache mReadFile
;
38 SingleMediaFileCache mWriteFile
;
40 tMapEntry mCurrentReadRange
;
41 tMapEntry mCurrentWriteRange
;
44 CachedHTTPFileSource::tMapEntry
findNextHoleInData(__int64 inUpto
);
45 bool inRange(CachedHTTPFileSource::tMapEntry inTestRange
, __int64 inTestValue
);
48 void DataProcessLoop();
49 CCritSec
* mBufferLock
;