mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
VDR developer version 1.7.33 is now available at ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.33.tar.bz2 A 'diff' against the previous version is available at ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.32-1.7.33.diff MD5 checksums: 7c21451360ac7959d0d95e533d34451c vdr-1.7.33.tar.bz2 c79257198f8569bc02f43dc470ee3076 vdr-1.7.32-1.7.33.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. IMPORTANT: ========== This version of VDR no longer sets LC_NUMERIC to "C" in order to make sure any floating point numbers written to configuration files use a proper decimal point. It rather explicitly converts such numbers using the new functions atod() and dtoa(). IF YOU USE PLUGINS THAT STORE FLOATING POINT NUMBERS IN THEIR OWN CONFIGURATION FILES, YOU SHOULD SET export LC_NUMERIC=C BEFORE RUNNING VDR, UNTIL THESE PLUGINS HAVE BEEN PROPERLY UPDATED. From the HISTORY file: - In order to be able to play TS recordings from other sources, in which there is more than one PMT PID in the PAT, 'int cPatPmtParser::PatPmt(void)' has been changed to 'bool cPatPmtParser::IsPatPmt(int Pid)'. - Fixed learning remote control keys with the LCARS skin. - Updated the Macedonian OSD texts (thanks to Dimitar Petrovski). - Fixed getting only non-video packets in cCuttingThread::GetPendingPackets() (reported by Sören Moch). - Changed all occurrences of MPEG4 to H264 (pointed out by Sören Moch). - Fixed getting the number of editing sequences in case the last sequence has no actual end mark. - The cutter now only increments the TS continuity counter for packets that have a payload (pointed out by Sören Moch). - Fixed adjusting the DTS values in the cutter, to compensate for dropped B-frames (pointed out by Sören Moch). - Fixed a typo in skins.h (thanks to Lars Hanisch). - Simplified calculating the PTS offset in cPtsFixer::Fix() and fixed the overflow handling of PCR values (thanks to Sören Moch). - Fixed calling iconv_close() only with a valid iconv_t value (thanks to Juergen Lock). - Fixed faulty opening of the Recordings menu when pressing the Play key during normal live viewing mode in case there is a "last viewed" recording. - Fixed some #include statements in plugins to use <vdr/...> instead of "vdr/..." (thanks to Lars Hanisch). - Fixed some spellings in osd.h and svdrp.c (thanks to Ville Skyttä). - Fixed handling lowercase polarization characters in channel definitions if no DiSEqC is used (reported by Mike Hay, actual bug pointed out by Stefan Huelswitt). - Synchronizing system time to the transponder time is now done using adjtime() in order to avoid discontinuities (suggested by Manuel Reimer). If the time difference is more than 10 seconds, stime() is still used to do the initial sync. - The '7' and '9' keys now jump to the very beginning or end, respectively, of the recording, even if there is no mark set at that point (following a request from Andre Weidemann). - Now always setting the TDT EIT filter, because otherwise when turning on using the transponder time in the Setup menu, it would only be used after the next restart of VDR (thanks to Sundararaj Reel). - The new functions cDevice::CanScaleVideo() and cDevice::ScaleVideo() can be used by derived output devices to implement scaling the video to a given size and location (based on a suggestion by Lucian Muresan). - The SVDRP command HITK now discards any keys if the remote control is currently turned off (thanks to Alexander Hans). - The new remote control key "Play/Pause" can be used with remote controls that don't have separate keys for "Play" and "Pause", but rather have a single key for both functions (thanks to Stefan Hofmann for suggesting to implement support for such remote controls). - The new option "Setup/Replay/Pause on mark set" can be used to activate automatically going into Pause mode if an editing mark is set during replay (suggested by Andre Weidemann). - When regenerating the index of a recording, the frame rate stored in the info file is now automatically fixed if it differs from the value detected by the frame detector. - Fixed creating the edited version directory if a relative file name is given in the call to 'vdr --edit' (the '/video' part was stripped from the given file name even if it wasn't there). - The new option "Setup/Replay/Progress display time" can be used to activate automatically displaying the progress display whenever replay of a recording is started (suggested by Stefan Blochberger). - Changed reading and writing of floating point numbers into configuration files to make it independent of the decimal point used in the current locale. All calls to atof() have been replaced with the new function atod(), which makes sure the string representation of a floating point number using a '.' as decimal point will be handled correctly, even if the locale in use expects a ',' as the decimal point. Plugins that read floating point numbers from their own configuration files will also need to use atod() for this, or use a method of their own (this is not necessary if values are stored in VDR's setup.conf file, because VDR takes care of this). The reason for these changes is that floating point numbers presented to the user shall be displayed in the way defined by the current locale (suggested by Stefan Blochberger). If you use plugins that store floating point values in configuration files of their own and have not yet been adapted to this change, you should set export LC_NUMERIC=C before running VDR. Otherwise your plugin's configuration data may not be read or written correctly. - The new functions SetItemEvent(), SetItemTimer(), SetItemChannel() and SetItemRecording() of the cSkinDisplayMenu class can be reimplemented by skin plugins to display these items in a more elaborate way than just a simple line of text.
300 lines
8.2 KiB
C++
300 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 2.13 2012/12/07 13:44:13 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;
|
|
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
|