mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Added new entries to 'ca.conf'. - Fixed closing unused PID handles (thanks to Stefan Schluenss for reporting this one). - Added more examples to 'diseqc.conf' (thanks to Oliver Endriss). - Fixed disabling multiple recordings on a single DVB card (comment out the definition of the macros DO_REC_AND_PLAY_ON_PRIMARY_DEVICE and DO_MULTIPLE_RECORDINGS in dvbdevice.c). - Plugins can now have their very own OSD setup in the object they return from a call to cPlugin::MainMenuAction(). In order to implement this, the return type of cPlugin::MainMenuAction() had to be changed from (cOsdMenu *) to (cOsdObject *). So in case you are compiling an existing plugin with this version of VDR and you get an error message, simply change cOsdMenu to cOsdObject in the plugin's source for the MainMenuAction() function. Plugin authors who have so far (ab)used the cControl mechanism to implement their own raw OSD should take a look at the new demo plugin 'osddemo'. It implements a very primitive game that shows how a plugin can have its own raw OSD. Especially look into cLineGame and see how it implements the Show() function. See also the chapter on "User interaction" in PLUGINS.html. - Added three new fields to the lines in 'channels.conf': NID, TID and RID. NID and TID are the Network and Transport Stream IDs, respectively. RID is an additional ID that can be used to tell apart channels that would otherwise be indistinguishable. This is typically the case with radio channels, which may have the same NID, TID and SID, but different "radio IDs". This new field is therefore called RID ("radio ID"). Currently NID and TID are not yet used by VDR and should always be 0. The RID is actually used when building the "unique channel ID", so if you have channels in your 'channels.conf' file that cause error messages when loading, you can set the RIDs of these channels to different values. When reading an old 'channels.conf' these new fields will be automatically initialized to 0 and once the file is written back to disk they will be appended to the channel definitions. Thanks to Régis Bossut for pointing out that with some providers the channels can only be distinguished through the RID. - The "unique channel ID" now contains an optional 5th part (the RID). See man vdr(5). - Updated 'channels.conf.cable' and made some channels unique using the new RID (thanks to Andreas Kool for pointing out the problems). - Made some channels unique in 'channels.conf.terr' using the new RID. - Extended the '-l' option to allow logging to LOG_LOCALn (n=0..7) by writing, for instance, '-l 3.7' (suggested by Jürgen Schmidt). - Now deleting stale lock files if they have a time stamp that is outside the window 'now +/- LOCKFILESTALETIME'. This improves things in cases where the system time makes far jumps, so that a lock file might end up with a time stamp that lies in the distant future (thanks to Oliver Endriss).
171 lines
6.2 KiB
C++
171 lines
6.2 KiB
C++
/***************************************************************************
|
|
eit.h - description
|
|
-------------------
|
|
begin : Fri Aug 25 2000
|
|
copyright : (C) 2000 by Robert Schneider
|
|
email : Robert.Schneider@web.de
|
|
|
|
2001-08-15: Adapted to 'libdtv' by Rolf Hakenes <hakenes@hippomi.de>
|
|
|
|
***************************************************************************/
|
|
|
|
/***************************************************************************
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
* $Id: eit.h 1.22 2002/11/24 12:45:55 kls Exp $
|
|
***************************************************************************/
|
|
|
|
#ifndef __EIT_H
|
|
#define __EIT_H
|
|
|
|
#include "channels.h"
|
|
#include "thread.h"
|
|
#include "tools.h"
|
|
|
|
#define MAXEPGBUGFIXLEVEL 2
|
|
|
|
class cEventInfo : public cListObject {
|
|
friend class cSchedule;
|
|
friend class cEIT;
|
|
private:
|
|
unsigned char uTableID; // Table ID this event came from
|
|
tChannelID channelID; // Channel ID of program for that event
|
|
bool bIsFollowing; // true if this is the next event on this channel
|
|
bool bIsPresent; // true if this is the present event running
|
|
char *pExtendedDescription; // Extended description of this event
|
|
char *pSubtitle; // Subtitle of event
|
|
char *pTitle; // Title of event
|
|
unsigned short uEventID; // Event ID of this event
|
|
long lDuration; // duration of event in seconds
|
|
time_t tTime; // Start time
|
|
int nChannelNumber; // the actual channel number from VDR's channel list (used in cMenuSchedule for sorting by channel number)
|
|
protected:
|
|
void SetTableID(unsigned char tableid);
|
|
void SetFollowing(bool foll);
|
|
void SetPresent(bool pres);
|
|
void SetTitle(const char *string);
|
|
void SetChannelID(tChannelID channelid);
|
|
void SetEventID(unsigned short evid);
|
|
void SetDuration(long l);
|
|
void SetTime(time_t t);
|
|
void SetExtendedDescription(const char *string);
|
|
void SetSubtitle(const char *string);
|
|
cEventInfo(tChannelID channelid, unsigned short eventid);
|
|
public:
|
|
~cEventInfo();
|
|
const unsigned char GetTableID(void) const;
|
|
const char *GetTimeString(void) const;
|
|
const char *GetEndTimeString(void) const;
|
|
const char *GetDate(void) const;
|
|
bool IsFollowing(void) const;
|
|
bool IsPresent(void) const;
|
|
const char *GetExtendedDescription(void) const;
|
|
const char *GetSubtitle(void) const;
|
|
const char *GetTitle(void) const;
|
|
unsigned short GetEventID(void) const;
|
|
long GetDuration(void) const;
|
|
time_t GetTime(void) const;
|
|
tChannelID GetChannelID(void) const;
|
|
int GetChannelNumber(void) const { return nChannelNumber; }
|
|
void SetChannelNumber(int ChannelNumber) const { ((cEventInfo *)this)->nChannelNumber = ChannelNumber; } // doesn't modify the EIT data, so it's ok to make it 'const'
|
|
void Dump(FILE *f, const char *Prefix = "") const;
|
|
static bool Read(FILE *f, cSchedule *Schedule);
|
|
void FixEpgBugs(void);
|
|
};
|
|
|
|
class cSchedule : public cListObject {
|
|
friend class cSchedules;
|
|
friend class cEIT;
|
|
private:
|
|
cEventInfo *pPresent;
|
|
cEventInfo *pFollowing;
|
|
tChannelID channelID;
|
|
cList<cEventInfo> Events;
|
|
protected:
|
|
void SetChannelID(tChannelID channelid);
|
|
bool SetFollowingEvent(cEventInfo *pEvent);
|
|
bool SetPresentEvent(cEventInfo *pEvent);
|
|
void Cleanup(time_t tTime);
|
|
void Cleanup(void);
|
|
cSchedule(tChannelID channelid = tChannelID::InvalidID);
|
|
public:
|
|
~cSchedule();
|
|
cEventInfo *AddEvent(cEventInfo *EventInfo);
|
|
const cEventInfo *GetPresentEvent(void) const;
|
|
const cEventInfo *GetFollowingEvent(void) const;
|
|
tChannelID GetChannelID(void) const;
|
|
const cEventInfo *GetEvent(unsigned short uEventID, time_t tTime = 0) const;
|
|
const cEventInfo *GetEventAround(time_t tTime) const;
|
|
const cEventInfo *GetEventNumber(int n) const { return Events.Get(n); }
|
|
int NumEvents(void) const { return Events.Count(); }
|
|
void Dump(FILE *f, const char *Prefix = "") const;
|
|
static bool Read(FILE *f, cSchedules *Schedules);
|
|
};
|
|
|
|
class cSchedules : public cList<cSchedule> {
|
|
friend class cSchedule;
|
|
friend class cSIProcessor;
|
|
private:
|
|
const cSchedule *pCurrentSchedule;
|
|
tChannelID currentChannelID;
|
|
protected:
|
|
const cSchedule *AddChannelID(tChannelID channelid);
|
|
const cSchedule *SetCurrentChannelID(tChannelID channelid);
|
|
void Cleanup();
|
|
public:
|
|
cSchedules(void);
|
|
~cSchedules();
|
|
const cSchedule *GetSchedule(tChannelID channelid) const;
|
|
const cSchedule *GetSchedule(void) const;
|
|
void Dump(FILE *f, const char *Prefix = "") const;
|
|
static bool Read(FILE *f);
|
|
};
|
|
|
|
typedef struct sip_filter {
|
|
|
|
u_char pid;
|
|
u_char tid;
|
|
int handle;
|
|
bool inuse;
|
|
|
|
}SIP_FILTER;
|
|
|
|
class cSIProcessor : public cThread {
|
|
private:
|
|
static int numSIProcessors;
|
|
static cSchedules *schedules;
|
|
static cMutex schedulesMutex;
|
|
static const char *epgDataFileName;
|
|
static time_t lastDump;
|
|
bool masterSIProcessor;
|
|
int currentSource;
|
|
int currentTransponder;
|
|
SIP_FILTER *filters;
|
|
char *fileName;
|
|
bool active;
|
|
void Action(void);
|
|
bool AddFilter(u_char pid, u_char tid);
|
|
bool ShutDownFilters(void);
|
|
public:
|
|
cSIProcessor(const char *FileName);
|
|
~cSIProcessor();
|
|
static void SetEpgDataFileName(const char *FileName);
|
|
static const char *GetEpgDataFileName(void);
|
|
static const cSchedules *Schedules(cMutexLock &MutexLock);
|
|
// Caller must provide a cMutexLock which has to survive the entire
|
|
// time the returned cSchedules is accessed. Once the cSchedules is no
|
|
// longer used, the cMutexLock must be destroyed.
|
|
static bool Read(FILE *f = NULL);
|
|
static void Clear(void);
|
|
void SetStatus(bool On);
|
|
void SetCurrentTransponder(int CurrentSource, int CurrentTransponder);
|
|
static bool SetCurrentChannelID(tChannelID channelid);
|
|
static void TriggerDump(void);
|
|
};
|
|
|
|
#endif
|