Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

int Impala::Core::Stream::Lavc::VideoIndex::MaxNonTargetFrameReads (  )  const [inline]

Returns the maximum number of frames that have to be read before reading some requested frame.

This equals the maximum number of consecutive non-seekable frames, not taking into account whether frames are bad.

Definition at line 101 of file VideoIndex.h.

References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get2(), Impala::Max(), mSeekTable, and NrOfEntries().

Referenced by Impala::Core::Stream::Lavc::VideoAccessStrategy::ConstructIndex().

00102     {
00103         int maxReads = 0;
00104         int prevSeekableFrameNr = -1;
00105         const int nrOfEntries = NrOfEntries();
00106         for (int i = 0; i < nrOfEntries; i++)
00107         {
00108             if (mSeekTable.Get2(i) != 0)
00109             {
00110                 int frameNr = mSeekTable.Get1(i);
00111                 int curReads = (frameNr - 1) - prevSeekableFrameNr;
00112                 maxReads = Impala::Max(maxReads, curReads);
00113                 prevSeekableFrameNr = frameNr;
00114             }
00115         }
00116         const int trailingNonSeekableFrames = 
00117             (nrOfEntries - 1) - prevSeekableFrameNr;
00118         maxReads = Impala::Max(maxReads, trailingNonSeekableFrames);
00119         return maxReads;
00120     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:19:08 2010 for ImpalaSrc by  doxygen 1.5.1