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

bool Impala::Core::Stream::Lavc::VideoAccessObject::Seek ( const UInt64 target,
int  flags 
) const [inline]

Seeks to the specified target, which is defined by the provided libavformat flags AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE and AVSEEK_FLAG_ANY.

No data is read.

Definition at line 343 of file VideoAccessObject.h.

References ILOG_ERROR, mFormatCtx, mVideoCodecCtx, and mVideoStreamIndex.

Referenced by Impala::Core::Stream::Lavc::StrategyUsingNativeIndex::ConstructIndexProtected(), Impala::Core::Stream::Lavc::VideoAccessStrategy::Jump(), Reset(), and Impala::Core::Stream::Lavc::StrategyUsingNativeIndex::ScanProtected().

00344     {
00345         if ((Int64) target < 0)
00346         {
00347             ILOG_ERROR("File position value " << target << 
00348                 " not supported (should fit in Int64)");
00349             return false;
00350         }
00351 
00352         avcodec_flush_buffers(mVideoCodecCtx);
00353 
00354         const int result = 
00355             av_seek_frame(mFormatCtx, mVideoStreamIndex, (Int64) target, flags);
00356 
00357         if (result < 0)
00358         {
00359             ILOG_ERROR("av_seek_frame returned a negative value: " << result << 
00360                 " (target=" << target << ", flags=" << flags << ")");
00361             return false;
00362         }
00363         return true;
00364     }


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