longer sdt timeout (needed for "dish network" scan)
[enigma2.git] / lib / dvb / specs.h
index 23ef2cecbd7dceb80395230ed9f273365e93d623..6be938cb067f9d3efca2abddc5977d436f664ed1 100644 (file)
@@ -14,12 +14,12 @@ struct eDVBPMTSpec
 {
        eDVBTableSpec m_spec;
 public:
-       eDVBPMTSpec(int pid, int sid)
+       eDVBPMTSpec(int pid, int sid, int timeout = 20000)
        {
                m_spec.pid     = pid;
                m_spec.tid     = ProgramMapSection::TID;
                m_spec.tidext  = sid;
-               m_spec.timeout = 20000; // ProgramMapSection::TIMEOUT;
+               m_spec.timeout = timeout; // ProgramMapSection::TIMEOUT;
                m_spec.flags   = eDVBTableSpec::tfAnyVersion | 
                        eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfHaveTIDExt | 
                        eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout;
@@ -43,6 +43,23 @@ public:
                        eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
                        eDVBTableSpec::tfHaveTimeout;
        }
+       eDVBSDTSpec(int tsid, bool other=false)
+       {
+               m_spec.pid     = ServiceDescriptionSection::PID;
+               m_spec.tid     = ServiceDescriptionSection::TID;
+               m_spec.tidext  = tsid;
+               m_spec.timeout = 60000; // ServiceDescriptionSection::TIMEOUT;
+               m_spec.flags   = eDVBTableSpec::tfAnyVersion |
+                       eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
+                       eDVBTableSpec::tfHaveTIDExt | eDVBTableSpec::tfHaveTimeout;
+               if (other)
+               {
+                       // SDT other transport stream have TID 0x46 (current is 0x42)
+                       // so we mask out the third bit in table id mask..
+                       m_spec.flags |= eDVBTableSpec::tfHaveTIDMask;
+                       m_spec.tid_mask = 0xFB;
+               }
+       }
        operator eDVBTableSpec &()
        {
                return m_spec;
@@ -91,11 +108,11 @@ struct eDVBPATSpec
 {
        eDVBTableSpec m_spec;
 public:
-       eDVBPATSpec()
+       eDVBPATSpec(int timeout=20000)
        {
                m_spec.pid     = ProgramAssociationSection::PID;
                m_spec.tid     = ProgramAssociationSection::TID;
-               m_spec.timeout = 20000; // ProgramAssociationSection::TIMEOUT;
+               m_spec.timeout = timeout; // ProgramAssociationSection::TIMEOUT;
                m_spec.flags   = eDVBTableSpec::tfAnyVersion |
                        eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
                        eDVBTableSpec::tfHaveTimeout;
@@ -127,4 +144,25 @@ public:
        }
 };
 
+class eDVBEITSpecOther
+{
+       eDVBTableSpec m_spec;
+public:
+               /* this is for now&next on actual transponder. */
+       eDVBEITSpecOther(int sid)
+       {
+               m_spec.pid     = EventInformationSection::PID;
+               m_spec.tid     = TID_EIT_OTHER;
+               m_spec.tidext  = sid;
+               m_spec.timeout = EventInformationSection::TIMEOUT;
+               m_spec.flags   = eDVBTableSpec::tfAnyVersion |
+                       eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfHaveTIDExt |
+                       eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout;
+       }
+       operator eDVBTableSpec &()
+       {
+               return m_spec;
+       }
+};
+
 #endif