void CLocalBrowseWindowState::SetCurrentPath(const CStdString& path) { // Return current path under assumption that Local browse screen has only one source SourcesMap mapSources = m_sourceController.GetSources(); if (CUtil::IsBlurayFolder(path)) UpdateHistory(); if (!mapSources.empty()) { CBrowseWindowSource* firstSource = mapSources.begin()->second; if (firstSource) { firstSource->SetBasePath(path); } else { CLog::Log(LOGWARNING, "CLocalBrowseWindowState::SetCurrentPath - first source is null (browse)"); } } else { CLog::Log(LOGWARNING, "CLocalBrowseWindowState::SetCurrentPath - no sources found (browse)"); } }
void flipSources(SourcesMap & sources) { for (auto i = sources.begin(); i != sources.end(); ++i) { if (i->first.first != "image") { cout << "warning. nonimage source: \"" << i->first.first << "\" : " << i->first.second << ". flipping operation may lead to an error." << endl; } Mat & image = i->second; flip(image, image, 1); } }
CStdString CLocalBrowseWindowState::GetCurrentPath() { // Return current path under assumption that Local browse screen has only one source SourcesMap mapSources = m_sourceController.GetSources(); if (!mapSources.empty()) { CBrowseWindowSource* firstSource = mapSources.begin()->second; if (firstSource) { return firstSource->GetBasePath(); } else { CLog::Log(LOGWARNING, "CLocalBrowseWindowState::GetCurrentPath - first source is null (browse)"); } } else { CLog::Log(LOGWARNING, "CLocalBrowseWindowState::GetCurrentPath - no sources found (browse)"); } return ""; }