femanager: allow starting without frontend (for testing)

Origin commit data
------------------
Branch: ni/coolstream
Commit: 95813ab60e
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-05-24 (Fri, 24 May 2013)


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

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-05-24 17:06:48 +02:00
parent c5505e2dc3
commit f413d8ecc7

View File

@@ -114,6 +114,14 @@ bool CFEManager::Init()
dmap.push_back(CFeDmx(i));
INFO("found %d frontends, %d demuxes\n", (int)femap.size(), (int)dmap.size());
/* for testing without a frontend, export SIMULATE_FE=1 */
if (femap.empty() && getenv("SIMULATE_FE")) {
INFO("SIMULATE_FE is set, adding dummy frontend for testing");
fe = new CFrontend(0,0);
fekey = MAKE_FE_KEY(0, 0);
femap.insert(std::pair <unsigned short, CFrontend*> (fekey, fe));
livefe = fe;
}
if (femap.empty())
return false;