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

UInt64 Impala::Core::Stream::RgbDataSrcInfo::GetPos ( int  fr  )  const [inline, protected]

Definition at line 492 of file RgbDataSrcInfo.h.

References DUMMY_FRAME_HASH, FrameHash(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get3(), ILOG_ERROR, ILOG_WARN, mIndex, Impala::Core::Stream::RgbDataSrc::mIndexExists, and Impala::Core::Stream::RgbDataSrc::mNewImpl.

Referenced by Impala::Core::Stream::RgbDataSrcLavc_old::JumpToKeyFrame(), and Impala::Core::Stream::RgbDataSrcLavc::SeekFrame().

00493     {
00494         const int indexPosition = fr;
00495 
00496         if (mIndexExists)
00497         {
00498             if (indexPosition < mIndex->Size())
00499             {
00500                 if (FrameHash(indexPosition) == DUMMY_FRAME_HASH)
00501                 {
00502                     ILOG_WARN("No position for invalid frame: " << fr << 
00503                         "; returning next frame's position instead");
00504                     return GetPos(fr + 1);
00505                 }
00506                 else
00507                     return mIndex->Get3(indexPosition);
00508             }
00509             else
00510                 ILOG_ERROR("Index position out of bounds: " << indexPosition);
00511         }
00512         else
00513         {
00514             ILOG_WARN("No external index available; " <<
00515                 "cannot lookup seek position for frame: " << fr);
00516             if (!mNewImpl)
00517                 return 0; // backw.compat.
00518         }
00519 
00520         return -1;
00521     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:20:31 2011 for ImpalaSrc by  doxygen 1.5.1