dm800se support
[enigma2.git] / lib / dvb / dvb.cpp
index 656b6da0111493d9d6ace0d2bf10dabbd412de9a..40d441861d97d5afcffd4f064464961c192fb617 100644 (file)
@@ -96,6 +96,8 @@ eDVBResourceManager::eDVBResourceManager()
                m_boxtype = DM800;
        else if (!strncmp(tmp, "dm500hd\n", rd))
                m_boxtype = DM500HD;
+       else if (!strncmp(tmp, "dm800se\n", rd))
+               m_boxtype = DM800SE;
        else {
                eDebug("boxtype detection via /proc/stb/info not possible... use fallback via demux count!\n");
                if (m_demux.size() == 3)
@@ -455,7 +457,7 @@ RESULT eDVBResourceManager::allocateDemux(eDVBRegisteredFrontend *fe, ePtr<eDVBA
 
        ePtr<eDVBRegisteredDemux> unused;
 
-       if (m_boxtype == DM800 || m_boxtype == DM500HD) // dm800 / 500hd
+       if (m_boxtype == DM800 || m_boxtype == DM500HD || m_boxtype == DM800SE) // dm800 / 500hd
        {
                cap |= capHoldDecodeReference; // this is checked in eDVBChannel::getDemux
                for (; i != m_demux.end(); ++i, ++n)
@@ -1657,6 +1659,18 @@ void eDVBChannel::SDTready(int result)
        m_SDT = 0;
 }
 
+int eDVBChannel::reserveDemux()
+{
+       ePtr<iDVBDemux> dmx;
+       if (!getDemux(dmx, 0))
+       {
+               uint8_t id;
+               if (!dmx->getCADemuxID(id))
+                       return id;
+       }
+       return -1;
+}
+
 RESULT eDVBChannel::requestTsidOnid(ePyObject callback)
 {
        if (PyCallable_Check(callback))
@@ -1764,6 +1778,8 @@ RESULT eDVBChannel::playFile(const char *file)
        m_pvr_thread->setStreamMode(1);
        m_pvr_thread->setScatterGather(this);
 
+       m_event(this, evtPreStart);
+
        if (m_pvr_thread->start(file, m_pvr_fd_dst))
        {
                delete m_pvr_thread;