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

String Impala::Core::Stream::RgbDataSrcLavc::DetermineInfoName ( CString  srcName,
IndexMode  mode,
Util::Database db 
) const [inline, private]

Definition at line 511 of file RgbDataSrcLavc.h.

References Impala::FileNameLastPathSepPos(), Impala::FileNamePath(), Impala::FileNameTail(), Impala::Util::Database::GetFilePath(), ILOG_ERROR, Impala::Util::Database::MakeDir(), and Impala::StringReplaceAll().

00512     {
00513         String infoName = "";
00514         if (Link::DiskImage::DiskImageUsed())
00515         {
00516             String subPath = FileNamePath(srcName);
00517             if (subPath.substr(0, 10) == "diskimage:")
00518             {
00519                 int posAfterDiskImageFileName = subPath.find("://", 10);
00520                 // SK: assume disk image file name is unique, 
00521                 // not needing an additional (sub-)path specification
00522                 const String uptoDiskImageToken = 
00523                     subPath.substr(0, posAfterDiskImageFileName);
00524                 int diskImageFileNamePos = 
00525                     FileNameLastPathSepPos(uptoDiskImageToken) + 1;
00526                 if (diskImageFileNamePos == String::npos)
00527                     ILOG_ERROR("Disk image file was expected to be prefixed "
00528                     << "with a path: " << uptoDiskImageToken);
00529 
00530                 String subSubPath = 
00531                         subPath.substr(posAfterDiskImageFileName + 1);
00532                 subSubPath = StringReplaceAll(subSubPath,
00533                                                      "0x", "0x30x", false);
00534                 subSubPath = StringReplaceAll(subSubPath, 
00535                                                      "//", "/0x2F", false);
00536                 subSubPath = subSubPath.substr(0, subSubPath.size() - 1);
00537                 subPath = subPath.substr(diskImageFileNamePos, 
00538                     posAfterDiskImageFileName-diskImageFileNamePos)+subSubPath;
00539 
00540                 String dir = "FramePosIndex/" + subPath;
00541 
00542                 bool toWrite = (mode == WRITEIDX);
00543                 bool silent = (mode != READIDX);
00544 
00545                 if (toWrite)
00546                     db->MakeDir(dir);
00547 
00548                 String fname = FileNameTail(srcName) + ".info";
00549                 infoName = db->GetFilePath(dir, fname, toWrite, silent);
00550             }
00551             else
00552                 infoName = srcName + ".info";
00553         }
00554         return infoName;
00555     }

Here is the call graph for this function:


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