36 #define MAXWAIT4EPGINFO 3 // seconds
37 #define MODETIMEOUT 3 // seconds
38 #define NEWTIMERLIMIT 120 // seconds until the start time of a new timer created from the Schedule menu,
41 #define DEFERTIMER 60 // seconds by which a timer is deferred in case of problems
43 #define MAXRECORDCONTROLS (MAXDEVICES * MAXRECEIVERS)
44 #define MAXINSTANTRECTIME (24 * 60 - 1) // 23:59 hours
45 #define MAXWAITFORCAMMENU 10 // seconds to wait for the CAM menu to open
46 #define CAMMENURETYTIMEOUT 3 // seconds after which opening the CAM menu is retried
47 #define CAMRESPONSETIMEOUT 5 // seconds to wait for a response from a CAM
48 #define MINFREEDISK 300 // minimum free disk space (in MB) required to start recording
49 #define NODISKSPACEDELTA 300 // seconds between "Not enough disk space to start recording!" messages
50 #define MAXCHNAMWIDTH 16 // maximum number of characters of channels' short names shown in schedules menus
52 #define CHNUMWIDTH (numdigits(Channels.MaxNumber()) + 1)
53 #define CHNAMWIDTH (min(MAXCHNAMWIDTH, Channels.MaxShortChannelNameLength() + 1))
59 virtual void Set(
void);
102 virtual void Set(
void);
290 virtual void Set(
void);
321 const cEvent *Event = NULL;
331 Event ?
'(' :
' ', Event ? Event->
Title() :
"", Event ?
')' :
' ');
334 Event ?
'(' :
' ', Event ? Event->
Title() :
"", Event ?
')' :
' ');
344 DisplayMenu->
SetItem(
Text(), Index, Current, Selectable);
349 #define CHANNELNUMBERTIMEOUT 1000 //ms
364 virtual void Move(
int From,
int To);
396 if (channel == currentChannel)
403 SetHelp(
tr(
"Button$Edit"),
tr(
"Button$New"),
tr(
"Button$Delete"),
tr(
"Button$Mark"));
435 if (!ci->Channel()->GroupSep() && ci->Channel()->Number() ==
number) {
480 int DeletedChannel = channel->
Number();
487 if (CurrentChannel && channel == CurrentChannel) {
492 CurrentChannelNr = 0;
498 isyslog(
"channel %d deleted", DeletedChannel);
499 if (CurrentChannel && CurrentChannel->
Number() != CurrentChannelNr) {
516 if (FromChannel && ToChannel) {
517 int FromNumber = FromChannel->
Number();
518 int ToNumber = ToChannel->
Number();
523 isyslog(
"channel %d moved to %d", FromNumber, ToNumber);
524 if (CurrentChannel && CurrentChannel->
Number() != CurrentChannelNr) {
584 text = Text ? strdup(Text) : NULL;
657 :
cOsdMenu(Folder ?
tr(
"Edit folder") :
tr(
"New folder"), 12)
690 if (strcmp(Folder->Text(),
name) == 0) {
695 char *p = strpbrk(
name,
"\\{}#~");
772 Add(FolderItem, CurrentFolder ? strcmp(Folder->Text(), CurrentFolder) == 0 :
false);
784 if (strncmp(Folder->Folder()->Text(), Path, p - Path) == 0) {
786 if (Folder->Folder()->SubItems())
958 memmove(
data.
file, p, strlen(p) + 1);
1025 virtual void Set(
void);
1054 localtime_r(&Day, &tm_r);
1056 strftime(buffer,
sizeof(buffer),
"%Y%m%d", &tm_r);
1065 char diskStatusString[2] = {
diskStatus, 0 };
1067 csc.
Convert(diskStatusString),
1071 *name && **name ?
" " :
"",
1083 DisplayMenu->
SetItem(
Text(), Index, Current, Selectable);
1165 timer->SetEventFromSchedule();
1183 return item ? item->
Timer() : NULL;
1188 int NewHelpKeys = 0;
1260 #define CHECK_2PTR_NULL(x_,y_) ((x_)? ((y_)? y_:""):"")
1268 char *parameter = NULL;
1274 pEvent = ti->
Event();
1284 iRecNumber=rc->
Index() + 1;
1288 asprintf(¶meter,
"%d '%s' %d %d '%s' '%s' '%s' %d", ti->
Index(),
1296 isyslog(
"timercmd: %s", parameter);
1312 if (ti && ti->
Event())
1323 int freeMB, freeMinutes, runshortMinutes;
1325 freeMinutes = int(
double(freeMB) * 1.1 / 25.75);
1326 runshortMinutes = freeMinutes / 5;
1336 for (entry = entries.
First(); entry; entry = entries.
Next(entry))
1340 for (entry = entries.
First(); entry; entry = entries.
Next(entry))
1350 for (entry = entries.
First(); entry; entry = entries.
Next(entry)) {
1354 status = freeMinutes > runshortMinutes ?
'+' : freeMinutes > 0 ? 177 :
'-';
1357 #ifdef DEBUG_TIMER_INFO
1358 dsyslog(
"timer-info: %c | %d | %s | %s | %3d | %+5d -> %+5d",
1361 entry->
active() ?
"aktiv " :
"n.akt.",
1362 entry->
repTimer() ? entry->
isDummy() ?
" dummy " :
"mehrmalig" :
"einmalig ",
1387 state =
OnOff();
break;
1425 SetHelp(TimerMatch ==
tmFull ?
tr(
"Button$Timer") :
tr(
"Button$Record"), NULL, NULL, CanSwitch ?
tr(
"Button$Switch") : NULL);
1486 bool Update(
bool Force =
false);
1516 bool result =
false;
1522 char v =
event->Vps() && (
event->Vps() -
event->StartTime()) ?
'V' :
' ';
1523 char r =
event->SeenWithin(30) &&
event->IsRunning() ?
'*' :
' ';
1525 cString eds =
event->GetDateString();
1527 buffer =
cString::sprintf(
"%d\t%.*s\t%.*s\t%s\t%c%c%c\t%s",
channel->
Number(),
Utf8SymChars(csn, 999), csn,
Utf8SymChars(eds, 6), *eds, *
event->GetTimeString(), t, v, r,
event->Title());
1541 DisplayMenu->
SetItem(
Text(), Index, Current, Selectable);
1577 if (!Channel->GroupSep()) {
1593 bool result =
false;
1606 int NewHelpKeys = 0;
1614 const char *Red[] = { NULL,
tr(
"Button$Record"),
tr(
"Button$Timer") };
1615 SetHelp(Red[NewHelpKeys],
now ?
tr(
"Button$Next") :
tr(
"Button$Now"),
tr(
"Button$Schedule"),
tr(
"Button$Switch"));
1700 if (HadSubMenu &&
Update())
1768 if (ev->EndTime() > now || ev == PresentEvent)
1785 if ((ev->EndTime() > now || ev == Event) && !strcmp(ev->Title(), Event->
Title()))
1803 if ((ev->EndTime() > now || ev == Event) && !strcmp(ev->Title(), Event->
Title()))
1822 if (ev->EndTime() > now || ev == Event)
1832 bool result =
false;
1845 int NewHelpKeys = 0;
1853 const char *Red[] = { NULL,
tr(
"Button$Record"),
tr(
"Button$Timer") };
1854 SetHelp(Red[NewHelpKeys],
tr(
"Button$Now"),
tr(
"Button$Next"));
1864 const cEvent *Event = NULL;
1866 Event = CurrentItem->
event;
1944 ChannelNr = channel->
Number();
1976 SetHelp(
Count() ?
tr(
"Button$Record") : NULL,
tr(
"Button$Now"),
tr(
"Button$Next"),
tr(
"Button$Switch"));
1981 else if (HadSubMenu &&
Update())
2000 const char *s = Command->Text();
2001 if (Command->SubItems())
2015 const char *p = strchr(s,
':');
2022 if (l > 1 && t[l - 1] ==
'?') {
2050 const char *cmd = *cmdbuf ? *cmdbuf : *
command;
2051 dsyslog(
"executing command '%s'", cmd);
2053 if (p.
Open(cmd,
"r")) {
2056 while ((c = fgetc(p)) != EOF) {
2058 if (
char *NewBuffer = (
char *)realloc(
result, l + 21))
2061 esyslog(
"ERROR: out of memory");
2072 esyslog(
"ERROR: can't open pipe for command '%s'", cmd);
2211 const char *p = strchr(s,
'\n');
2212 int l = p ? p - s : strlen(s);
2215 item->
SetText(strndup(s, l),
false);
2260 else if (state ==
osBack) {
2287 if (CamSlot->HasUserIO())
2389 if (*
Text() ==
'\t')
2409 DisplayMenu->
SetItem(
Text(), Index, Current, Selectable);
2457 Add(
new cOsdItem((dirSize > 9999) ? cString::sprintf(
"%s:\t%.2f GB%s",
tr(
"Size"), dirSize / 1024.0, *bitRate) : cString::sprintf(
"%s:\t%d MB%s",
tr(
"Size"), dirSize, *bitRate),
osUnknown,
false));
2466 isResume = (ResumeFile.Read() != -1);
2476 SetHelp(
tr(
"Button$Folder"),
tr(
"Button$Cut"),
tr(
"Button$Copy"),
tr(
"Button$Rename/Move"));
2492 memmove(
name, p, strlen(p) + 1);
2576 :
cOsdMenu(Base ? Base :
tr(
"Recordings"), 9, 6, 6)
2579 base = Base ? strdup(Base) : NULL;
2602 int NewHelpKeys = 0;
2613 switch (NewHelpKeys) {
2615 case 1:
SetHelp(
tr(
"Button$Open"));
break;
2631 CurrentRecording = ri->Recording()->FileName();
2643 if (p->Name() && strcmp(p->Name(), Item->
Name()) == 0) {
2649 if (*Item->
Text() && !LastDir) {
2657 if (LastItem || LastDir) {
2658 if (CurrentRecording && strcmp(CurrentRecording, recording->FileName()) == 0)
2684 const char *t = ri->
Name();
2762 if (!recording || recording->
Delete()) {
2852 ri->SetRecording(riSub->Recording());
2874 virtual void Store(
void);
2907 virtual void Set(
void);
2992 bool ModifiedAppearance =
false;
3001 ModifiedAppearance =
true;
3010 ModifiedAppearance =
true;
3012 ModifiedAppearance =
true;
3017 ModifiedAppearance =
true;
3019 ModifiedAppearance =
true;
3021 ModifiedAppearance =
true;
3030 if (ModifiedAppearance) {
3126 for (k = 0; k < oldnumLanguages; k++) {
3130 if (k >= oldnumLanguages) {
3186 SetHelp(NULL,
tr(
"Button$Audio"),
tr(
"Button$Subtitles"), NULL);
3223 int oldPrimaryDVB =
::Setup.PrimaryDVB;
3224 int oldVideoDisplayFormat =
::Setup.VideoDisplayFormat;
3225 bool oldVideoFormat =
::Setup.VideoFormat;
3227 bool oldDisplaySubtitles =
::Setup.DisplaySubtitles;
3249 for (k = 0; k < oldnumAudioLanguages; k++) {
3253 if (k >= oldnumAudioLanguages) {
3267 for (k = 0; k < oldnumSubtitleLanguages; k++) {
3271 if (k >= oldnumSubtitleLanguages) {
3286 if (::
Setup.PrimaryDVB != oldPrimaryDVB)
3288 if (::
Setup.VideoDisplayFormat != oldVideoDisplayFormat)
3290 if (::
Setup.VideoFormat != oldVideoFormat)
3292 if (::
Setup.DisplaySubtitles != oldDisplaySubtitles)
3332 int NumSatDevices = 0;
3337 if (NumSatDevices > 1) {
3353 bool DeviceBondingsChanged =
false;
3363 else if (DeviceBondingsChanged)
3392 case msReset: CamName =
tr(
"CAM reset");
break;
3393 case msPresent: CamName =
tr(
"CAM present");
break;
3394 case msReady: CamName =
tr(
"CAM ready");
break;
3395 default: CamName =
"-";
break;
3399 if (strcmp(buffer,
Text()) != 0) {
3432 time_t t0 = time(NULL);
3527 virtual void Store(
void);
3608 for (
int i = 0; ; i++) {
3651 virtual void Set(
void);
3669 snprintf(buffer,
sizeof(buffer),
"%s - VDR %s",
tr(
"Setup"),
VDRVERSION);
3739 #define STOP_RECORDING trNOOP(" Stop recording ")
3806 for (
int i = 0; ; i++) {
3830 bool result =
false;
3833 if (Force || NewReplaying !=
replaying) {
3881 const char *s = NULL;
3968 default:
switch (Key) {
3970 case kRed:
if (!HadSubMenu)
3973 case kGreen:
if (!HadSubMenu) {
3978 case kYellow:
if (!HadSubMenu)
3981 case kBlue:
if (!HadSubMenu)
4035 int indexSubtitle = 0;
4039 case 2:
if (p->
type == 0x05)
4176 if (n <= ch->Number() && ch->
Number() < n + m) {
4211 int SaveGroup =
group;
4290 if ((Key & (k_Repeat |
k_Release)) == 0) {
4317 #define VOLUMETIMEOUT 1000 //ms
4318 #define MUTETIMEOUT 5000 //ms
4384 #define TRACKTIMEOUT 5000 //ms
4399 if (TrackId && TrackId->
id) {
4402 if (i == CurrentAudioTrack)
4451 int oldTrack =
track;
4468 static int ac[] = { 1, 0, 2 };
4495 if (
track != oldTrack) {
4520 if (TrackId && TrackId->
id) {
4523 if (i == CurrentSubtitleTrack)
4569 int oldTrack =
track;
4596 if (
track != oldTrack) {
4632 fileName = strdup(Recording.FileName());
4657 Recording.WriteInfo();
4663 char *Directory = strdup(
fileName);
4665 if (
char *p = strrchr(Directory,
'/')) {
4666 while (p > Directory && *--p !=
'/')
4670 dsyslog(
"setting %s to be sorted by time", Directory);
4695 #define INSTANT_REC_EPG_LOOKAHEAD 300 // seconds to look into the EPG data for an instant recording
4711 dsyslog(
"got EPG info after %d seconds", seconds);
4718 dsyslog(
"waiting for EPG info...");
4721 dsyslog(
"no EPG info available");
4732 if (ExecuteUserCommand)
4756 static time_t LastNoDiskSpaceMessage = 0;
4765 isyslog(
"not enough disk space to start recording%s%s", Timer ?
" timer " :
"", Timer ? *Timer->
ToDescr() :
"");
4767 LastNoDiskSpaceMessage = time(NULL);
4771 LastNoDiskSpaceMessage = 0;
4786 if (!Timer || Timer->
Matches()) {
4795 else if (!Timer || !Timer->
Pending()) {
4796 isyslog(
"no free DVB device to record channel %d!", ch);
4801 esyslog(
"ERROR: channel %d not defined!", ch);
4811 if (
id && strcmp(
id, InstantId) == 0) {
4829 if (
Start(NULL,
true)) {
4846 if (LastInstantId && LastInstantId ==
RecordControls[i]->InstantId())
4847 LastInstantId = NULL;
4891 isyslog(
"stopping recording due to modification of channel %d", Channel->
Number());
4920 int NewState =
state;
4921 bool Result = State != NewState;
4928 #define REPLAYCONTROLSKIPLIMIT 9 // s
4929 #define REPLAYCONTROLSKIPSECONDS 90 // s
4930 #define REPLAYCONTROLSKIPTIMEOUT 5000 // ms
4986 if (recording->
Delete()) {
5066 bool NormalPlay = (Play && Speed == -1);
5089 if (
GetIndex(Current, Total) && Total > 0) {
5107 Index = Current - Index;
5130 strcpy(buf,
tr(
"Jump: "));
5131 int len = strlen(buf);
5140 sprintf(buf + len,
"%c%c:%c%c", ch10, ch1, cm10, cm1);
5146 #define STAY_SECONDS_OFF_END 10
5221 if (
GetIndex(Current, Total,
true)) {
5230 Goto(Current,
true);
5245 bool Play2, Forward2;
5249 Goto(m->Position());
5253 Goto(m->Position(),
true);
5261 Goto(Forward ? Total : 0,
true);
5282 Goto(m->Position(),
true);
5373 bool DoShowMode =
true;
int Find(const char *s) const
cDisplaySubtitleTracks(void)
void ShowTimed(int Seconds=0)
const cEvent * GetPresentEvent(void) const
static cString ToString(int Code)
bool Replaying(void) const
Returns true if we are currently replaying.
int DeviceNumber(void) const
Returns the number of this device (0 ... numDevices).
virtual void SetTrack(int Index, const char *const *Tracks)=0
< This class implements the track display.
cOsdItem * stopReplayItem
cString NewVideoFileName(const char *FileName, const char *NewDirName)
time_t startTime(void) const
eOSState ProcessKey(eKeys Key)
virtual int Compare(const cListObject &ListObject) const
Must return 0 if this object is equal to ListObject, a positive value if it is "greater", and a negative value if it is "smaller".
cList< cNestedItem > * commands
virtual cSkinDisplayVolume * DisplayVolume(void)=0
Creates and returns a new object for displaying the current volume.
const char * Text(void) const
virtual eOSState ProcessKey(eKeys Key)
void TimeSearchDisplay(void)
bool Confirm(const char *s, int Seconds=10, bool WaitForTimeout=false)
static void ResetVersions(void)
int GetPrevGroup(int Idx)
int I18nCurrentLanguage(void)
Returns the index of the current language.
void SetRecording(bool Recording)
void DisplayChannel(void)
bool Load(void)
Loads the current list of recordings and returns true if there is anything in it (for compatibility w...
cMark * GetPrev(int Position)
virtual void GetData(cChannel *Channel)=0
Copies all source specific parameters to the given Channel.
void SetRecordingsSortMode(const char *Directory, eRecordingsSortMode SortMode)
const cRecordingInfo * Info(void) const
void ResetResume(const char *ResumeFileName=NULL)
bool Load(const char *SkinName)
cRecordControl(cDevice *Device, cTimer *Timer=NULL, bool Pause=false)
virtual const cRecording * GetRecording(void)
Returns the cRecording that is currently being replayed, or NULL if this player is not playing a cRec...
cOsdItem * stopRecordingItem
void Add(cListObject *Object, cListObject *After=NULL)
static cString ToText(const cChannel *Channel)
double FramesPerSecond(void)
cSourceParam * Get(char Source) const
void DelByName(const char *FileName, bool RemoveRecording=true)
virtual void SetVolume(int Current, int Total, bool Mute)=0
< This class implements the volume/mute display.
static void Shutdown(void)
static void InvokeCommand(const char *State, const char *RecordingFileName, const char *SourceFileName=NULL)
double FramesPerSecond(void) const
virtual const char * Version(void)=0
char language[MAXLANGCODE2]
const char * Title(char Delimiter= ' ', bool NewIndicator=false, int Level=-1) const
#define RUC_BEFORERECORDING
cNestedItemList TimerCommands
static const char * SystemCharacterTable(void)
bool repTimer(void) const
#define TIMERMACRO_EPISODE
static cString sprintf(const char *fmt,...) __attribute__((format(printf
const char * DefaultFontSml
const char * VideoDirectory
bool DayMatches(time_t t) const
virtual cOsdObject * MainMenuAction(void)
static cDisplayVolume * Create(void)
cMenuMain(eOSState State=osUnknown, bool OpenSubMenus=false)
cString PrintFirstDay(void) const
cTimer * GetMatch(time_t t)
const cEvent * Event(void) const
static void SetupChanged(void)
virtual void SetVideoDisplayFormat(eVideoDisplayFormat VideoDisplayFormat)
Sets the video display format to the given one (only useful if this device has an MPEG decoder)...
static void ChannelDataModified(cChannel *Channel)
bool Parse(const char *s)
bool Matches(time_t t=0, bool Directly=false, int Margin=0) const
static cDevice * GetDevice(int Index)
Gets the device with the given Index.
cOsdItem * Get(int Index) const
const char * ShortName(bool OrName=false) const
static cControl * Control(bool Hidden=false)
Returns the current replay control (if any) in case it is currently visible.
static void Process(time_t t)
bool AttachReceiver(cReceiver *Receiver)
Attaches the given receiver to this device.
char FontSml[MAXFONTNAME]
int AlwaysSortFoldersFirst
bool SetAvailableTrack(eTrackType Type, int Index, uint16_t Id, const char *Language=NULL, const char *Description=NULL)
Sets the track of the given Type and Index to the given values.
int EPGLanguages[I18N_MAX_LANGUAGES+1]
bool GroupSep(void) const
const cComponents * Components(void) const
virtual eOSState ProcessKey(eKeys Key)
eTrackType types[ttMaxTrackTypes]
cTimerEntry(cMenuTimerItem *item)
tComponent * Component(int Index) const
void SetSubItems(bool On)
cSkinDisplayReplay * displayReplay
eOSState ProcessKey(eKeys Key)
static void Process(eKeys Key)
static cDisplayChannel * currentDisplayChannel
static int NumDevices(void)
Returns the total number of devices.
virtual void SetMode(bool Play, bool Forward, int Speed)=0
Sets the current replay mode, which can be used to display some indicator, showing the user whether w...
void SetPending(bool Pending)
eTrackType GetCurrentSubtitleTrack(void) const
void Exit(int ExitCode)
Set VDR exit code and initiate end of VDR main loop.
time_t StartTime(void) const
int weekdays
bitmask, lowest bits: SSFTWTM (the 'M' is the LSB)
time_t StartTime(void) const
void SetPosition(int Position)
void SetText(const char *Text)
static bool StateChanged(int &State)
virtual void SetVideoFormat(bool VideoFormat16_9)
Sets the output video format to either 16:9 or 4:3 (only useful if this device has an MPEG decoder)...
cString ChannelString(const cChannel *Channel, int Number)
int GetThemeIndex(const char *Description)
virtual void SetJump(const char *Jump)=0
Sets the prompt that allows the user to enter a jump point.
const char * Convert(const char *From, char *To=NULL, size_t ToLength=0)
Converts the given Text from FromCode to ToCode (as set in the constructor).
void Add(cTimer *Timer, cTimer *After=NULL)
virtual eOSState ProcessKey(eKeys Key)
void SetNeedsFastResponse(bool NeedsFastResponse)
void I18nSetLocale(const char *Locale)
Sets the current locale to Locale.
eModuleStatus ModuleStatus(void)
Returns the status of the CAM in this slot.
static const cSchedules * Schedules(cSchedulesLock &SchedulesLock)
Caller must provide a cSchedulesLock which has to survive the entire time the returned cSchedules is ...
virtual void SetRecording(const cRecording *Recording)
Sets the recording that is currently being played.
cNestedItemList RecordingCommands
cString IndexToHMSF(int Index, bool WithFrame, double FramesPerSecond)
const cChannel * Channel(void) const
bool SetCurrentAudioTrack(eTrackType Type)
Sets the current audio track to the given Type.
const cTimer * Timer(void) const
static void SetRecording(const char *FileName)
static int CurrentVolume(void)
void EnsureSubtitleTrack(void)
Makes sure one of the preferred language subtitle tracks is selected.
virtual int Compare(const cListObject &ListObject) const
Must return 0 if this object is equal to ListObject, a positive value if it is "greater", and a negative value if it is "smaller".
virtual const char * Description(void)=0
void SetEventFromSchedule(const cSchedules *Schedules=NULL)
cDisplayChannel(int Number, bool Switched)
bool Transferring(void) const
Returns true if we are currently in Transfer Mode.
virtual void SetMarks(const cMarks *Marks)
Sets the editing marks to Marks, which shall be used to display the progress bar through a cProgressB...
const char * Text(void) const
bool Recording(void) const
cDevice * Device(void)
Returns the device this CAM slot is currently assigned to.
cTimer * GetTimer(cTimer *Timer)
cTimerEntry(const cTimer *timer, time_t start)
cRecording * GetByName(const char *FileName)
static int CurrentChannel(void)
Returns the number of the current channel on the primary device.
const char * Name(void) const
bool Selectable(void) const
const char * I18nLocale(int Language)
Returns the locale code of the given Language (which is an index as returned by I18nCurrentLanguage()...
static cPlugin * CallFirstService(const char *Id, void *Data=NULL)
cMark * GetNext(int Position)
T * Next(const T *object) const
static cDisplayTracks * currentDisplayTracks
void GetRecordingsSortMode(const char *Directory)
cMenuCommands(const char *Title, cList< cNestedItem > *Commands, const char *Parameters=NULL)
virtual void Flush(void)
Actually draws the OSD display to the output device.
static bool BondDevices(const char *Bondings)
Bonds the devices as defined in the given Bondings string.
char * descriptions[ttMaxTrackTypes+1]
virtual cOsdItem * GetOsdItem(void)=0
Returns all the OSD items necessary for editing the source specific parameters of the channel that wa...
bool Modified(int &State)
Returns true if any of the timers have been modified, which is detected by State being different than...
void DecBeingEdited(void)
virtual void Insert(T Data, int Before=0)
static bool Start(const char *FileName, const char *TargetFileName=NULL, bool Overwrite=true)
int SubtitleFgTransparency
const char *const * Descriptions(void)
virtual ~cDisplayVolume()
bool HasUserIO(void)
Returns true if there is a pending user interaction, which shall be retrieved via GetMenu() or GetEnq...
cListObject * Next(void) const
virtual cOsdObject * GetInfo(void)
Returns an OSD object that displays information about the currently played programme.
cCiMenu * GetMenu(void)
Gets a pending menu, or NULL if there is no menu.
cSkinDisplayTracks * displayTracks
cOsdItem * cancelFileTransferItem
bool FromString(const char *s)
bool SwitchChannel(const cChannel *Channel, bool LiveView)
Switches the device to the given Channel, initiating transfer mode if necessary.
virtual cSkinDisplayReplay * DisplayReplay(bool ModeOnly)=0
Creates and returns a new object for displaying replay progress.
void IncBeingEdited(void)
char FontOsd[MAXFONTNAME]
const char * Description(void)
Returns a user visible, single line description of this theme.
int GetNextNormal(int Idx)
int LengthInSeconds(void) const
Returns the length (in seconds) of this recording, or -1 in case of error.
tChannelID ChannelID(void) const
static int GetMDay(time_t t)
bool HasFlags(uint Flags) const
static void SleepMs(int TimeoutMs)
Creates a cCondWait object and uses it to sleep for TimeoutMs milliseconds, immediately giving up the...
cOsdItem * cancelEditingItem
void SetDiskStatus(char DiskStatus)
void SetText(const char *Text, bool Copy=true)
cSkinDisplayVolume * displayVolume
void SetSelectable(bool Selectable)
int GetPrevNormal(int Idx)
const cList< cEvent > * Events(void) const
bool IsAttached(void)
Returns true if this receiver is (still) attached to a device.
static void MsgSetAudioChannel(int AudioChannel)
bool Load(const char *FileName, bool OnlyDescriptions=false)
Loads the theme data from the given file.
void ClrAvailableTracks(bool DescriptionsOnly=false, bool IdsOnly=false)
Clears the list of currently available tracks.
static void UpdateOsdSize(bool Force=false)
Inquires the actual size of the video display and adjusts the OSD and font sizes accordingly.
const cEvent * GetEventAround(time_t Time) const
cSourceParams SourceParams
static const cCursesFont Font
bool Open(const char *Command, const char *Mode)
#define IS_AUDIO_TRACK(t)
int SubtitleLanguages[I18N_MAX_LANGUAGES+1]
virtual cMenuSetupPage * SetupMenu(void)
virtual ~cDisplayChannel()
bool Delete(void)
Changes the file name so that it will no longer be visible in the "Recordings" menu Returns false in ...
cList< cNestedItem > * SubItems(void)
bool Put(uint64_t Code, bool Repeat=false, bool Release=false)
tChannelID GetChannelID(void) const
cShutdownHandler ShutdownHandler
const char * InstantId(void)
cSkinDisplayTracks * displayTracks
static int IsOpen(void)
Returns true if there is currently a level 0 OSD open.
virtual ~cReplayControl()
void SetModified(bool ByUser=false)
int GetNextGroup(int Idx)
void IncBeingEdited(void)
static void Stop(const char *InstantId)
bool HasRecordingsSortMode(const char *Directory)
const char * Provider(void) const
static cDisplaySubtitleTracks * Create(void)
virtual ~cRecordControl()
time_t day
midnight of the day this timer shall hit, or of the first day it shall hit in case of a repeating tim...
static time_t IncDay(time_t t, int Days)
#define RUC_AFTERRECORDING
cChannel * GetByChannelID(tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false)
void Stop(bool ExecuteUserCommand=true)
bool GetIndex(int &Current, int &Total, bool SnapToIFrame=false)
static void Launch(cControl *Control)
void MarkJump(bool Forward)
static const char * LastReplayed(void)
eKeys Message(eMessageType Type, const char *s, int Seconds=0)
Displays the given message, either through a currently visible display object that is capable of doin...
static void MsgOsdTextItem(const char *Text, bool Scroll=false)
virtual eOSState ProcessKey(eKeys Key)
bool HasTimer(void) const
bool ShowProgress(bool Initial)
const char * Title(void) const
bool Reset(void)
Resets the CAM in this slot.
static cDisplaySubtitleTracks * currentDisplayTracks
eOSState ProcessKey(eKeys Key)
bool GetReplayMode(bool &Play, bool &Forward, int &Speed)
static const char * GetInstantId(const char *LastInstantId)
const char * DefaultFontFix
int CardIndex(void) const
Returns the card index of this device (0 ... MAXDEVICES - 1).
static bool HasPlugins(void)
static void TriggerLastActivity(void)
Simulates user activity, for instance to keep the current menu open even if no remote control key has...
static void MsgSetAudioTrack(int Index, const char *const *Tracks)
static void MsgOsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle)
const char * Description(void) const
const char * Name(int Index)
static cRecordControl * RecordControls[]
virtual void SetProgress(int Current, int Total)=0
This function will be called whenever the position in or the total length of the recording has change...
const cSchedule * GetSchedule(tChannelID ChannelID) const
void TimeSearchProcess(eKeys Key)
static bool Active(const char *FileName=NULL)
Returns true if the cutter is currently active.
cString ToDescr(void) const
cCiEnquiry * GetEnquiry(void)
Gets a pending enquiry, or NULL if there is no enquiry.
static void ClearLastReplayed(const char *FileName)
int GetNumSequences(void)
Returns the actual number of sequences to be cut from the recording.
static void MsgOsdChannel(const char *Text)
static void MsgSetSubtitleTrack(int Index, const char *const *Tracks)
void DecBeingEdited(void)
const cEvent * lastFollowing
int VideoDiskSpace(int *FreeMB, int *UsedMB)
bool HasUniqueChannelID(cChannel *NewChannel, cChannel *OldChannel=NULL)
virtual eOSState ProcessKey(eKeys Key)
cListObject * Prev(void) const
virtual const char * MainMenuEntry(void)
void Del(cListObject *Object, bool DeleteObject=true)
cString ToString(void) const
static void Process(eKeys Key)
char FontFix[MAXFONTNAME]
int ShowChannelNamesWithSource
static void Process(eKeys Key)
static void MsgOsdClear(void)
time_t StopTime(void) const
cChannel * GetByNumber(int Number, int SkipGap=0)
void EnsureAudioTrack(bool Force=false)
Makes sure an audio track is selected that is actually available.
int AudioLanguages[I18N_MAX_LANGUAGES+1]
static cOsdObject * pluginOsdObject
void Reply(const char *s)
cMark * Get(int Position)
static cDevice * PrimaryDevice(void)
Returns the primary device.
static bool Start(cRecording *Recording, const char *NewName, bool CopyOnly=false)
void SetFlags(uint Flags)
virtual void SetTotal(const char *Total)=0
Sets the total length of the recording, as a user readable string if the form "h:mm:ss".
static bool GetAvailableFontNames(cStringList *FontNames, bool Monospaced=false)
Queries the font configuration for a list of available font names, which is returned in FontNames...
#define MAXEPGBUGFIXLEVEL
const cStringList * I18nLanguages(void)
Returns the list of available languages.
bool HasMMI(void)
Returns 'true' if the CAM in this slot has an active MMI.
cChannel * NextAvailableChannel(cChannel *Channel, int Direction)
void SetDeferred(int Seconds)
virtual ~cDisplayTracks()
static cDisplayTracks * Create(void)
void StopReplay(void)
Stops the current replay session (if any).
const tTrackId * GetTrack(eTrackType Type)
Returns a pointer to the given track id, or NULL if Type is not less than ttMaxTrackTypes.
const char * GetCamName(void)
Returns the name of the CAM in this slot, or NULL if there is no ready CAM in this slot...
cSkinDisplayChannel * displayChannel
const char * File(void) const
int GetAudioChannel(void)
Gets the current audio channel, which is stereo (0), mono left (1) or mono right (2).
bool IsSingleEvent(void) const
int I18nNumLanguagesWithLocale(void)
Returns the number of entries in the list returned by I18nLanguages() that actually have a locale...
virtual void Move(int From, int To)
cRecordings Recordings
Any access to Recordings that loops through the list of recordings needs to hold a thread lock on thi...
bool ConfirmRestart(bool Ask)
Check for background activity that blocks restart.
static cReplayControl * currentReplayControl
static void SetCurrentChannel(const cChannel *Channel)
Sets the number of the current channel on the primary device, without actually switching to it...
cString GetTimeString(void) const
void IncRecordingsSortMode(const char *Directory)
int NumComponents(void) const
const char * Description(void) const
const char * Name(void) const
static void ChangeState(void)
void AssertFreeDiskSpace(int Priority, bool Force)
The special Priority value -1 means that we shall get rid of any deleted recordings faster than norma...
virtual void SetAudioChannel(int AudioChannel)=0
Sets the audio channel indicator.
eTrackType types[ttMaxTrackTypes]
static cRecordControl * GetRecordControl(const char *FileName)
static cPlugin * GetPlugin(int Index)
const char * Title(void) const
virtual ~cDisplaySubtitleTracks()
const char * Description(void) const
void ClearSortNames(void)
int SecondsToFrames(int Seconds, double FramesPerSecond)
bool StateChanged(int &State)
void SetKeepTracks(bool KeepTracks)
Controls whether the current audio and subtitle track settings shall be kept as they currently are...
const cComponents * Components(void) const
char language[MAXLANGCODE2]
void I18nSetLanguage(int Language)
Sets the current language index to Language.
bool Load(const char *RecordingFileName, double FramesPerSecond=DEFAULTFRAMESPERSECOND, bool IsPesRecording=false)
bool SwitchTo(int Number)
time_t FirstDay(void) const
static cOsdObject * PluginOsdObject(void)
virtual bool ProvidesSource(int Source) const
Returns true if this device can provide the given source.
virtual void SetCurrent(const char *Current)=0
Sets the current position within the recording, as a user readable string if the form "h:mm:ss...
char NameInstantRecord[NAME_MAX+1]
bool EnterMenu(void)
Requests the CAM in this slot to start its menu.
virtual void SetEvents(const cEvent *Present, const cEvent *Following)=0
Sets the Present and Following EPG events.
void SetAudioChannel(int AudioChannel)
Sets the audio channel to stereo (0), mono left (1) or mono right (2).
cReplayControl(bool PauseLive=false)
void Goto(int Index, bool Still=false)
int SkipFrames(int Frames)
#define IS_DOLBY_TRACK(t)
char * ExchangeChars(char *s, bool ToFileSystem)
const char * FileName(int Index)
const char * ShortText(void) const
char OSDTheme[MaxThemeName]
bool SetCurrentSubtitleTrack(eTrackType Type, bool Manual=false)
Sets the current subtitle track to the given Type.
const char * DefaultFontOsd
#define MAXVIDEOFILESIZETS
char OSDSkin[MaxSkinName]
static bool PauseLiveVideo(void)
cSkin * Current(void)
Returns a pointer to the current skin.
const char * FileName(void) const
static void ForceCheck(void)
To avoid unnecessary load, the video disk usage is only actually checked every DISKSPACECHEK seconds...
void Del(cTimer *Timer, bool DeleteObject=true)
void SkipSeconds(int Seconds)
bool Update(bool Force=false)
eTrackType GetCurrentAudioTrack(void) const
const cEvent * lastPresent
virtual cSkinDisplayTracks * DisplayTracks(const char *Title, int NumTracks, const char *const *Tracks)=0
Creates and returns a new object for displaying the available tracks.
T * Prev(const T *object) const
bool SetCurrent(const char *Name=NULL)
Sets the current skin to the one indicated by name.
static void Shutdown(void)
virtual cSkinDisplayChannel * DisplayChannel(bool WithInfo)=0
Creates and returns a new object for displaying the current channel.
void AddByName(const char *FileName, bool TriggerUpdate=true)
char OSDLanguage[I18N_MAX_LOCALE_LEN]
bool IsPesRecording(void) const
void RequestEmergencyExit(void)
Requests an emergency exit of the VDR main loop.
static cDisplayVolume * currentDisplayVolume
int SubtitleBgTransparency
int SlotNumber(void)
Returns the number of this CAM slot within the whole system.
The cDevice class is the base from which actual devices can be derived.
static void MsgRecording(const cDevice *Device, const char *Name, const char *FileName, bool On)
static const char * NowReplaying(void)
char * descriptions[ttMaxTrackTypes+1]
virtual void SetData(cChannel *Channel)=0
Sets all source specific parameters to those of the given Channel.
void MarkMove(bool Forward)
static void MsgReplaying(const cControl *Control, const char *Name, const char *FileName, bool On)
static cString PrintDay(time_t Day, int WeekDays, bool SingleByteChars)
virtual void SetChannel(const cChannel *Channel, int Number)=0
< This class is used to display the current channel, together with the present and following EPG even...
const cEvent * GetFollowingEvent(void) const
static bool Start(cTimer *Timer=NULL, bool Pause=false)