gui/movieplayer.cpp: allow getInstance() to return background instance

Origin commit data
------------------
Branch: ni/coolstream
Commit: c4197fb5f3
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2015-10-16 (Fri, 16 Oct 2015)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2015-10-16 14:53:35 +03:00
parent a90128c0b5
commit 6e54246021
2 changed files with 3 additions and 3 deletions

View File

@@ -85,7 +85,7 @@ cPlayback *CMoviePlayerGui::playback;
CMovieBrowser* CMoviePlayerGui::moviebrowser;
CBookmarkManager * CMoviePlayerGui::bookmarkmanager;
CMoviePlayerGui& CMoviePlayerGui::getInstance()
CMoviePlayerGui& CMoviePlayerGui::getInstance(bool background)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(bgmutex);
if (!instance_mp )
@@ -94,7 +94,7 @@ CMoviePlayerGui& CMoviePlayerGui::getInstance()
instance_bg = new CMoviePlayerGui();
printf("[neutrino CMoviePlayerGui] Instance created...\n");
}
return *instance_mp;
return background ? *instance_bg : *instance_mp;
}
CMoviePlayerGui::CMoviePlayerGui()

View File

@@ -195,7 +195,7 @@ class CMoviePlayerGui : public CMenuTarget
public:
~CMoviePlayerGui();
static CMoviePlayerGui& getInstance();
static CMoviePlayerGui& getInstance(bool background = false);
int exec(CMenuTarget* parent, const std::string & actionKey);
bool Playing() { return playing; };