dvb.cpp: detect boxtype via /proc/stb/info/model for demux policy
[enigma2.git] / lib / dvb / dvb.h
index 1a773efadb4d8a1f6b00a473061f58acb1c2412b..413462d60360ce1109a6dc47e818a9208987df1e 100644 (file)
 #include <lib/dvb/demux.h>
 #include <lib/dvb/frontend.h>
 #include <lib/dvb/tstools.h>
+#include <lib/dvb/esection.h>
 #include <connection.h>
 
+#include <dvbsi++/service_description_section.h>
+
 class eDVBChannel;
 
        /* we do NOT handle resource conflicts here. instead, the allocateChannel
@@ -132,6 +135,10 @@ class eDVBResourceManager: public iObject, public Object
        DECLARE_REF(eDVBResourceManager);
        int avail, busy;
 
+       enum { DM7025, DM800, DM500HD, DM8000 };
+
+       int m_boxtype;
+
        eSmartPtrList<iDVBAdapter> m_adapter;
        eSmartPtrList<eDVBRegisteredDemux> m_demux;
        eSmartPtrList<eDVBRegisteredFrontend> m_frontend, m_simulate_frontend;
@@ -184,7 +191,7 @@ public:
        };
        
        RESULT connectChannelAdded(const Slot1<void,eDVBChannel*> &channelAdded, ePtr<eConnection> &connection);
-       int canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID &ignore);
+       int canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID &ignore, bool simulate=false);
 
                /* allocate channel... */
        RESULT allocateChannel(const eDVBChannelID &channelid, eUsePtr<iDVBChannel> &channel, bool simulate=false);
@@ -206,7 +213,7 @@ public:
 #ifdef SWIG
 public:
 #endif
-       int canAllocateFrontend(ePtr<iDVBFrontendParameters> &feparm);
+       int canAllocateFrontend(ePtr<iDVBFrontendParameters> &feparm, bool simulate=false);
        bool canMeasureFrontendInputPower();
        PSignal1<void,int> frontendUseMaskChanged;
        SWIG_VOID(RESULT) allocateRawChannel(eUsePtr<iDVBChannel> &SWIG_OUTPUT, int slot_index);
@@ -259,6 +266,8 @@ public:
        RESULT getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos, int mode);
 
        int getUseCount() { return m_use_count; }
+
+       RESULT requestTsidOnid(ePyObject callback);
 private:
        ePtr<eDVBAllocatedFrontend> m_frontend;
        ePtr<eDVBAllocatedDemux> m_demux, m_decoder_demux;
@@ -286,7 +295,7 @@ private:
        
        void cueSheetEvent(int event);
        ePtr<eConnection> m_conn_cueSheetEvent;
-       int m_skipmode_m, m_skipmode_n;
+       int m_skipmode_m, m_skipmode_n, m_skipmode_frames, m_skipmode_frames_remainder;
        
        std::list<std::pair<off_t, off_t> > m_source_span;
        void getNextSourceSpan(off_t current_offset, size_t bytes_read, off_t &start, size_t &size);
@@ -299,6 +308,12 @@ private:
        oRefCount m_use_count;
        void AddUse();
        void ReleaseUse();
+
+               /* for tsid/onid read */
+       ePyObject m_tsid_onid_callback;
+       ePtr<iDVBDemux> m_tsid_onid_demux;
+       ePtr<eTable<ServiceDescriptionSection> > m_SDT;
+       void SDTready(int err);
 };
 #endif // SWIG