mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Original announce message: VDR developer version 1.7.28 is now available at ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.28.tar.bz2 A 'diff' against the previous version is available at ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.27-1.7.28.diff MD5 checksums: 3ccff2dcc42d112e23dd64f2c39f02f1 vdr-1.7.28.tar.bz2 7249ead4aca4b24e53d49d11c67e1613 vdr-1.7.27-1.7.28.diff WARNING: ======== This is a developer version. Even though I use it in my productive environment. I strongly recommend that you only use it under controlled conditions and for testing and debugging. The new default skin "LCARS" displays the signal strengths and qualities of all devices in its main menu. For devices that have an stb0899 frontend chip (like the TT-budget S2-3200) retrieving this information from the driver is rather slow, which results in a sluggish response to user input in the main menu. To speed this up you may want to apply the patches from From the HISTORY file: - Fixed cPixmapMemory::DrawEllipse() for quadrants -1 and -4. - Fixed getting the maximum short channel name length in case there are no short names at all (reported by Derek Kelly). - The new function cDevice::DeviceType() returns a string identifying the type of the given device. - Now limiting the number of characters of a channel's (short) name to 16 in the schedules menus, to keep that column from getting overly wide in case there is a channel with a very long name that has no short name. - Fixed EPG scan on systems with only a single DVB device that use software output (reported by Juergen Lock). - Skins can now inquire the menu category for which their cSkinDisplayMenu is currently being used. This can be done either through a call to cSkinDisplayMenu::MenuCategory() or by reimplementing cSkinDisplayMenu::SetMenuCategory(). This information allows a skin to use special icons or decorations for the various types of menus in VDR. - The new setup option "DVB/Standard compliance" can be used to switch between different variations of the DVB standard (thanks to Rolf Ahrenberg). Currently there is "DVB" (for the original DVB standard) and "ANSI/SCTE", which is used to properly handle certain private stream types. - The disk usage is no longer automatically added to the title of the main and "Recordings" menus. This has always been a mekeshift solution and it is now up to the individual skin if, where and how it wants to display this information. A skin can use the new cVideoDiskUsage class to implement such a display. For compatibility, the default skins "Classic VDR", "ST:TNG Panels" and "Text mode" (i.e. curses) have been changed to behave like before. Other skins may want to display the disk usage in totally different ways. - A cOsdMenu can now handle skins that display different numbers of items in the various menu categories. - OSD and skin are now reinitialized after a plugin setup page has been confirmed, to have them react immediately in case any change to a plugin's setup parameter has an effect on the OSD. - The Timers list is now marked as modified whenever a recording starts or ends. - Fixed cDevice::StillPicture(), making sure it doesn't call the derived class's function if no buffer has been allocated (reported by Marcus Roscher). - Fixed the SVDRP command UPDR, which didn't update the global recordings list (reported by Lars Hanisch). - cControl::Control() now has an additional boolean parameter, which can be set to true to get the current player control even if it is hidden. - The new functions cControl::GetRecording() and cControl::GetHeader() can be used to retrieve information about what the current player is playing. - Fixed a possible high CPU load when pausing replay (thanks to Reinhard Nissl). - Fixed character comparisons in cSubtitleObject::DecodeCharacterString() (reported by Reinhard Mantey). - Renamed the function cString::sprintf(const char *fmt, va_list &ap) to vsprintf(), because it might inadvertently be called with a 'char *' as the second argument on some compilers and cause a crash (reported by Sundararaj Reel). - Removed the "bondedMasterFailed" mechanism from cDvbTuner, because it caused problems with the EPG scan in case a transponder is not receivable in a setup with bonded devices (reported by Michael Schneider). - Making sure setup strings don't contain any newline characters (thanks to Joachim Wilke). - The new member function cSkinDisplayReplay::SetRecording() allows a skin to display more information about the currently played recording. - Fixed a mismatched 'delete' in cSchedules::SetEpgDataFileName() (thanks to Reinhard Mantey). - The DrawText() functions of the OSD now accept the new alignment flag taBorder, which triggers keeping a proper distance from the edge that taLeft or taRight aligns to. - Fixed checking for UTF-8 support in cFont::Bidi() (reported by Torsten Lang). - If a recording has no info file, the 'title' of the recording's info is now set to the recording's name. - cVector::Clear() now reinitializes any previously used members. - Fixed resetting CAMs (thanks to Marco Skambraks). - The new function RgbShade() (include osd.h) can be used to generate a brighter or darker version of a given color. - The new class cSortedTimers can be used to quickly get a list of all timers, sorted by their start time. - The new skin "LCARS" is an enhanced version of the "ST:TNG" skin (which is still there in its original layout, for those who don't like the LCARS skin, or can't use it due to OSD limitations). The LCARS skin utilizes the new "menu category" feature to display additional information on the main menu page. It shows upcoming timers and the system's devices, as well as which device is recording which timers. The upper pane of the main menu displays the programme data in live and replay mode, and a progress bar. An indicator on the right side of the device list shows which device is currently used for live viewing, and whether it is in transfer mode. The individual device displays show the device number, the device type, which CAM (if any ) is currently assigned to the device, and the signal strength and quality. On the left side of the OSD there is a permanent display of the current date and time, the disk usage and the system load. "LCARS" is the new default skin of VDR. It requires at least a 4bpp (16 color) full screen OSD, but you can still operate it if your OSD can handle only fewer colors (in which case you may want to switch to the "ST:TNG" or "Classic VDR" skin). - Finally removed the code marked with __RECORDING_H_DEPRECATED_DIRECT_MEMBER_ACCESS and LEGACY_CRECEIVER. - Now making sure that the "small font" is never larger than the "osd font". - Fixed font handling with fontconfig 2.9.0 or newer (thanks to Joerg Bornkessel). - Extended the interface to the script that gets called for recordings, so that in the "edited" case it also provides the name of the original recording (thanks to Christian Richter). - Added DeleteEvent() to the EPG handler interface, so that an EPG handler can trigger deleting of an event (thanks to Christian Kaiser). - Speeded up opening menus on systems with many (several thousands) of recordings, by caching the information whether a recording is stored on the video directory file system within the cRecording data (based on a patch from Torsten Lang).
144 lines
4.8 KiB
C++
144 lines
4.8 KiB
C++
/*
|
|
* timers.h: Timer handling
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: timers.h 2.4 2012/04/15 13:21:31 kls Exp $
|
|
*/
|
|
|
|
#ifndef __TIMERS_H
|
|
#define __TIMERS_H
|
|
|
|
#include "channels.h"
|
|
#include "config.h"
|
|
#include "epg.h"
|
|
#include "tools.h"
|
|
|
|
enum eTimerFlags { tfNone = 0x0000,
|
|
tfActive = 0x0001,
|
|
tfInstant = 0x0002,
|
|
tfVps = 0x0004,
|
|
tfRecording = 0x0008,
|
|
tfAll = 0xFFFF,
|
|
};
|
|
enum eTimerMatch { tmNone, tmPartial, tmFull };
|
|
|
|
class cTimer : public cListObject {
|
|
friend class cMenuEditTimer;
|
|
private:
|
|
mutable time_t startTime, stopTime;
|
|
time_t lastSetEvent;
|
|
mutable time_t deferred; ///< Matches(time_t, ...) will return false if the current time is before this value
|
|
bool recording, pending, inVpsMargin;
|
|
uint flags;
|
|
cChannel *channel;
|
|
mutable time_t day; ///< midnight of the day this timer shall hit, or of the first day it shall hit in case of a repeating timer
|
|
int weekdays; ///< bitmask, lowest bits: SSFTWTM (the 'M' is the LSB)
|
|
int start;
|
|
int stop;
|
|
int priority;
|
|
int lifetime;
|
|
mutable char file[MaxFileName];
|
|
char *aux;
|
|
const cEvent *event;
|
|
public:
|
|
cTimer(bool Instant = false, bool Pause = false, cChannel *Channel = NULL);
|
|
cTimer(const cEvent *Event);
|
|
cTimer(const cTimer &Timer);
|
|
virtual ~cTimer();
|
|
cTimer& operator= (const cTimer &Timer);
|
|
virtual int Compare(const cListObject &ListObject) const;
|
|
bool Recording(void) const { return recording; }
|
|
bool Pending(void) const { return pending; }
|
|
bool InVpsMargin(void) const { return inVpsMargin; }
|
|
uint Flags(void) const { return flags; }
|
|
const cChannel *Channel(void) const { return channel; }
|
|
time_t Day(void) const { return day; }
|
|
int WeekDays(void) const { return weekdays; }
|
|
int Start(void) const { return start; }
|
|
int Stop(void) const { return stop; }
|
|
int Priority(void) const { return priority; }
|
|
int Lifetime(void) const { return lifetime; }
|
|
const char *File(void) const { return file; }
|
|
time_t FirstDay(void) const { return weekdays ? day : 0; }
|
|
const char *Aux(void) const { return aux; }
|
|
time_t Deferred(void) const { return deferred; }
|
|
cString ToText(bool UseChannelID = false) const;
|
|
cString ToDescr(void) const;
|
|
const cEvent *Event(void) const { return event; }
|
|
bool Parse(const char *s);
|
|
bool Save(FILE *f);
|
|
bool IsSingleEvent(void) const;
|
|
static int GetMDay(time_t t);
|
|
static int GetWDay(time_t t);
|
|
bool DayMatches(time_t t) const;
|
|
static time_t IncDay(time_t t, int Days);
|
|
static time_t SetTime(time_t t, int SecondsFromMidnight);
|
|
void SetFile(const char *File);
|
|
bool Matches(time_t t = 0, bool Directly = false, int Margin = 0) const;
|
|
int Matches(const cEvent *Event, int *Overlap = NULL) const;
|
|
bool Expired(void) const;
|
|
time_t StartTime(void) const;
|
|
time_t StopTime(void) const;
|
|
void SetEventFromSchedule(const cSchedules *Schedules = NULL);
|
|
void SetEvent(const cEvent *Event);
|
|
void SetRecording(bool Recording);
|
|
void SetPending(bool Pending);
|
|
void SetInVpsMargin(bool InVpsMargin);
|
|
void SetDay(time_t Day);
|
|
void SetWeekDays(int WeekDays);
|
|
void SetStart(int Start);
|
|
void SetStop(int Stop);
|
|
void SetPriority(int Priority);
|
|
void SetLifetime(int Lifetime);
|
|
void SetAux(const char *Aux);
|
|
void SetDeferred(int Seconds);
|
|
void SetFlags(uint Flags);
|
|
void ClrFlags(uint Flags);
|
|
void InvFlags(uint Flags);
|
|
bool HasFlags(uint Flags) const;
|
|
void Skip(void);
|
|
void OnOff(void);
|
|
cString PrintFirstDay(void) const;
|
|
static int TimeToInt(int t);
|
|
static bool ParseDay(const char *s, time_t &Day, int &WeekDays);
|
|
static cString PrintDay(time_t Day, int WeekDays, bool SingleByteChars);
|
|
};
|
|
|
|
class cTimers : public cConfig<cTimer> {
|
|
private:
|
|
int state;
|
|
int beingEdited;
|
|
time_t lastSetEvents;
|
|
time_t lastDeleteExpired;
|
|
public:
|
|
cTimers(void);
|
|
cTimer *GetTimer(cTimer *Timer);
|
|
cTimer *GetMatch(time_t t);
|
|
cTimer *GetMatch(const cEvent *Event, int *Match = NULL);
|
|
cTimer *GetNextActiveTimer(void);
|
|
int BeingEdited(void) { return beingEdited; }
|
|
void IncBeingEdited(void) { beingEdited++; }
|
|
void DecBeingEdited(void) { if (!--beingEdited) lastSetEvents = 0; }
|
|
void SetModified(void);
|
|
bool Modified(int &State);
|
|
///< Returns true if any of the timers have been modified, which
|
|
///< is detected by State being different than the internal state.
|
|
///< Upon return the internal state will be stored in State.
|
|
void SetEvents(void);
|
|
void DeleteExpired(void);
|
|
void Add(cTimer *Timer, cTimer *After = NULL);
|
|
void Ins(cTimer *Timer, cTimer *Before = NULL);
|
|
void Del(cTimer *Timer, bool DeleteObject = true);
|
|
};
|
|
|
|
extern cTimers Timers;
|
|
|
|
class cSortedTimers : public cVector<const cTimer *> {
|
|
public:
|
|
cSortedTimers(void);
|
|
};
|
|
|
|
#endif //__TIMERS_H
|