Definition at line 140 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::DoExportAnnoMpeg7(), Impala::Application::Util::DoImportAnnotations(), Impala::Application::Util::DoImportAnnotationsActive(), Impala::Application::Util::DoImportAnnotationsOrk(), Impala::Application::Util::DoTrecTopicData(), Impala::Core::VideoSet::Walker::DoWalk(), Impala::Visualization::RotorBrowser::RotorView::EnableVideoStills(), Impala::Visualization::SegmentationDocumentGuiAnno::GetCurrentVideo(), Impala::Core::VideoSet::VxsDocument::GotoFrame(), Impala::Visualization::AllFramesTLineVideo::HandleNewVideo(), Impala::Application::IDash::ScreenTimeLineVideo::HandleNewVideo(), Impala::Application::IDash::NfiSixView::OpenVideo(), and Impala::Visualization::SegmentationDocumentGuiStills::UpdateFromMpg(). 00141 { 00142 if ((fileId < 0) || (fileId >= NrFiles())) 00143 return 0; 00144 00145 String dirOfFile = GetDirOfFile(fileId); 00146 String path; 00147 00148 #ifndef REPOSITORY_USED // Here comes the deprecated stuff 00149 if (Link::DiskImage::DiskImageUsed() && 00150 dirOfFile.find("//#") != String::npos) 00151 { 00152 String imagePath = mDb->GetFilePath(GetSectionOfFile(fileId), 00153 false, false); 00154 if (imagePath.empty()) 00155 { 00156 ILOG_ERROR("disk image file not found"); 00157 return 0; 00158 } 00159 path = "diskimage:" + imagePath + ':' + GetDirOfFile(fileId) + '/' 00160 + GetFileOrDir(fileId, ".mpg"); 00161 } 00162 else 00163 { 00164 path = mDb->GetFilePath("VideoData", GetSectionOfFile(fileId), 00165 dirOfFile, 00166 GetFileOrDir(fileId, ".mpg"), false, 00167 false); 00168 } 00169 #else // REPOSITORY_USED 00170 path = FileNameConcat("VideoData", GetAsPath(fileId)); 00171 #endif // REPOSITORY_USED 00172 00173 CmdOptions& options = CmdOptions::GetInstance(); 00174 00175 #ifdef USE_IFILE 00176 path = "localfile:" + path; 00177 #endif 00178 00179 Stream::RgbDataSrcFactory& factory = 00180 Stream::RgbDataSrcFactory::Instance(); 00181 #ifndef REPOSITORY_USED // Here comes the deprecated stuff 00182 Stream::RgbDataSrc* src = 00183 factory.ConstructWindow(path, options.GetString("src"), 00184 options.GetString("srcWindow"), mDb); 00185 #else // REPOSITORY_USED 00186 // need to resolve the path for LavcProtocol 00187 typedef Persistency::RepositoryInFileSystem FS; 00188 Persistency::File file = FS::GetInstance().GetFile(GetLocator(), "", 00189 path, false, false); 00190 //Persistency::RgbDataSrcLocator loc(GetLocator(), path); 00191 Persistency::RgbDataSrcLocator loc(GetLocator(), file.GetPath()); 00192 Stream::RgbDataSrc* src = 00193 factory.ConstructWindow(loc, options.GetString("src"), 00194 options.GetString("srcWindow")); 00195 #endif // REPOSITORY_USED 00196 00197 if (!src || !src->Valid()) 00198 { 00199 ILOG_ERROR("Failed at initializing data source"); 00200 if (src) 00201 delete src; 00202 return 0; 00203 } 00204 00205 return src; 00206 }
Here is the call graph for this function:
|