Definition at line 100 of file VideoSet.h. References Impala::Core::Stream::RgbDataSrcFactory::ConstructWindow(), Impala::FileNameConcat(), Impala::Core::Database::RawDataSet::GetAsPath(), Impala::Core::Database::RawDataSet::GetDirOfFile(), Impala::Core::Database::RawDataSet::GetFileOrDir(), Impala::Util::Database::GetFilePath(), Impala::CmdOptions::GetInstance(), Impala::Core::Database::RawDataSet::GetLocator(), Impala::Persistency::File::GetPath(), Impala::Core::Database::RawDataSet::GetSectionOfFile(), Impala::CmdOptions::GetString(), ILOG_ERROR, Impala::Core::Stream::RgbDataSrcFactory::Instance(), Impala::Core::Database::RawDataSet::mDb, and Impala::Core::Database::RawDataSet::NrFiles(). Referenced by Impala::Application::Util::DoTrecTopicData(), Impala::Core::VideoSet::Walker::DoWalk(), Impala::Visualization::RotorBrowser::RotorView::EnableVideoStills(), Impala::Core::VideoSet::VxsDocument::GotoFrame(), Impala::Application::IDash::ScreenTimeLineVideo::HandleNewVideo(), Impala::Application::IDash::NfiSixView::OpenVideo(), and Impala::Visualization::SegmentationDocumentGuiStills::UpdateFromMpg(). 00101 { 00102 if ((fileId < 0) || (fileId >= NrFiles())) 00103 return 0; 00104 00105 String dirOfFile = GetDirOfFile(fileId); 00106 String path; 00107 00108 #ifndef REPOSITORY_USED // Here comes the deprecated stuff 00109 if (Link::DiskImage::DiskImageUsed() && 00110 dirOfFile.find("//#") != String::npos) 00111 { 00112 String imagePath = mDb->GetFilePath(GetSectionOfFile(fileId), 00113 false, false); 00114 if (imagePath.empty()) 00115 { 00116 ILOG_ERROR("disk image file not found"); 00117 return 0; 00118 } 00119 path = "diskimage:" + imagePath + ':' + GetDirOfFile(fileId) + '/' 00120 + GetFileOrDir(fileId, ".mpg"); 00121 } 00122 else 00123 { 00124 path = mDb->GetFilePath("VideoData", GetSectionOfFile(fileId), 00125 dirOfFile, 00126 GetFileOrDir(fileId, ".mpg"), false, 00127 false); 00128 } 00129 #else // REPOSITORY_USED 00130 path = FileNameConcat("VideoData", GetAsPath(fileId)); 00131 #endif // REPOSITORY_USED 00132 00133 CmdOptions& options = CmdOptions::GetInstance(); 00134 00135 #ifdef USE_IFILE 00136 path = "localfile:" + path; 00137 #endif 00138 00139 Stream::RgbDataSrcFactory& factory = 00140 Stream::RgbDataSrcFactory::Instance(); 00141 #ifndef REPOSITORY_USED // Here comes the deprecated stuff 00142 Stream::RgbDataSrc* src = 00143 factory.ConstructWindow(path, options.GetString("src"), 00144 options.GetString("srcWindow"), mDb); 00145 #else // REPOSITORY_USED 00146 // need to resolve the path for LavcProtocol 00147 typedef Persistency::RepositoryInFileSystem FS; 00148 Persistency::File file = FS::GetInstance().GetFile(GetLocator(), "", 00149 path, false, false); 00150 //Persistency::RgbDataSrcLocator loc(GetLocator(), path); 00151 Persistency::RgbDataSrcLocator loc(GetLocator(), file.GetPath()); 00152 Stream::RgbDataSrc* src = 00153 factory.ConstructWindow(loc, options.GetString("src"), 00154 options.GetString("srcWindow")); 00155 #endif // REPOSITORY_USED 00156 00157 if (!src || !src->Valid()) 00158 { 00159 ILOG_ERROR("Failed at initializing data source"); 00160 if (src) 00161 delete src; 00162 return 0; 00163 } 00164 00165 return src; 00166 }
Here is the call graph for this function:
|