mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
zapit/src/femanager.cpp: change free demux for PiP detection
This commit is contained in:
@@ -393,6 +393,10 @@ void CFEManager::linkFrontends(bool init)
|
|||||||
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
||||||
enabled_count = 0;
|
enabled_count = 0;
|
||||||
unused_demux = 0;
|
unused_demux = 0;
|
||||||
|
int demuxes[MAX_DMX_UNITS];
|
||||||
|
for(int i = 0; i < MAX_DMX_UNITS; i++)
|
||||||
|
demuxes[i] = 0;
|
||||||
|
demuxes[0] = 1;
|
||||||
for(fe_map_iterator_t it = femap.begin(); it != femap.end(); it++) {
|
for(fe_map_iterator_t it = femap.begin(); it != femap.end(); it++) {
|
||||||
CFrontend * fe = it->second;
|
CFrontend * fe = it->second;
|
||||||
int femode = fe->getMode();
|
int femode = fe->getMode();
|
||||||
@@ -442,8 +446,15 @@ void CFEManager::linkFrontends(bool init)
|
|||||||
fe->Init();
|
fe->Init();
|
||||||
if (femode != CFrontend::FE_MODE_UNUSED) {
|
if (femode != CFrontend::FE_MODE_UNUSED) {
|
||||||
enabled_count++;
|
enabled_count++;
|
||||||
} else if (!unused_demux) {
|
if ((fe->fenumber + 1) < MAX_DMX_UNITS)
|
||||||
unused_demux = fe->fenumber + 1;
|
demuxes[fe->fenumber + 1] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(int i = 0; i < MAX_DMX_UNITS; i++) {
|
||||||
|
if (demuxes[i] == 0) {
|
||||||
|
unused_demux = i;
|
||||||
|
INFO("pip demux: %d\n", unused_demux);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -643,10 +654,8 @@ CFrontend * CFEManager::allocateFE(CZapitChannel * channel, bool forrecord)
|
|||||||
cDemux::SetSource(frontend->fenumber+1, frontend->fenumber);
|
cDemux::SetSource(frontend->fenumber+1, frontend->fenumber);
|
||||||
#ifdef ENABLE_PIP
|
#ifdef ENABLE_PIP
|
||||||
/* FIXME until proper demux management */
|
/* FIXME until proper demux management */
|
||||||
if (enabled_count < 4) {
|
if (unused_demux)
|
||||||
channel->setPipDemux(unused_demux ? unused_demux : PIP_DEMUX);
|
channel->setPipDemux(unused_demux);
|
||||||
//cDemux::SetSource(PIP_DEMUX, frontend->fenumber);
|
|
||||||
}
|
|
||||||
INFO("pip demux: %d", channel->getPipDemux());
|
INFO("pip demux: %d", channel->getPipDemux());
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user