Home || Visual Search || Applications || Architecture || 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 344 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().

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


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