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

Int64 Impala::Core::Stream::RgbDataSrcInfo::DumpIndexHashes ( char *  buffer,
const int  maxChars 
) const [inline]

Definition at line 129 of file RgbDataSrcInfo.h.

References DumpHashValue(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get4(), HASH_SIZE, ILOG_ERROR, ILOG_WARN, mIndex, MISSING_FRAME_HASH, and Impala::Core::Table::Table::Size().

Referenced by Impala::Core::VideoSet::VideoIndexValidator::HandleNewFile(), and Impala::Application::DataServer::WriteVideoAsHashes().

00130     {
00131         const int nrOfIndexedFrames = mIndex->Size();
00132         const int maxFrameNr = mIndex->Get1(nrOfIndexedFrames - 1);
00133 
00134         int indx = 0;
00135         Int64 bytesWritten = 0;
00136         int frameNr = 0;
00137         while (indx < nrOfIndexedFrames)
00138         {
00139             String hash;
00140             const int frameNrFromIndexEntry = mIndex->Get1(indx);
00141             if (frameNr < frameNrFromIndexEntry)
00142             {
00143                 ILOG_WARN("Index contains no entry for frame #" << frameNr);
00144                 hash = MISSING_FRAME_HASH;
00145             }
00146             else
00147             {
00148                 if (frameNr > frameNrFromIndexEntry)
00149                 {
00150                     ILOG_ERROR("[DumpIndexHashes] Index contains inconsistency for frame #" << 
00151                         frameNrFromIndexEntry << " at table position " << indx <<
00152                         "  (zero based)");
00153                 }
00154                 const String hash32(mIndex->Get4(indx).GetData(), HASH_SIZE);
00155                 hash = String(hash32.c_str()); // (dummy) hashes may be shorter
00156                 indx++;
00157             }
00158             bytesWritten = DumpHashValue(buffer, maxChars, bytesWritten, hash);
00159             if (bytesWritten < 0)
00160                 return -1;
00161             frameNr++;
00162         }
00163         return bytesWritten;
00164     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:17:24 2010 for ImpalaSrc by  doxygen 1.5.1