diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-04-08 00:55:32 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-04-08 00:55:32 +0000 |
| commit | 56881ef900d55ee6056b0c4d9dd9954e950ca32e (patch) | |
| tree | 5e7a12e42e14f16c4489ddbecb976bb2734d1fe3 | |
| parent | ce6a641bebc8e3e3ef14b624aa67d1dca1e8310e (diff) | |
| download | enigma2-56881ef900d55ee6056b0c4d9dd9954e950ca32e.tar.gz enigma2-56881ef900d55ee6056b0c4d9dd9954e950ca32e.zip | |
reserve first two demuxes for decoder
| -rw-r--r-- | lib/dvb/dvb.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index 9d5a68aa..18765ad3 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -273,12 +273,18 @@ RESULT eDVBResourceManager::allocateDemux(eDVBRegisteredFrontend *fe, ePtr<eDVBA int n=0; /* FIXME: hardware demux policy */ if (!(cap & iDVBChannel::capDecode)) - ++i, ++n; + { + if (m_demux.size() > 2) /* assumed to be true, otherwise we have lost anyway */ + { + ++i, ++n; + ++i, ++n; + } + } for (; i != m_demux.end(); ++i, ++n) if ((!i->m_inuse) && ((!fe) || (i->m_adapter == fe->m_adapter))) { - if ((cap & iDVBChannel::capDecode) && n) + if ((cap & iDVBChannel::capDecode) && (n >= 2)) continue; demux = new eDVBAllocatedDemux(i); @@ -997,6 +1003,11 @@ RESULT eDVBChannel::getDemux(ePtr<iDVBDemux> &demux, int cap) demux = *our_demux; /* don't hold a reference to the decoding demux, we don't need it. */ + + /* FIXME: by dropping the 'allocated demux' in favour of the 'iDVBDemux', + the refcount is lost. thus, decoding demuxes are never allocated. + + this poses a big problem for PiP. */ if (cap & capDecode) our_demux = 0; return 0; |
