mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
VDR developer version 2.1.9 is now available at ftp://ftp.tvdr.de/vdr/Developer/vdr-2.1.9.tar.bz2 A 'diff' against the previous version is available at ftp://ftp.tvdr.de/vdr/Developer/vdr-2.1.8-2.1.9.diff MD5 checksums: 59a63596f3fcfe7c81df8e92b4486f78 vdr-2.1.9.tar.bz2 e70d236f79bee5110f763a8109dba3d9 vdr-2.1.8-2.1.9.diff Approaching version 2.2.0: ========================== If there are no more serious bug reports, the final version 2.2.0 of VDR shall be released on February 19, 2015, which marks the 15th anniversary of VDR. So please test this developer version intensely and report any problems you might encounter as soon as possible. The following language files still have the given number of untranslated texts: ar.po: 51 ca_ES.po: 51 cs_CZ.po: 51 da_DK.po: 184 el_GR.po: 247 es_ES.po: 51 et_EE.po: 4 fi_FI.po: 1 fr_FR.po: 51 hr_HR.po: 184 it_IT.po: 4 lt_LT.po: 4 mk_MK.po: 51 nl_NL.po: 51 nn_NO.po: 312 pl_PL.po: 51 pt_PT.po: 79 ro_RO.po: 1 ru_RU.po: 51 sk_SK.po: 51 sl_SI.po: 52 sr_RS.po: 51 sv_SE.po: 51 tr_TR.po: 184 uk_UA.po: 4 zh_CN.po: 51 If nobody takes care of these, they will remain untranslated in version 2.2.0. DEADLINE FOR SUBMITTING TRANSLATIONS IS WEDNESDAY, FEBRUARY 18! From the HISTORY file: - Fixed a memory leak in case of broken Extended Event Descriptors (thanks to Lars Hanisch). - Fixed the German translation of "Binary skip timeout (s)" (thanks to Matthias Senzel). - Fixed the German translation of "VDR will shut down later - press Power to force". - Fixed the Finnish translation of "Binary skip timeout (s)" (thanks to Rolf Ahrenberg). - Updated the Lithuanian OSD texts (thanks to Valdemaras Pipiras). - Added SDNOTIFY to Make.config.template (suggested by Christian Richter). Also added NO_KBD and BIDI. - Added code from the "jumpplay" patch that makes the recording still be considered unviewed when stopping replay within RESUMEBACKUP seconds of the first mark. - The new option "Setup/Replay/Alternate behavior for adaptive skipping" can be used to make adaptive skipping only halve the skip distance when the direction changes. That way you can reach the desired point in a recording even if you make one too many skips in a certain direction (see MANUAL for details). - Fixed cCamSlot::Assign(), so that it actually ignores the value of Query if Device is NULL (as described in the header file). - Added a missing VDRDIR="$(CWD)" to the clean-plugins target of the Makefile, to avoid error messages regarding the missing vdr.pc file. - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Updated the Estonian OSD texts (thanks to Arthur Konovalov). - Updated the Ukrainian OSD texts (thanks to Yarema Aka Knedlyk). - Updated the Romanian OSD texts (thanks to Lucian Muresan). - Updated the Hungarian OSD texts (thanks to István Füley). - Fixed switching channels in the Schedule menu after going through various Now and Schedule menus for different channels (reported by Matthias Senzel). - Fixed setting the Blue button in the Schedule/Now/Next menus, so that it only shows "Switch" if the selected event is on a different channel. - Added "NORDIG" to the list of "DVB/Standard compliance" options and using it to restrict the LCN (Logical Channel Numbers) parsing to networks that actually use this non-standard feature (thanks to Rolf Ahrenberg). - In the "Edit recording" menu the '0' key can now be used on the "Name:" field to remove the name of the recording and replace it with the last element of the recording's folder path name (suggested by Christoph Haubrich). See MANUAL, section "Managing folders" for details. - Updated the Italian OSD texts (thanks to Nino Gerbino). - The "Select folder" menu now adds the folder names of all existing recordings to any names that have been predefined in "folders.conf" (suggested by Sören Moch). - Updated the Italian OSD texts (thanks to Diego Pierotto). - Fixed the German translations of "latitude" and "longitude" (they were swapped). - Updated the Hungarian OSD texts (thanks to Mario Fenneis). - Modified runvdr.template to improve compatibility with the "bash" and "dash" shells. - Changed the German translations if the texts related to "binary skipping" (based on a suggestion by Thomas Reufer). - Updated sources.conf to reflect the fact that Astra 4A and SES5 are actually in two separate positions (thanks to Arthur Konovalov). - Fixed cMarks::GetNextBegin() and cMarks::GetNextEnd() (thanks to Stefan Herdler). The behavior of these two functions is now exacly as described in the header file. Editing marks that are placed at exactly the same offset in a recording are now preserved in the cutting process. - Changed the naming of "binary skip mode" to "adaptive skip mode" (suggested by Rolf Ahrenberg and Derek Kelly). - cDvbPlayer and cReplayControl now use the same list of editing marks. This avoids inconsistent behavior with the "Skip edited parts" or "Pause replay at last mark" functions when the editing marks are manipulated during replay. - Fixed setting an empty recording name or folder to a blank in the "Edit recording" menu (reported by Christoph Haubrich). - Added a confirmation before renaming a recording to its folder name (suggested by Christoph Haubrich). - Modified EntriesOnSameFileSystem(), so that it returns 'true' if either of the given files doesn't exist (to avoid any actions that might be triggered if files are on different file system), and changed handling the 'error' variable in cDirCopier, so that it is initialized to 'true' and will only be set to 'false' if the entire copy process has been successful (problem reported by Christoph Haubrich). - Added the UPDATE-2.2.0 file.
329 lines
9.0 KiB
C++
329 lines
9.0 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.8 2015/02/06 09:47:30 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;
|
|
int helpKeys;
|
|
void SetHelpKeys(void);
|
|
void Set(const char *CurrentFolder = NULL);
|
|
void DescendPath(const char *Path);
|
|
eOSState SetFolder(void);
|
|
eOSState Select(bool Open);
|
|
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, bool OpenSubMenus = false);
|
|
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;
|
|
int osdState;
|
|
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 cRecordingFilter {
|
|
public:
|
|
virtual ~cRecordingFilter(void) {};
|
|
virtual bool Filter(const cRecording *Recording) const = 0;
|
|
///< Returns true if the given Recording shall be displayed in the Recordings menu.
|
|
};
|
|
|
|
class cMenuRecordingItem;
|
|
|
|
class cMenuRecordings : public cOsdMenu {
|
|
private:
|
|
char *base;
|
|
int level;
|
|
int recordingsState;
|
|
int helpKeys;
|
|
const cRecordingFilter *filter;
|
|
static cString path;
|
|
static cString fileName;
|
|
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, const cRecordingFilter *Filter = NULL);
|
|
~cMenuRecordings();
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
static void SetPath(const char *Path);
|
|
static void SetRecording(const char *FileName);
|
|
};
|
|
|
|
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 cAdaptiveSkipper {
|
|
private:
|
|
int *initialValue;
|
|
int currentValue;
|
|
double framesPerSecond;
|
|
eKeys lastKey;
|
|
cTimeMs timeout;
|
|
public:
|
|
cAdaptiveSkipper(void);
|
|
void Initialize(int *InitialValue, double FramesPerSecond);
|
|
int GetValue(eKeys Key);
|
|
};
|
|
|
|
class cReplayControl : public cDvbPlayerControl {
|
|
private:
|
|
cSkinDisplayReplay *displayReplay;
|
|
cAdaptiveSkipper adaptiveSkipper;
|
|
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(int Frames, bool MarkRequired);
|
|
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
|