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

bool Impala::Core::Stream::Lavc::StrategyIgnoringNativeIndex::IsValidSeekTarget ( int  frameNr,
const UInt64 seekPos 
) const [inline, private]

Definition at line 385 of file StrategyIgnoringNativeIndex.h.

References Impala::Core::Stream::Lavc::VideoAccessStrategy::CurrentFrameMatchesFrame(), Impala::Core::Stream::Lavc::VideoAccessStrategy::CurrentFrameToRgb(), Impala::Core::Stream::Lavc::VideoAccessStrategy::DecodeNextValidFrame(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get2(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get3(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get4(), ILOG_DEBUG, ILOG_ERROR, Impala::Core::Stream::Lavc::VideoAccessStrategy::Jump(), Impala::Core::Stream::Lavc::VideoAccessStrategy::mFrames, Impala::Core::Stream::Lavc::VideoAccessStrategy::mPackets, and Impala::Core::Table::Table::Size().

Referenced by FindSeekPosition().

00386     {
00387         PacketTrace trace(10);
00388         static const bool MUST_BE_KEY = true;
00389         if (!Jump(seekPos, AVSEEK_FLAG_BYTE, MUST_BE_KEY, 2, &trace))
00390             return false;
00391 
00392         CurrentFrameToRgb();
00393         if (!CurrentFrameMatchesFrame(frameNr, &trace))
00394             return false;
00395 
00396         UInt64 postReadPos = mPackets->Get4(mFrames->Get2(frameNr));
00397         UInt64 lastPostReadPosOfTrace = trace.Get3(trace.Size() - 1);
00398         if (lastPostReadPosOfTrace <= postReadPos)
00399             return true;
00400 
00401         for (int f = frameNr + 1; f < mFrames->Size(); f++)
00402         {
00403             if (!DecodeNextValidFrame(false, &trace))
00404             {
00405                 ILOG_ERROR("Unexpected: could not find/decode frame " << f);
00406                 return false;
00407             }
00408 
00409             CurrentFrameToRgb();
00410             if (!CurrentFrameMatchesFrame(f, &trace))
00411             {
00412                 ILOG_DEBUG(seekPos << " is not a valid seek target for " <<
00413                     "frame " << frameNr << ", following from a mismatch for " <<
00414                     "frame " << f);
00415                 return false;
00416             }
00417 
00418             postReadPos = mPackets->Get4(mFrames->Get2(f));
00419             lastPostReadPosOfTrace = trace.Get3(trace.Size() - 1);
00420             if (lastPostReadPosOfTrace <= postReadPos)
00421                 break;
00422         }
00423         return true;
00424     }

Here is the call graph for this function:


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