vdr/eit.h
Klaus Schmidinger 9aa2cda494 Version 0.68
- Date and time in the title of an event info page are now always right adjusted.
- The 'current channel' is now handled device specific (in case there is more
  than one DVB card).
- The 'SetSystemTime' option in the "Setup" menu is now shown as "yes/no".
- Implemented "internationalization" (see 'i18n.c' for information on how to
  add new languages). Thanks to Miha Setina for translating the OSD texts to
  the Slovenian language.
- Fixed learning keys on the PC keyboard (display oscillated).
- Fixed a timing problem with OSD refresh and SVDRP.
- Avoiding multiple definitions of the same timer in the "Schedule" menu (this
  could happen when pressing the "Red" button while editing the timer).
- There can now be a configuration file named 'commands.conf' that defines
  commands that can be executed through the "Main" menu's "Commands" option
  (see FORMATS for details on how to define these commands).
- Added a 'fixed' font for use with the output of system commands.
- The 'Priority' parameter of the timers is now also used to interrupt a low
  priority timer recording if a higher priority timer wants to record.
- A timer recording on a DVB card with a CAM module will now be interrupted
  by a timer that needs to use this specific DVB card to record an encrypted
  channel, if the timer currently occupying this DVB card doesn't need the
  CAM module (and thus can continue recording on a different DVB card).
- The "Yellow" button in the "What's on now/next?" menus now displays the
  schedule of the current channel from that menu.
- All DVB cards in a multi-card system now write their EIT information into the
  same data structure.
- If there is more than one DVB card in the system, the non-primary cards are
  now used to periodically scan through the channels in order to keep the
  EPG info up-to-date. Scanning kicks in after 60 seconds of user inactivity
  (timeout in order to keep user interactions instantaneously) and each channel
  that has the 'pnr' parameter defined in 'channels.conf' is switched to for
  20 seconds. If there is only one DVB card in the system, that card will start
  scanning after 5 hours (configurable through the "Setup" menu) of user inactivity
  and will switch back to the channel it originally displayed at the first sign of
  user activity. Any scanning will only occur if that particular card is not
  currently recording or replaying.
- Now shifting the 'Subtitle' info into the 'ExtendedDescription' on stations
  that don't send the EIT information correctly (like, e.g., 'VOX').
- Implemented a 10 seconds latency when removing files.
- Fixed unwanted reaction on the "Green" and "Yellow" button in the "Event" display.
- Implemented 'Transfer Mode' to display video data from the DVB card that actually
  can receive a certain channel on the primary interface. This is currently in
  an early state and may still cause some problems, but it appears to work nice
  already.
2000-11-19 18:00:00 +01:00

143 lines
5.1 KiB
C++

/***************************************************************************
eit.h - description
-------------------
begin : Fri Aug 25 2000
copyright : (C) 2000 by Robert Schneider
email : Robert.Schneider@web.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.3 2000/11/17 16:14:27 kls Exp $
***************************************************************************/
#ifndef __EIT_H
#define __EIT_H
#include "thread.h"
#include "tools.h"
class cEventInfo : public cListObject {
friend class cSchedule;
friend class cEIT;
private:
unsigned short uServiceID; // Service 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
u_char cExtendedDescriptorNumber; // current extended descriptor number that has to be inserted
int nChannelNumber; // the actual channel number from VDR's channel list (used in cMenuSchedule for sorting by channel number)
protected:
void SetFollowing(bool foll);
void SetPresent(bool pres);
bool SetTitle(char *string);
void SetServiceID(unsigned short servid);
void SetEventID(unsigned short evid);
void SetDuration(long l);
void SetTime(time_t t);
bool AddExtendedDescription(char *string);
bool SetSubtitle(char *string);
void IncreaseExtendedDescriptorNumber(void);
cEventInfo(unsigned short serviceid, unsigned short eventid);
public:
~cEventInfo();
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;
u_char GetExtendedDescriptorNumber(void) const;
unsigned short GetServiceID(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'
};
class cSchedule : public cListObject {
friend class cSchedules;
friend class cEIT;
private:
cEventInfo *pPresent;
cEventInfo *pFollowing;
unsigned short uServiceID;
cList<cEventInfo> Events;
protected:
void SetServiceID(unsigned short servid);
bool SetFollowingEvent(cEventInfo *pEvent);
bool SetPresentEvent(cEventInfo *pEvent);
void Cleanup(time_t tTime);
void Cleanup(void);
cSchedule(unsigned short servid = 0);
public:
~cSchedule();
const cEventInfo *GetPresentEvent(void) const;
const cEventInfo *GetFollowingEvent(void) const;
unsigned short GetServiceID(void) const;
const cEventInfo *GetEvent(unsigned short uEventID) const;
const cEventInfo *GetEvent(time_t tTime) const;
const cEventInfo *GetEventNumber(int n) const { return Events.Get(n); }
int NumEvents(void) const { return Events.Count(); }
};
class cSchedules : public cList<cSchedule> {
friend class cSIProcessor;
private:
const cSchedule *pCurrentSchedule;
unsigned short uCurrentServiceID;
protected:
bool SetCurrentServiceID(unsigned short servid);
void Cleanup();
public:
cSchedules(void);
~cSchedules();
const cSchedule *GetSchedule(unsigned short servid) const;
const cSchedule *GetSchedule(void) const;
};
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;
bool masterSIProcessor;
bool useTStime;
SIP_FILTER *filters;
int fsvbi;
bool RefreshFilters(void);
void Action(void);
public:
cSIProcessor(const char *FileName);
~cSIProcessor();
bool SetUseTSTime(bool use);
bool AddFilter(u_char pid, u_char tid);
bool ShutDownFilters(void);
bool SetCurrentServiceID(unsigned short servid);
const cSchedules *Schedules(void) { return schedules; }
};
#endif