7 #define TABLE_eDebug(x...) do { if (m_debug) eDebug(x); } while(0)
8 #define TABLE_eDebugNoNewLineStart(x...) do { if (m_debug) eDebugNoNewLineStart(x); } while(0)
9 #define TABLE_eDebugNoNewLine(x...) do { if (m_debug) eDebugNoNewLine(x); } while(0)
21 void sectionRead(
const uint8_t *
data);
39 template <
class Section>
43 std::vector<Section*> sections;
45 unsigned char m_section_data[4096];
49 unsigned int ssize = sections.size();
50 if (max < ssize || nr >=
max)
52 TABLE_eDebug(
"[eTable] bounds error: max(%d) < ssize(%d) || nr(%d) >= max(%d)",
56 if (avail.find(nr) != avail.end())
59 memset(m_section_data, 0, 4096);
60 memcpy(m_section_data,
data, 4096);
63 sections[nr] =
new Section(
data);
67 for (
unsigned int i = 0; i <
max; ++i)
68 if (avail.find(i) != avail.end())
75 if (avail.size() ==
max)
87 for (std::set<int>::iterator i(avail.begin()); i != avail.end(); ++i)
102 template <
class Table>
112 struct timespec m_prev_table_update;
148 next->start(demux, spec);
157 next->start(
reader, spec);
186 eDebug(
"[eAUTable] aborted!");
227 if (current && (!current->getSpec(spec)))
234 else if (m_table_cnt > 1)
236 eDebug(
"[eAUTable] Seen two consecutive table version changes within 500ms. "
237 "This seems broken, so auto update for pid %04x, table %02x is now disabled!!",
245 clock_gettime(CLOCK_MONOTONIC, &m_prev_table_update);
252 next->eGTable::start(m_demux, spec);
256 next->eGTable::start(m_reader, spec);
static int ptr
Definition: bcm.cpp:17
Definition: esection.h:93
virtual ~eAUGTable()
Definition: esection.h:97
virtual void getNext(int err)=0
sigc::signal1< void, int > tableReady
Definition: esection.h:97
void slotTableReady(int)
Definition: esection.cpp:155
Definition: esection.h:104
void inject(Table *t)
Definition: esection.h:199
~eAUTable()
Definition: esection.h:131
int begin(eMainloop *m, const eDVBTableSpec &spec, ePtr< iDVBSectionReader > reader)
Definition: esection.h:152
eAUTable()
Definition: esection.h:127
int get()
Definition: esection.h:161
int begin(eMainloop *m, const eDVBTableSpec &spec, ePtr< iDVBDemux > demux)
Definition: esection.h:143
RESULT getCurrent(ePtr< Table > &ptr)
Definition: esection.h:175
int ready()
Definition: esection.h:194
void stop()
Definition: esection.h:136
void getNext(int error)
Definition: esection.h:205
Definition: esection.h:12
sigc::signal1< void, int > tableReady
Definition: esection.h:29
static const bool m_debug
Definition: esection.h:25
virtual unsigned int totalSections(unsigned int max)
Definition: esection.h:27
eGTable()
Definition: esection.cpp:52
virtual ~eGTable()
Definition: esection.cpp:151
RESULT getSpec(eDVBTableSpec &spec)
Definition: esection.h:33
RESULT start(iDVBSectionReader *reader, const eDVBTableSpec &table)
Definition: esection.cpp:59
int error
Definition: esection.h:35
virtual int createTable(unsigned int nr, const uint8_t *data, unsigned int max)=0
int ready
Definition: esection.h:36
Definition: esection.h:41
int createTable(unsigned int nr, const uint8_t *data, unsigned int max)
Definition: esection.h:47
std::vector< Section * > & getSections()
Definition: esection.h:83
~eTable()
Definition: esection.h:85
unsigned char * getBufferData()
Definition: esection.h:84
static long timeout_usec(const timespec &orig)
Definition: ebase.h:128
#define ASSERT(x)
Definition: eerror.h:155
#define TABLE_eDebug(x...)
Definition: esection.h:7
#define TABLE_eDebugNoNewLineStart(x...)
Definition: esection.h:8
#define TABLE_eDebugNoNewLine(x...)
Definition: esection.h:9
unsigned char data[256]
Definition: hdmi_cec.h:2
#define CONNECT(_signal, _slot)
Definition: libsig_comp.h:6
int RESULT
Definition: object.h:12
eDebug("[ePicLoad] deprecated loadPic function used!!! please use the non blocking version! you can see demo code in Pictureplayer plugin... this function is removed in the near future!")
#define max(a, b)
Definition: region.cpp:7
int flags
Definition: idvb.h:58
int pid
Definition: idvb.h:38
int tid
Definition: idvb.h:38
@ tfHaveTimeout
Definition: idvb.h:54
@ tfThisVersion
Definition: idvb.h:50
@ tfAnyVersion
Definition: idvb.h:49