Definition at line 207 of file StrategyIgnoringNativeIndex.h. References Impala::Core::Stream::Lavc::VideoAccessObject::AtEof(), Impala::Core::Stream::Lavc::VideoAccessObject::GopSize(), ILOG_DEBUG, Impala::Max(), Impala::Core::Stream::Lavc::VideoAccessStrategy::mVao, ProcessPacket(), and Impala::Core::Stream::Lavc::VideoAccessObject::ReadPacket(). Referenced by ScanPackets(). 00208 { 00209 const int MAX_POST_EOF_FAILURES = Max(15, 2 * mVao->GopSize()); 00210 int nrOfConsecutivePostEofFailures = 0; 00211 00212 while (true) 00213 { 00214 const bool atEofBeforeRead = mVao->AtEof(); 00215 const int readPacketResult = mVao->ReadPacket(); 00216 if (mVao->AtEof() && !atEofBeforeRead) 00217 ILOG_DEBUG("Reached end of file"); 00218 00219 const bool readPacketFailed = (readPacketResult < 0); 00220 if (!readPacketFailed) 00221 { 00222 if (atEofBeforeRead) 00223 { 00224 ILOG_DEBUG("A packet was successfully read after " << 00225 "reading arrived at end of file"); 00226 } 00227 const int packetNr = (*packetCount)++; 00228 ProcessPacket(packetNr, frameCount, validating); 00229 return false; 00230 } 00231 00232 ILOG_DEBUG("ReadPacket() failed and returned: " << 00233 readPacketResult); 00234 00235 if (atEofBeforeRead) 00236 { 00237 if (readPacketFailed) 00238 { 00239 nrOfConsecutivePostEofFailures++; 00240 if (nrOfConsecutivePostEofFailures > MAX_POST_EOF_FAILURES) 00241 { 00242 ILOG_DEBUG("Max. nr of consecutive post-EOF " << 00243 "read failures reached (" << 00244 MAX_POST_EOF_FAILURES << ")"); 00245 return true; 00246 } 00247 } 00248 else 00249 nrOfConsecutivePostEofFailures = 0; 00250 } 00251 } 00252 }
Here is the call graph for this function:
|