remove unnecessary use of linux dvb api in sectionsd

the variable types are not really used as intended, so we can
as well avoid using them at all to make it easier to port to
other platforms

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@761 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
seife
2010-09-12 14:42:35 +00:00
parent fca9d00e6b
commit 4165dc5755
2 changed files with 33 additions and 28 deletions

View File

@@ -32,6 +32,7 @@
#include <dmx_cs.h>
#ifndef DO_NOT_INCLUDE_STUFF_NOT_NEEDED_FOR_SECTIONSD
bool setfilter(const int fd, const uint16_t pid, const uint8_t filter, const uint8_t mask, const uint32_t flags)
{
struct dmx_sct_filter_params flt;
@@ -51,6 +52,7 @@ bool setfilter(const int fd, const uint16_t pid, const uint8_t filter, const uin
}
return true;
}
#endif
struct SI_section_TOT_header
{
@@ -80,7 +82,9 @@ __attribute__ ((packed)); /* 8 bytes */
cDemux * dmxUTC;
bool getUTC(UTC_t * const UTC, const bool TDT)
{
struct dmx_sct_filter_params flt;
unsigned char filter[DMX_FILTER_SIZE];
unsigned char mask[DMX_FILTER_SIZE];
int timeout;
struct SI_section_TDT_header tdt_tot_header;
char cUTC[5];
bool ret = true;
@@ -90,15 +94,15 @@ bool getUTC(UTC_t * const UTC, const bool TDT)
dmxUTC->Open(DMX_PSI_CHANNEL);
}
memset(&flt, 0, sizeof(struct dmx_sct_filter_params));
memset(&filter, 0, DMX_FILTER_SIZE);
memset(&mask, 0, DMX_FILTER_SIZE);
flt.pid = 0x0014;
flt.filter.filter[0] = TDT ? 0x70 : 0x73;
flt.filter.mask [0] = 0xFF;
flt.timeout = 31000;
flt.flags = TDT ? (DMX_ONESHOT | DMX_IMMEDIATE_START) : (DMX_ONESHOT | DMX_CHECK_CRC | DMX_IMMEDIATE_START);
filter[0] = TDT ? 0x70 : 0x73;
mask [0] = 0xFF;
timeout = 31000;
// flags = TDT ? (DMX_ONESHOT | DMX_IMMEDIATE_START) : (DMX_ONESHOT | DMX_CHECK_CRC | DMX_IMMEDIATE_START);
dmxUTC->sectionFilter(flt.pid, flt.filter.filter, flt.filter.mask, 5, flt.timeout);
dmxUTC->sectionFilter(0x0014, filter, mask, 5, timeout);
if(dmxUTC->Read((unsigned char *) &tdt_tot_header, sizeof(tdt_tot_header)) != sizeof(tdt_tot_header)) {
perror("[sectionsd] getUTC: read");