summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/eit.c b/eit.c
index 40ae874..12045d6 100644
--- a/eit.c
+++ b/eit.c
@@ -16,18 +16,14 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.57 2002/10/13 09:29:05 kls Exp $
+ * $Id: eit.c 1.59 2002/11/02 12:46:53 kls Exp $
***************************************************************************/
#include "eit.h"
#include <ctype.h>
#include <fcntl.h>
#include <limits.h>
-#ifdef NEWSTRUCT
#include <linux/dvb/dmx.h>
-#else
-#include <ost/dmx.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -757,7 +753,7 @@ bool cSchedule::Read(FILE *f, cSchedules *Schedules)
if (*s == 'C') {
unsigned int uServiceID;
if (1 == sscanf(s + 1, "%u", &uServiceID)) {
- cSchedule *p = (cSchedule *)Schedules->SetCurrentServiceID(uServiceID);
+ cSchedule *p = (cSchedule *)Schedules->AddServiceID(uServiceID);
if (p) {
if (!cEventInfo::Read(f, p))
return false;
@@ -786,20 +782,22 @@ cSchedules::~cSchedules()
{
}
/** */
+const cSchedule *cSchedules::AddServiceID(unsigned short servid)
+{
+ const cSchedule *p = GetSchedule(servid);
+ if (!p) {
+ Add(new cSchedule(servid));
+ p = GetSchedule(servid);
+ }
+ return p;
+}
+/** */
const cSchedule *cSchedules::SetCurrentServiceID(unsigned short servid)
{
- pCurrentSchedule = GetSchedule(servid);
- if (pCurrentSchedule == NULL)
- {
- Add(new cSchedule(servid));
- pCurrentSchedule = GetSchedule(servid);
- if (pCurrentSchedule == NULL)
- return NULL;
- }
-
- uCurrentServiceID = servid;
-
- return pCurrentSchedule;
+ pCurrentSchedule = AddServiceID(servid);
+ if (pCurrentSchedule)
+ uCurrentServiceID = servid;
+ return pCurrentSchedule;
}
/** */
const cSchedule * cSchedules::GetSchedule() const
@@ -1196,11 +1194,7 @@ void cSIProcessor::Action()
table identifer tid */
bool cSIProcessor::AddFilter(u_char pid, u_char tid)
{
-#ifdef NEWSTRUCT
dmx_sct_filter_params sctFilterParams;
-#else
- dmxSctFilterParams sctFilterParams;
-#endif
memset(&sctFilterParams, 0, sizeof(sctFilterParams));
sctFilterParams.pid = pid;
sctFilterParams.timeout = 0;