mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
zapit/src/femanager.cpp: another hack to find free demux for PiP
This commit is contained in:
@@ -42,6 +42,8 @@
|
|||||||
#include <OpenThreads/ScopedLock>
|
#include <OpenThreads/ScopedLock>
|
||||||
|
|
||||||
static int fedebug = 0;
|
static int fedebug = 0;
|
||||||
|
static int unused_demux;
|
||||||
|
|
||||||
#define FEDEBUG(fmt, args...) \
|
#define FEDEBUG(fmt, args...) \
|
||||||
do { \
|
do { \
|
||||||
if (fedebug) \
|
if (fedebug) \
|
||||||
@@ -372,6 +374,7 @@ void CFEManager::linkFrontends(bool init)
|
|||||||
INFO("linking..");
|
INFO("linking..");
|
||||||
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
||||||
enabled_count = 0;
|
enabled_count = 0;
|
||||||
|
unused_demux = 0;
|
||||||
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;
|
||||||
#if 0
|
#if 0
|
||||||
@@ -423,8 +426,11 @@ void CFEManager::linkFrontends(bool init)
|
|||||||
}
|
}
|
||||||
if (init && femode != CFrontend::FE_MODE_UNUSED)
|
if (init && femode != CFrontend::FE_MODE_UNUSED)
|
||||||
fe->Init();
|
fe->Init();
|
||||||
if (femode != CFrontend::FE_MODE_UNUSED)
|
if (femode != CFrontend::FE_MODE_UNUSED) {
|
||||||
enabled_count++;
|
enabled_count++;
|
||||||
|
} else if (!unused_demux) {
|
||||||
|
unused_demux = fe->fenumber + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -648,7 +654,7 @@ CFrontend * CFEManager::allocateFE(CZapitChannel * channel, bool forrecord)
|
|||||||
#ifdef ENABLE_PIP
|
#ifdef ENABLE_PIP
|
||||||
/* FIXME until proper demux management */
|
/* FIXME until proper demux management */
|
||||||
if (enabled_count < 4) {
|
if (enabled_count < 4) {
|
||||||
channel->setPipDemux(PIP_DEMUX);
|
channel->setPipDemux(unused_demux ? unused_demux : PIP_DEMUX);
|
||||||
//cDemux::SetSource(PIP_DEMUX, frontend->fenumber);
|
//cDemux::SetSource(PIP_DEMUX, frontend->fenumber);
|
||||||
}
|
}
|
||||||
INFO("pip demux: %d", channel->getPipDemux());
|
INFO("pip demux: %d", channel->getPipDemux());
|
||||||
|
Reference in New Issue
Block a user