mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
VDR developer version 2.1.1 is now available at ftp://ftp.tvdr.de/vdr/Developer/vdr-2.1.1.tar.bz2 A 'diff' against the previous version is available at ftp://ftp.tvdr.de/vdr/Developer/vdr-2.0.0-2.1.1.diff MD5 checksums: b17f9838bb8ddee9620f838fea7a171d vdr-2.1.1.tar.bz2 8b8ca593885c380cd370e6d19a5b16a1 vdr-2.0.0-2.1.1.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 main focus of this version is on adding basic support for positioners to control steerable satellite dishes. Manually controlling the dish position and storing individual positions will follow later. The fixes contained in this version will be released in a stable version 2.0.3 later, if there are no problems. From the HISTORY file: - Fixed initializing cDevice::keepTracks. - Fixed an endless loop in cTextWrapper::Set() in case the given Width is smaller than one character (reported by Stefan Braun). - Removed all "modified since version 1.6" markers from PLUGINS.html. - Added definitions for older DVB API versions, back until 5.0 (based on a patch from Udo Richter). - Changed cThread::SetIOPriority() from "best effort class" to "idle class" in order to improve overall performance when an editing process is running (thanks to Jochen Dolze). - Fixed handling '/' and '~' in recording file names in case DirectoryEncoding is used (thanks to Lars Hanisch). - Changed the sign of the satellite position value in cSource to reflect the standard of western values being negative. The new member function cSource::Position() can be used to retrieve the orbital position of a satellite. - Fixed multiple occurrences of the same directory in the recordings list in case there are directories that only differ in non-alphanumeric characters (was broken by "Fixed selecting the last replayed recording in the Recordings menu in case there are folders and plain recordings with names that differ only in non-alphanumeric characters" in version 1.7.36). - Fixed displaying the frame number when setting an editing mark (thanks to Thomas Günther). - Fixed no longer generating any editing marks if the edited recording results in just one single sequence (reported by Halim Sahin). - Fixed an error message when parsing SCR values in diseqc.conf. - Fixed an unexpected RCS version tag in the newplugin script. - Fixed an endless loop in the DrawEllipse() functions for very small ellipses (reported by Stefan Braun). - Fixed a crash in the LCARS skin's main menu in case there is no current channel (reported by Dominique Dumont). - Added basic support for positioners to control steerable satellite dishes (based on a patch from Seppo Ingalsuo and Ales Jurik). + Supports GotoN (aka "DiSEqC 1.2") and GotoX (aka "USALS"). + The new DiSEqC command code 'P' can be used to instruct a positioner to move the dish to the required satellite position. When a 'P' code is processed, further execution of the remaining DiSEqC sequence (if any) is postponed until the positioner has reached the new satellite position. + The new special source value of "S360E" can be used in diseqc.conf to indicate that an entry using a positioner can move the dish to any requested position within its range. Think of it as "full circle". + The devices a particular cDiseqc or cScr applies to are now stored directly in each cDiseqc or cScr, respectively. + A plugin can implement a custom positioner control (see PLUGINS.html, section "Positioners"). + The new function cSkinDisplayChannel::SetPositioner() can be implemented by skins to show the user a progress display when the dish is being moved. The default implementation calls SetMessage() with a string indicating the new position the dish is being moved to. The LCARS skin shows a progress bar indicating the movement of the dish. + The new parameters "Site latitude", "Site longitude", "Positioner speed", and "Positioner swing" in the "Setup/LNB" menu can be used to configure the necessary values for a steerable dish. + The cDvbTuner now has a new status tsPositioning, in which it waits until a steerable dish has reached its target position. Parsing SI data is paused until the target position has been reached. - The LCARS skin now shows the source value of the current channel in its channel display. - Fixed asserting free disk space in the cutter. - No longer trying to delete old recordings in AssertFreeDiskSpace() if the given Priority is less than 1. - Fixed handling LIRC events in case repeated events are lost. - Fixed a possible crash when shutting down VDR while subtitles are being displayed (reported by Ville Skyttä). - cDevice::IsPrimaryDevice() now also checks whether the primary device actually has a decoder and returns false otherwise. This should improve device allocation on systems that are only used as a receiver and don't actually display anything. - Increased the value of MAXRETRIES to 20 to reduce the probability of disturbances in transfer mode. - All bonded devices (except for the master) now turn off their LNB power completely to avoid problems when receiving vertically polarized transponders (suggested by Manfred Völkel and Oliver Endriss). - Reverted the change from version 1.5.7 that made all logging go to LOG_ERR (thanks to Christopher Reimer). - Added Begin/EndSegmentTransfer() to the EPG handler interface (thanks to Jörg Wendel). - The code for distributing recordings over several video directories is now deprecated and disabled by default. You can re-enable this feature by removing the comment sign ('//') from the beginning of the line //#define DEPRECATED_DISTRIBUTED_VIDEODIR // Code enclosed with this macro is ... in the file videodir.c. Note, though, that this can only be a temporary workaround. This feature will be completely removed in one of the next developer versions. Distributing the video directory over several disks was a useful feature in times when disks were still relatively small, but it also caused serious problems in case one of the disks failed. Nowadays hard disks come in sizes measured in terabytes, and tools like "mhddfs" can be used to combine several disks to form one large volume. A recommended method for a relatively safe disk setup in a VDR system is to use two 1TB (or larger) disks and use them as a RAID-1 (mirrored). That way, if one disk fails, you can replace it without data loss.
301 lines
8.2 KiB
C++
301 lines
8.2 KiB
C++
/*
|
|
* menu.h: The actual menu implementations
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: menu.h 3.1 2013/06/01 13:44:57 kls Exp $
|
|
*/
|
|
|
|
#ifndef __MENU_H
|
|
#define __MENU_H
|
|
|
|
#include "ci.h"
|
|
#include "device.h"
|
|
#include "epg.h"
|
|
#include "osdbase.h"
|
|
#include "dvbplayer.h"
|
|
#include "menuitems.h"
|
|
#include "recorder.h"
|
|
#include "skins.h"
|
|
|
|
class cMenuText : public cOsdMenu {
|
|
private:
|
|
char *text;
|
|
eDvbFont font;
|
|
public:
|
|
cMenuText(const char *Title, const char *Text, eDvbFont Font = fontOsd);
|
|
virtual ~cMenuText();
|
|
void SetText(const char *Text);
|
|
virtual void Display(void);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuFolder : public cOsdMenu {
|
|
private:
|
|
cNestedItemList *nestedItemList;
|
|
cList<cNestedItem> *list;
|
|
cString dir;
|
|
cOsdItem *firstFolder;
|
|
bool editing;
|
|
void SetHelpKeys(void);
|
|
void Set(const char *CurrentFolder = NULL);
|
|
void DescendPath(const char *Path);
|
|
eOSState SetFolder(void);
|
|
eOSState Select(void);
|
|
eOSState New(void);
|
|
eOSState Delete(void);
|
|
eOSState Edit(void);
|
|
cMenuFolder(const char *Title, cList<cNestedItem> *List, cNestedItemList *NestedItemList, const char *Dir, const char *Path = NULL);
|
|
public:
|
|
cMenuFolder(const char *Title, cNestedItemList *NestedItemList, const char *Path = NULL);
|
|
cString GetFolder(void);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuCommands : public cOsdMenu {
|
|
private:
|
|
cList<cNestedItem> *commands;
|
|
cString parameters;
|
|
cString title;
|
|
cString command;
|
|
bool confirm;
|
|
char *result;
|
|
bool Parse(const char *s);
|
|
eOSState Execute(void);
|
|
public:
|
|
cMenuCommands(const char *Title, cList<cNestedItem> *Commands, const char *Parameters = NULL);
|
|
virtual ~cMenuCommands();
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditTimer : public cOsdMenu {
|
|
private:
|
|
cTimer *timer;
|
|
cTimer data;
|
|
int channel;
|
|
bool addIfConfirmed;
|
|
cMenuEditStrItem *file;
|
|
cMenuEditDateItem *day;
|
|
cMenuEditDateItem *firstday;
|
|
eOSState SetFolder(void);
|
|
void SetFirstDayItem(void);
|
|
void SetHelpKeys(void);
|
|
public:
|
|
cMenuEditTimer(cTimer *Timer, bool New = false);
|
|
virtual ~cMenuEditTimer();
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEvent : public cOsdMenu {
|
|
private:
|
|
const cEvent *event;
|
|
public:
|
|
cMenuEvent(const cEvent *Event, bool CanSwitch = false, bool Buttons = false);
|
|
virtual void Display(void);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuMain : public cOsdMenu {
|
|
private:
|
|
bool replaying;
|
|
cOsdItem *stopReplayItem;
|
|
cOsdItem *cancelEditingItem;
|
|
cOsdItem *stopRecordingItem;
|
|
int recordControlsState;
|
|
static cOsdObject *pluginOsdObject;
|
|
void Set(void);
|
|
bool Update(bool Force = false);
|
|
public:
|
|
cMenuMain(eOSState State = osUnknown);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
static cOsdObject *PluginOsdObject(void);
|
|
};
|
|
|
|
class cDisplayChannel : public cOsdObject {
|
|
private:
|
|
cSkinDisplayChannel *displayChannel;
|
|
int group;
|
|
bool withInfo;
|
|
cTimeMs lastTime;
|
|
int number;
|
|
bool timeout;
|
|
const cPositioner *positioner;
|
|
cChannel *channel;
|
|
const cEvent *lastPresent;
|
|
const cEvent *lastFollowing;
|
|
static cDisplayChannel *currentDisplayChannel;
|
|
void DisplayChannel(void);
|
|
void DisplayInfo(void);
|
|
void Refresh(void);
|
|
cChannel *NextAvailableChannel(cChannel *Channel, int Direction);
|
|
public:
|
|
cDisplayChannel(int Number, bool Switched);
|
|
cDisplayChannel(eKeys FirstKey);
|
|
virtual ~cDisplayChannel();
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
static bool IsOpen(void) { return currentDisplayChannel != NULL; }
|
|
};
|
|
|
|
class cDisplayVolume : public cOsdObject {
|
|
private:
|
|
cSkinDisplayVolume *displayVolume;
|
|
cTimeMs timeout;
|
|
static cDisplayVolume *currentDisplayVolume;
|
|
virtual void Show(void);
|
|
cDisplayVolume(void);
|
|
public:
|
|
virtual ~cDisplayVolume();
|
|
static cDisplayVolume *Create(void);
|
|
static void Process(eKeys Key);
|
|
eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cDisplayTracks : public cOsdObject {
|
|
private:
|
|
cSkinDisplayTracks *displayTracks;
|
|
cTimeMs timeout;
|
|
eTrackType types[ttMaxTrackTypes];
|
|
char *descriptions[ttMaxTrackTypes + 1]; // list is NULL terminated
|
|
int numTracks, track, audioChannel;
|
|
static cDisplayTracks *currentDisplayTracks;
|
|
virtual void Show(void);
|
|
cDisplayTracks(void);
|
|
public:
|
|
virtual ~cDisplayTracks();
|
|
static bool IsOpen(void) { return currentDisplayTracks != NULL; }
|
|
static cDisplayTracks *Create(void);
|
|
static void Process(eKeys Key);
|
|
eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cDisplaySubtitleTracks : public cOsdObject {
|
|
private:
|
|
cSkinDisplayTracks *displayTracks;
|
|
cTimeMs timeout;
|
|
eTrackType types[ttMaxTrackTypes];
|
|
char *descriptions[ttMaxTrackTypes + 1]; // list is NULL terminated
|
|
int numTracks, track;
|
|
static cDisplaySubtitleTracks *currentDisplayTracks;
|
|
virtual void Show(void);
|
|
cDisplaySubtitleTracks(void);
|
|
public:
|
|
virtual ~cDisplaySubtitleTracks();
|
|
static bool IsOpen(void) { return currentDisplayTracks != NULL; }
|
|
static cDisplaySubtitleTracks *Create(void);
|
|
static void Process(eKeys Key);
|
|
eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
cOsdObject *CamControl(void);
|
|
bool CamMenuActive(void);
|
|
|
|
class cMenuRecordingItem;
|
|
|
|
class cMenuRecordings : public cOsdMenu {
|
|
private:
|
|
char *base;
|
|
int level;
|
|
int recordingsState;
|
|
int helpKeys;
|
|
void SetHelpKeys(void);
|
|
void Set(bool Refresh = false);
|
|
bool Open(bool OpenSubMenus = false);
|
|
eOSState Play(void);
|
|
eOSState Rewind(void);
|
|
eOSState Delete(void);
|
|
eOSState Info(void);
|
|
eOSState Sort(void);
|
|
eOSState Commands(eKeys Key = kNone);
|
|
protected:
|
|
cString DirectoryName(void);
|
|
public:
|
|
cMenuRecordings(const char *Base = NULL, int Level = 0, bool OpenSubMenus = false);
|
|
~cMenuRecordings();
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cRecordControl {
|
|
private:
|
|
cDevice *device;
|
|
cTimer *timer;
|
|
cRecorder *recorder;
|
|
const cEvent *event;
|
|
cString instantId;
|
|
char *fileName;
|
|
bool GetEvent(void);
|
|
public:
|
|
cRecordControl(cDevice *Device, cTimer *Timer = NULL, bool Pause = false);
|
|
virtual ~cRecordControl();
|
|
bool Process(time_t t);
|
|
cDevice *Device(void) { return device; }
|
|
void Stop(bool ExecuteUserCommand = true);
|
|
const char *InstantId(void) { return instantId; }
|
|
const char *FileName(void) { return fileName; }
|
|
cTimer *Timer(void) { return timer; }
|
|
};
|
|
|
|
class cRecordControls {
|
|
private:
|
|
static cRecordControl *RecordControls[];
|
|
static int state;
|
|
public:
|
|
static bool Start(cTimer *Timer = NULL, bool Pause = false);
|
|
static void Stop(const char *InstantId);
|
|
static bool PauseLiveVideo(void);
|
|
static const char *GetInstantId(const char *LastInstantId);
|
|
static cRecordControl *GetRecordControl(const char *FileName);
|
|
static cRecordControl *GetRecordControl(const cTimer *Timer);
|
|
///< Returns the cRecordControl for the given Timer.
|
|
///< If there is no cRecordControl for Timer, NULL is returned.
|
|
static void Process(time_t t);
|
|
static void ChannelDataModified(cChannel *Channel);
|
|
static bool Active(void);
|
|
static void Shutdown(void);
|
|
static void ChangeState(void) { state++; }
|
|
static bool StateChanged(int &State);
|
|
};
|
|
|
|
class cReplayControl : public cDvbPlayerControl {
|
|
private:
|
|
cSkinDisplayReplay *displayReplay;
|
|
cMarks marks;
|
|
bool marksModified;
|
|
bool visible, modeOnly, shown, displayFrames;
|
|
int lastCurrent, lastTotal;
|
|
bool lastPlay, lastForward;
|
|
int lastSpeed;
|
|
time_t timeoutShow;
|
|
bool timeSearchActive, timeSearchHide;
|
|
int timeSearchTime, timeSearchPos;
|
|
void TimeSearchDisplay(void);
|
|
void TimeSearchProcess(eKeys Key);
|
|
void TimeSearch(void);
|
|
void ShowTimed(int Seconds = 0);
|
|
static cReplayControl *currentReplayControl;
|
|
static cString fileName;
|
|
void ShowMode(void);
|
|
bool ShowProgress(bool Initial);
|
|
void MarkToggle(void);
|
|
void MarkJump(bool Forward);
|
|
void MarkMove(bool Forward);
|
|
void EditCut(void);
|
|
void EditTest(void);
|
|
public:
|
|
cReplayControl(bool PauseLive = false);
|
|
virtual ~cReplayControl();
|
|
void Stop(void);
|
|
virtual cOsdObject *GetInfo(void);
|
|
virtual const cRecording *GetRecording(void);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
virtual void Show(void);
|
|
virtual void Hide(void);
|
|
bool Visible(void) { return visible; }
|
|
static void SetRecording(const char *FileName);
|
|
static const char *NowReplaying(void);
|
|
static const char *LastReplayed(void);
|
|
static void ClearLastReplayed(const char *FileName);
|
|
};
|
|
|
|
#endif //__MENU_H
|