bool _parseStreamHeader(List2<AVIStreamNode>& streams, DWORD dwLengthLeft);
bool _parseIndexBlock(List2<AVIStreamNode>& streams, int count, __int64);
void _parseExtendedIndexBlock(List2<AVIStreamNode>& streams, AVIStreamNode *pasn, __int64 fpos, DWORD dwLength);
void _destruct();
char * _StreamRead(long& bytes);
void _SelectFile(int file);
};
IAVIReadHandler *CreateAVIReadHandler(PAVIFILE paf) {
return new AVIReadHandler(paf);
}
IAVIReadHandler *CreateAVIReadHandler(const char *pszFile) {
return new AVIReadHandler(pszFile);
}
///////////////////////////////////////////////////////////////////////////
AVIReadCache::AVIReadCache(int nlines, int nstream, AVIReadHandler *root, AVIStreamNode *psnData) {
buffer = new __int64[nlines][2];
if (!buffer) throw MyMemoryError();
this->psnData = psnData;
lines = 0;
lines_max = nlines;
read_tail = 0;
write_tail = 0;
stream = nstream;
source = root;
ResetStatistics();
}
AVIReadCache::~AVIReadCache() {
delete[] buffer;
}
void AVIReadCache::ResetStatistics() {
reads = 0;
cache_hit_bytes = cache_miss_bytes = 0;
}
bool AVIReadCache::WriteBegin(__int64 pos, long len) {
int needed;
// delete lines as necessary to make room
needed = 1 + (len+15)/16;
i
上一篇:
AVIIndex.cpp
下一篇:
全程领航顶级赛事,ARCFOX加速品牌向上