Arrived at given DB_FILE in a "normal" walk.
Reimplemented from Impala::Core::VideoSet::Listener. Definition at line 31 of file TestBlocksFile.h. References Impala::File::Eof(), Impala::Core::VideoSet::Segmentation::GetEnd(), Impala::Core::VideoSet::Segmentation::GetFirstShotVideo(), Impala::Util::StringParser::GetInt(), Impala::Core::VideoSet::Segmentation::GetName(), Impala::Core::VideoSet::Segmentation::GetNrShotsVideo(), Impala::Core::VideoSet::Segmentation::GetStart(), Impala::Util::StringParser::GetString(), ILOG_ERROR, ILOG_INFO, mSegmentation, Impala::File::ReadLine(), and Impala::File::Valid(). 00032 { 00033 String fName = vs->GetFilePathMetaData(fileId, "", true, ".blocks", 00034 false, false); 00035 ILOG_INFO("Checking " << fName); 00036 File shots(fName, "r"); 00037 if (!shots.Valid()) 00038 { 00039 ILOG_ERROR("couldn't find " << fName); 00040 return; 00041 } 00042 int firstShot = mSegmentation->GetFirstShotVideo(fileId); 00043 int nrShots = mSegmentation->GetNrShotsVideo(fileId); 00044 //std::cout << "should have " << nrShots << " shots" << std::endl; 00045 int i = 0; 00046 while (! shots.Eof()) 00047 { 00048 // start with shots file 00049 String line = shots.ReadLine(true); 00050 if (! line[0]) 00051 continue; 00052 Util::StringParser p(line); 00053 if (p.GetInt() != mSegmentation->GetStart(firstShot + i)) 00054 { 00055 ILOG_ERROR("start didn't match in shot " << i+1); 00056 } 00057 if (p.GetInt() != mSegmentation->GetEnd(firstShot + i)) 00058 { 00059 ILOG_ERROR("end didn't match in shot " << i+1); 00060 } 00061 if (p.GetString() != mSegmentation->GetName(firstShot + i)) 00062 { 00063 ILOG_ERROR("name didn't match in shot " << i+1); 00064 } 00065 i++; 00066 } 00067 if (i != nrShots) 00068 { 00069 ILOG_ERROR("nr shots didn't match in " << fName); 00070 } 00071 }
Here is the call graph for this function:
|