37 #define MAXWAIT4EPGINFO 3 // seconds 38 #define MODETIMEOUT 3 // seconds 39 #define NEWTIMERLIMIT 120 // seconds until the start time of a new timer created from the Schedule menu, 42 #define DEFERTIMER 60 // seconds by which a timer is deferred in case of problems 44 #define MAXRECORDCONTROLS (MAXDEVICES * MAXRECEIVERS) 45 #define MAXINSTANTRECTIME (24 * 60 - 1) // 23:59 hours 46 #define MAXWAITFORCAMMENU 10 // seconds to wait for the CAM menu to open 47 #define CAMMENURETRYTIMEOUT 3 // seconds after which opening the CAM menu is retried 48 #define CAMRESPONSETIMEOUT 5 // seconds to wait for a response from a CAM 49 #define PROGRESSTIMEOUT 100 // milliseconds to wait before updating the replay progress display 50 #define MINFREEDISK 300 // minimum free disk space (in MB) required to start recording 51 #define NODISKSPACEDELTA 300 // seconds between "Not enough disk space to start recording!" messages 52 #define MAXCHNAMWIDTH 16 // maximum number of characters of channels' short names shown in schedules menus 54 #define CHNUMWIDTH (numdigits(cChannels::MaxNumber()) + 1) 55 #define CHNAMWIDTH (min(MAXCHNAMWIDTH, cChannels::MaxShortChannelNameLength() + 1)) 61 virtual void Set(
void);
104 virtual void Set(
void);
249 bool Modified =
false;
299 virtual int Compare(
const cListObject &ListObject)
const;
300 virtual void Set(
void);
311 SetSelectable(
false);
319 if (sortMode == csmProvider)
321 if (sortMode == csmName || r == 0)
323 if (sortMode == csmNumber || r == 0)
334 if (sortMode == csmProvider)
336 else if (
Setup.WarEagleIcons) {
355 DisplayMenu->
SetItem(Text(), Index, Current, Selectable);
360 #define CHANNELNUMBERTIMEOUT 1000 //ms 367 void Set(
bool Force =
false);
376 virtual void Move(
int From,
int To);
405 for (
const cChannel *Channel = Channels->First(); Channel; Channel = Channels->
Next(Channel)) {
409 if (Channel == CurrentChannel)
419 SetHelp(
tr(
"Button$Edit"),
tr(
"Button$New"),
tr(
"Button$Delete"),
tr(
"Button$Mark"));
454 if (!ci->Channel()->GroupSep() && ci->Channel()->Number() ==
number) {
507 bool Deleted =
false;
510 int DeletedChannel = Channel->
Number();
512 if (Timers->UsesChannel(Channel)) {
518 if (CurrentChannel && Channel == CurrentChannel) {
522 CurrentChannel = Channels->
Get(n);
523 CurrentChannelNr = 0;
525 Channels->
Del(Channel);
529 isyslog(
"channel %d deleted", DeletedChannel);
531 if (CurrentChannel && CurrentChannel->
Number() != CurrentChannelNr) {
547 cChannel *CurrentChannel = Channels->GetByNumber(CurrentChannelNr);
550 if (FromChannel && ToChannel) {
551 int FromNumber = FromChannel->
Number();
552 int ToNumber = ToChannel->
Number();
553 Channels->Move(FromChannel, ToChannel);
556 Channels->SetModifiedByUser();
557 isyslog(
"channel %d moved to %d", FromNumber, ToNumber);
558 if (CurrentChannel && CurrentChannel->
Number() != CurrentChannelNr) {
560 Channels->SwitchTo(CurrentChannel->
Number());
578 if (
cChannel *Channel = MenuEditChannel->Channel()) {
624 text = Text ? strdup(Text) : NULL;
669 virtual void Set(
void);
704 :
cOsdMenu(Folder ?
tr(
"Edit folder") :
tr(
"New folder"), 12)
733 if (strcmp(Folder->Text(),
name) == 0) {
738 char *p = strpbrk(
name,
"\\{}#~");
813 #define FOLDERDELIMCHARSUBST 0x01 821 for (Folder = List->
First(); Folder; Folder = List->
Next(Folder)) {
822 if (strcmp(Path, Folder->
Text()) == 0)
834 for (
const cRecording *Recording = Recordings->
First(); Recording; Recording = Recordings->
Next(Recording)) {
835 cString Folder = Recording->Folder();
837 if (Dirs.
Find(Folder) < 0)
838 Dirs.
Append(strdup(Folder));
841 for (
int i = 0; i < Dirs.
Size(); i++) {
842 if (
char *s = Dirs[i])
854 RecordingsStateKey.
Remove();
867 Add(FolderItem, CurrentFolder ? strcmp(Folder->Text(), CurrentFolder) == 0 :
false);
879 if (strncmp(Folder->Folder()->Text(), Path, p - Path) == 0) {
943 Set(mef->GetFolder());
1061 cString Folder = mf->GetFolder();
1070 memmove(
data.
file, p, strlen(p) + 1);
1173 virtual int Compare(
const cListObject &ListObject)
const;
1174 virtual void Set(
void);
1202 localtime_r(&Day, &tm_r);
1204 strftime(buffer,
sizeof(buffer),
"%Y%m%d", &tm_r);
1216 *name && **name ?
" " :
"",
1229 DisplayMenu->
SetItem(Text(), Index, Current, Selectable);
1271 for (
const cTimer *Timer = Timers->First(); Timer; Timer = Timers->
Next(Timer)) {
1274 if (CurrentTimer && Timer->
Id() == CurrentTimer->
Id() && (!Timer->Remote() && !CurrentTimer->
Remote() || Timer->Remote() && CurrentTimer->
Remote() && strcmp(Timer->Remote(), CurrentTimer->
Remote()) == 0))
1293 int NewHelpKeys = 0;
1330 StateKey.
Remove(Timer != NULL);
1357 bool TimerRecording = Timer->
Recording();
1390 if (Timer && Timer->
Event())
1416 Add(CurrentItem,
true);
1440 SetHelp(TimerMatch ==
tmFull ?
tr(
"Button$Timer") :
tr(
"Button$Record"), NULL, NULL, CanSwitch ?
tr(
"Button$Switch") : NULL);
1502 virtual int Compare(
const cListObject &ListObject)
const;
1503 bool Update(
const cTimers *Timers,
bool Force =
false);
1513 withDate = WithDate;
1515 timerActive =
false;
1516 Update(Timers,
true);
1523 if (sortMode != ssmAllThis)
1525 if (sortMode == ssmAllThis || r == 0)
1543 bool OldTimerActive = timerActive;
1546 if (Force || timerMatch != OldTimerMatch || timerActive != OldTimerActive) {
1551 const char *csn = channel ? channel->ShortName(
true) : NULL;
1552 cString eds =
event->GetDateString();
1553 if (channel && withDate)
1554 buffer =
cString::sprintf(
"%d\t%.*s\t%.*s\t%s\t%s%s%s\t%s", channel->Number(),
Utf8SymChars(csn, 999), csn,
Utf8SymChars(eds, 6), *eds, *
event->GetTimeString(), t, v, r,
event->Title());
1556 buffer =
cString::sprintf(
"%d\t%.*s\t%s\t%s%s%s\t%s", channel->Number(),
Utf8SymChars(csn, 999), csn, *
event->GetTimeString(), t, v, r,
event->Title());
1567 if (!DisplayMenu->
SetItemEvent(
event, Index, Current, Selectable, channel, withDate, timerMatch, timerActive))
1568 DisplayMenu->
SetItem(Text(), Index, Current, Selectable);
1584 void SetHelpKeys(
const cChannels *Channels);
1589 static const cEvent *ScheduleEvent(
void);
1603 for (
const cChannel *Channel = Channels->
First(); Channel; Channel = Channels->
Next(Channel)) {
1604 if (!Channel->GroupSep()) {
1606 if (
const cEvent *Event = Now ? Schedule->GetPresentEvent() : Schedule->GetFollowingEvent())
1618 bool result =
false;
1633 int NewHelpKeys = 0;
1636 NewHelpKeys |= 0x02;
1638 NewHelpKeys |= 0x01;
1640 NewHelpKeys |= 0x04;
1642 NewHelpKeys |= 0x08;
1645 NewHelpKeys |= 0x10;
1651 const char *Red[] = { NULL,
tr(
"Button$Record"),
tr(
"Button$Timer") };
1652 SetHelp(Red[NewHelpKeys & 0x03],
now ?
tr(
"Button$Next") :
tr(
"Button$Now"),
tr(
"Button$Schedule"),
canSwitch ?
tr(
"Button$Switch") : NULL);
1687 Timers->SetExplicitModify();
1688 if (item->timerMatch ==
tmFull) {
1689 if (
cTimer *Timer = Timers->GetMatch(item->event))
1695 if (
cTimer *t = Timers->GetTimer(Timer)) {
1703 Timers->SetModified();
1708 else if (Timer->
Remote())
1773 if (HadSubMenu &&
Update()) {
1823 Set(Timers, Channels, NULL,
true);
1839 const cEvent *Event = NULL;
1842 Event = CurrentItem->
event;
1848 bool Refresh =
false;
1874 const cEvent *PresentEvent = Event ? Event : Schedule->GetPresentEvent();
1876 for (
const cEvent *ev = Schedule->Events()->First(); ev; ev = Schedule->Events()->
Next(ev)) {
1877 if (ev->EndTime() > now || ev == PresentEvent)
1895 for (
const cEvent *ev = Schedule->Events()->First(); ev; ev = Schedule->Events()->
Next(ev)) {
1896 if ((ev->EndTime() > now || ev == Event) && !strcmp(ev->Title(), Event->
Title()))
1913 for (
const cChannel *ch = Channels->First(); ch; ch = Channels->
Next(ch)) {
1916 for (
const cEvent *ev = Schedule->Events()->First(); ev; ev = Schedule->Events()->
Next(ev)) {
1917 if ((ev->EndTime() > now || ev == Event) && !strcmp(ev->Title(), Event->
Title()))
1933 for (
const cChannel *ch = Channels->First(); ch; ch = Channels->
Next(ch)) {
1936 for (
const cEvent *ev = Schedule->Events()->First(); ev; ev = Schedule->Events()->
Next(ev)) {
1937 if (ev->EndTime() > now || ev == Event)
1947 bool result =
false;
1962 int NewHelpKeys = 0;
1965 NewHelpKeys |= 0x02;
1967 NewHelpKeys |= 0x01;
1971 NewHelpKeys |= 0x10;
1977 const char *Red[] = { NULL,
tr(
"Button$Record"),
tr(
"Button$Timer") };
1978 SetHelp(Red[NewHelpKeys & 0x03],
tr(
"Button$Now"),
tr(
"Button$Next"),
canSwitch ?
tr(
"Button$Switch") : NULL);
1988 Set(Timers, Channels, NULL,
true);
1998 Timers->SetExplicitModify();
1999 if (item->timerMatch ==
tmFull) {
2000 if (
cTimer *Timer = Timers->GetMatch(item->event))
2006 if (
cTimer *t = Timers->GetTimer(Timer)) {
2014 Timers->SetModified();
2019 else if (Timer->
Remote())
2038 if (Channel = Channels->GetByChannelID(item->
event->
ChannelID(),
true)) {
2039 if (!Channels->SwitchTo(Channel->
Number()))
2054 Set(Timers, Channels);
2072 ChannelNr = Channel->Number();
2097 Set(Timers, Channels, Channel,
true);
2116 if (
const cChannel *Channel = Channels->GetByChannelID(ei->ChannelID(),
true)) {
2118 Set(Timers, Channels, Channel,
true);
2121 else if (HadSubMenu &&
Update()) {
2142 const char *s = Command->Text();
2143 if (Command->SubItems())
2157 const char *p = strchr(s,
':');
2164 if (l > 1 && t[l - 1] ==
'?') {
2192 const char *cmd = *cmdbuf ? *cmdbuf : *
command;
2193 dsyslog(
"executing command '%s'", cmd);
2195 if (p.
Open(cmd,
"r")) {
2198 while ((c = fgetc(p)) != EOF) {
2200 if (
char *NewBuffer = (
char *)realloc(
result, l + 21))
2203 esyslog(
"ERROR: out of memory");
2214 esyslog(
"ERROR: can't open pipe for command '%s'", cmd);
2254 void GenerateTitle(
const char *s = NULL);
2255 void QueryCam(
void);
2256 void AddMultiLineItem(
const char *s);
2355 const char *p = strchr(s,
'\n');
2356 int l = p ? p - s : strlen(s);
2359 item->
SetText(strndup(s, l),
false);
2404 else if (state ==
osBack) {
2431 if (CamSlot->HasUserIO())
2444 #define osUserRecRenamed osUser1 2445 #define osUserRecMoved osUser2 2446 #define osUserRecRemoved osUser3 2447 #define osUserRecEmpty osUser4 2453 char folder[PATH_MAX];
2454 char name[NAME_MAX];
2522 if (strcmp(NewPath,
path)) {
2523 int NumRecordings = 0;
2526 NumRecordings = Recordings->GetNumRecordingsInPath(
path);
2528 if (NumRecordings > 1 && !
Interface->
Confirm(cString::sprintf(
tr(
"Move entire folder containing %d recordings?"), NumRecordings)))
2533 Recordings->SetExplicitModify();
2534 Error = !Recordings->MoveRecordings(
path, NewPath);
2536 Recordings->SetModified();
2560 else if (Key ==
kOk)
2588 void SetHelpKeys(
void);
2589 bool RefreshRecording(
void);
2638 Add(
new cOsdItem(
tr(
"This recording is currently in use - no changes are possible!"),
osUnknown,
false));
2735 if (
const cRecording *Recording = Control->GetRecording()) {
2737 Control->ClearEditingMarks();
2757 bool Modified =
false;
2760 StateKey.
Remove(Modified);
2773 if (strcmp(NewName, Recording->
Name())) {
2775 StateKey.
Remove(Modified);
2783 if (strcmp(Recording->
Folder(), OldFolder))
2786 StateKey.
Remove(Modified);
2789 StateKey.
Remove(Modified);
2838 SetHelp(
tr(
"Button$Play"),
tr(
"Button$Rewind"), NULL,
tr(
"Button$Edit"));
2921 void IncrementCounter(
bool New);
2922 const char *
Name(
void)
const {
return name; }
2935 totalEntries = newEntries = 0;
2936 SetText(Recording->
Title(
'\t',
true, Level));
2937 if (*Text() ==
'\t')
2938 name = strdup(Text() + 2);
2940 int Usage = Recording->
IsInUse();
2942 SetSelectable(
false);
2962 DisplayMenu->
SetItem(Text(), Index, Current, Selectable);
2971 :
cOsdMenu(Base ? Base :
tr(
"Recordings"), 9, 6, 6)
2974 base = Base ? strdup(Base) : NULL;
2995 if (!ri->IsDirectory())
3004 int NewHelpKeys = 0;
3012 switch (NewHelpKeys) {
3014 case 1:
SetHelp(
tr(
"Button$Open"), NULL, NULL,
tr(
"Button$Edit"));
break;
3027 const char *CurrentRecording = NULL;
3029 CurrentRecording = ri->Recording()->FileName();
3030 if (!CurrentRecording)
3038 for (
const cRecording *Recording = Recordings->
First(); Recording; Recording = Recordings->
Next(Recording)) {
3045 if (p->Name() && strcmp(p->Name(), Item->
Name()) == 0) {
3051 if (*Item->
Text() && !LastDir) {
3059 if (LastItem || LastDir) {
3061 if (strcmp(
path, Recording->Folder()) == 0)
3062 CurrentItem = LastDir ? LastDir : LastItem;
3064 else if (CurrentRecording && strcmp(CurrentRecording, Recording->FileName()) == 0)
3065 CurrentItem = LastDir ? LastDir : LastItem;
3106 const char *t = ri->
Name();
3152 if (
cTimer *Timer = rc->Timer()) {
3155 if (Timer->IsSingleEvent()) {
3157 isyslog(
"deleted timer %s", *Timer->ToDescr());
3169 char *RemoteBuf = NULL;
3171 if (2 == sscanf(TimerId,
"%d@%m[^ \n]", &Id, &RemoteBuf)) {
3176 if (
cTimer *Timer = Timers->GetById(Id, Remote)) {
3177 cTimer OldTimer = *Timer;
3180 if (Timer->IsSingleEvent()) {
3211 FileName = Recording->FileName();
3224 if (!Recording || Recording->
Delete()) {
3250 if (ri->IsDirectory())
3328 ri->SetRecording(riSub->Recording());
3356 virtual void Store(
void);
3377 const char *useSmallFontTexts[3];
3378 const char *recSortModeTexts[2];
3379 const char *recSortDirTexts[2];
3380 const char *keyColorTexts[4];
3391 virtual void Set(
void);
3404 skinDescriptions =
new const char*[numSkins];
3421 delete[] skinDescriptions;
3428 skinDescriptions[Skin->Index()] = Skin->Description();
3429 useSmallFontTexts[0] =
tr(
"never");
3430 useSmallFontTexts[1] =
tr(
"skin dependent");
3431 useSmallFontTexts[2] =
tr(
"always");
3432 recSortModeTexts[0] =
tr(
"by name");
3433 recSortModeTexts[1] =
tr(
"by time");
3434 recSortDirTexts[0] =
tr(
"ascending");
3435 recSortDirTexts[1] =
tr(
"descending");
3436 keyColorTexts[0] =
tr(
"Key$Red");
3437 keyColorTexts[1] =
tr(
"Key$Green");
3438 keyColorTexts[2] =
tr(
"Key$Yellow");
3439 keyColorTexts[3] =
tr(
"Key$Blue");
3441 SetSection(
tr(
"OSD"));
3444 if (themes.NumThemes())
3445 Add(
new cMenuEditStraItem(
tr(
"Setup.OSD$Theme"), &themeIndex, themes.NumThemes(), themes.Descriptions()));
3454 Add(
new cMenuEditStraItem(
tr(
"Setup.OSD$Default font"), &fontOsdIndex, fontOsdNames.Size(), &fontOsdNames[0]));
3455 Add(
new cMenuEditStraItem(
tr(
"Setup.OSD$Small font"), &fontSmlIndex, fontSmlNames.Size(), &fontSmlNames[0]));
3456 Add(
new cMenuEditStraItem(
tr(
"Setup.OSD$Fixed font"), &fontFixIndex, fontFixNames.Size(), &fontFixNames[0]));
3457 Add(
new cMenuEditPrcItem(
tr(
"Setup.OSD$Default font size (%)"), &data.FontOsdSizeP, 0.01, 0.1, 1));
3470 Add(
new cMenuEditStraItem(
tr(
"Setup.OSD$Default sort mode for recordings"), &data.DefaultSortModeRec, 2, recSortModeTexts));
3471 Add(
new cMenuEditStraItem(
tr(
"Setup.OSD$Sorting direction for recordings"), &data.RecSortingDirection, 2, recSortDirTexts));
3483 bool ModifiedAppearance =
false;
3487 if (skinIndex != originalSkinIndex) {
3492 ModifiedAppearance =
true;
3497 Utf8Strn0Cpy(data.OSDTheme, themes.Name(themeIndex),
sizeof(data.OSDTheme));
3498 ModifiedAppearance |= themeIndex != originalThemeIndex;
3501 ModifiedAppearance =
true;
3503 ModifiedAppearance =
true;
3504 Utf8Strn0Cpy(data.FontOsd, fontOsdNames[fontOsdIndex],
sizeof(data.FontOsd));
3505 Utf8Strn0Cpy(data.FontSml, fontSmlNames[fontSmlIndex],
sizeof(data.FontSml));
3506 Utf8Strn0Cpy(data.FontFix, fontFixNames[fontFixIndex],
sizeof(data.FontFix));
3508 ModifiedAppearance =
true;
3510 ModifiedAppearance =
true;
3512 ModifiedAppearance =
true;
3515 Recordings->ClearSortNames();
3519 int oldSkinIndex = skinIndex;
3520 int oldOsdLanguageIndex = osdLanguageIndex;
3523 if (ModifiedAppearance)
3526 if (osdLanguageIndex != oldOsdLanguageIndex || skinIndex != oldSkinIndex) {
3533 char *d = themes.NumThemes() ? strdup(themes.Descriptions()[themeIndex]) : NULL;
3534 themes.Load(Skin->
Name());
3535 if (skinIndex != oldSkinIndex)
3536 themeIndex = d ? themes.GetThemeIndex(d) : 0;
3561 for (numLanguages = 0; numLanguages <
I18nLanguages()->
Size() && data.EPGLanguages[numLanguages] >= 0; numLanguages++)
3563 originalNumLanguages = numLanguages;
3564 SetSection(
tr(
"EPG"));
3579 if (data.SetSystemTime)
3580 Add(
new cMenuEditTranItem(
tr(
"Setup.EPG$Use time from transponder"), &data.TimeTransponder, &data.TimeSource));
3583 for (
int i = 0; i < numLanguages; i++)
3594 bool Modified = numLanguages != originalNumLanguages;
3596 for (
int i = 0; i < numLanguages; i++) {
3607 int oldnumLanguages = numLanguages;
3608 int oldSetSystemTime = data.SetSystemTime;
3612 if (numLanguages != oldnumLanguages || data.SetSystemTime != oldSetSystemTime) {
3613 for (
int i = oldnumLanguages; i < numLanguages; i++) {
3614 data.EPGLanguages[i] = 0;
3617 for (k = 0; k < oldnumLanguages; k++) {
3618 if (data.EPGLanguages[k] == l)
3621 if (k >= oldnumLanguages) {
3622 data.EPGLanguages[i] = l;
3627 data.EPGLanguages[numLanguages] = -1;
3647 const char *videoDisplayFormatTexts[3];
3648 const char *updateChannelsTexts[6];
3649 const char *standardComplianceTexts[3];
3658 for (numAudioLanguages = 0; numAudioLanguages <
I18nLanguages()->
Size() && data.AudioLanguages[numAudioLanguages] >= 0; numAudioLanguages++)
3660 for (numSubtitleLanguages = 0; numSubtitleLanguages <
I18nLanguages()->
Size() && data.SubtitleLanguages[numSubtitleLanguages] >= 0; numSubtitleLanguages++)
3662 originalNumAudioLanguages = numAudioLanguages;
3663 originalNumSubtitleLanguages = numSubtitleLanguages;
3664 videoDisplayFormatTexts[0] =
tr(
"pan&scan");
3665 videoDisplayFormatTexts[1] =
tr(
"letterbox");
3666 videoDisplayFormatTexts[2] =
tr(
"center cut out");
3667 updateChannelsTexts[0] =
tr(
"no");
3668 updateChannelsTexts[1] =
tr(
"names only");
3669 updateChannelsTexts[2] =
tr(
"PIDs only");
3670 updateChannelsTexts[3] =
tr(
"names and PIDs");
3671 updateChannelsTexts[4] =
tr(
"add new channels");
3672 updateChannelsTexts[5] =
tr(
"add new transponders");
3673 standardComplianceTexts[0] =
"DVB";
3674 standardComplianceTexts[1] =
"ANSI/SCTE";
3675 standardComplianceTexts[2] =
"NORDIG";
3677 SetSection(
tr(
"DVB"));
3678 SetHelp(NULL,
tr(
"Button$Audio"),
tr(
"Button$Subtitles"), NULL);
3689 Add(
new cMenuEditStraItem(
tr(
"Setup.DVB$Standard compliance"), &data.StandardCompliance, 3, standardComplianceTexts));
3691 if (data.VideoFormat == 0)
3692 Add(
new cMenuEditStraItem(
tr(
"Setup.DVB$Video display format"), &data.VideoDisplayFormat, 3, videoDisplayFormatTexts));
3694 Add(
new cMenuEditStraItem(
tr(
"Setup.DVB$Update channels"), &data.UpdateChannels, 6, updateChannelsTexts));
3696 for (
int i = 0; i < numAudioLanguages; i++)
3699 if (data.DisplaySubtitles) {
3701 for (
int i = 0; i < numSubtitleLanguages; i++)
3704 Add(
new cMenuEditIntItem(
tr(
"Setup.DVB$Subtitle foreground transparency"), &data.SubtitleFgTransparency, 0, 9));
3705 Add(
new cMenuEditIntItem(
tr(
"Setup.DVB$Subtitle background transparency"), &data.SubtitleBgTransparency, 0, 10));
3716 bool newVideoFormat = data.VideoFormat;
3718 bool newDisplaySubtitles = data.DisplaySubtitles;
3719 int oldnumAudioLanguages = numAudioLanguages;
3720 int oldnumSubtitleLanguages = numSubtitleLanguages;
3732 bool DoSetup = data.VideoFormat != newVideoFormat;
3733 DoSetup |= data.DisplaySubtitles != newDisplaySubtitles;
3734 if (numAudioLanguages != oldnumAudioLanguages) {
3735 for (
int i = oldnumAudioLanguages; i < numAudioLanguages; i++) {
3736 data.AudioLanguages[i] = 0;
3739 for (k = 0; k < oldnumAudioLanguages; k++) {
3740 if (data.AudioLanguages[k] == l)
3743 if (k >= oldnumAudioLanguages) {
3744 data.AudioLanguages[i] = l;
3749 data.AudioLanguages[numAudioLanguages] = -1;
3752 if (numSubtitleLanguages != oldnumSubtitleLanguages) {
3753 for (
int i = oldnumSubtitleLanguages; i < numSubtitleLanguages; i++) {
3754 data.SubtitleLanguages[i] = 0;
3757 for (k = 0; k < oldnumSubtitleLanguages; k++) {
3758 if (data.SubtitleLanguages[k] == l)
3761 if (k >= oldnumSubtitleLanguages) {
3762 data.SubtitleLanguages[i] = l;
3767 data.SubtitleLanguages[numSubtitleLanguages] = -1;
3820 int NumSatDevices = 0;
3825 if (NumSatDevices > 1) {
3850 bool DeviceBondingsChanged =
false;
3860 else if (DeviceBondingsChanged)
3886 const char *Activating =
"";
3887 const char *CamName = camSlot->GetCamName();
3889 switch (camSlot->ModuleStatus()) {
3890 case msReset: CamName =
tr(
"CAM reset");
break;
3891 case msPresent: CamName =
tr(
"CAM present");
break;
3892 case msReady: CamName =
tr(
"CAM ready");
break;
3893 default: CamName =
"-";
break;
3896 else if (camSlot->IsActivating())
3898 Activating =
tr(
" (activating)");
3901 if (CamSlot == camSlot || CamSlot->MasterSlot() == camSlot)
3902 CamSlot->Devices(CardIndexes);
3904 if (CardIndexes.
Size() > 0) {
3907 for (
int i = 0; i < CardIndexes.
Size(); i++)
3908 AssignedDevice =
cString::sprintf(
"%s %d", *AssignedDevice, CardIndexes[i] + 1);
3912 if (strcmp(buffer, Text()) != 0) {
3926 void SetHelpKeys(
void);
3935 activationHelp = NULL;
3941 if (CamSlot->IsMasterSlot())
3952 const char *NewActivationHelp =
"";
3956 NewActivationHelp =
tr(
"Button$Cancel activation");
3958 NewActivationHelp =
tr(
"Button$Activate");
3960 if (NewActivationHelp != activationHelp) {
3961 activationHelp = NewActivationHelp;
3962 SetHelp(
tr(
"Button$Menu"),
tr(
"Button$Reset"), activationHelp);
3972 time_t t0 = time(NULL);
4006 if (Device->ProvidesChannel(Channel)) {
4008 if (CamSlot->
Assign(Device,
true)) {
4011 if (CamSlot->
Assign(Device)) {
4012 if (Device->SwitchChannel(Channel,
true)) {
4049 case kRed:
return Menu();
4050 case kGreen: state = Reset();
break;
4051 case kYellow: state = Activate();
break;
4069 const char *recordKeyHandlingTexts[3];
4070 const char *pauseKeyHandlingTexts[3];
4071 const char *delTimeshiftRecTexts[3];
4079 recordKeyHandlingTexts[0] =
tr(
"no instant recording");
4080 recordKeyHandlingTexts[1] =
tr(
"confirm instant recording");
4081 recordKeyHandlingTexts[2] =
tr(
"record instantly");
4082 pauseKeyHandlingTexts[0] =
tr(
"do not pause live video");
4083 pauseKeyHandlingTexts[1] =
tr(
"confirm pause live video");
4084 pauseKeyHandlingTexts[2] =
tr(
"pause live video");
4085 delTimeshiftRecTexts[0] =
tr(
"no");
4086 delTimeshiftRecTexts[1] =
tr(
"confirm");
4087 delTimeshiftRecTexts[2] =
tr(
"yes");
4112 virtual void Store(
void);
4142 Recordings->ResetResume();
4151 const char *svdrpPeeringModeTexts[3];
4152 const char *showChannelNamesWithSourceTexts[3];
4163 svdrpPeeringModeTexts[0] =
tr(
"off");
4164 svdrpPeeringModeTexts[1] =
tr(
"any hosts");
4165 svdrpPeeringModeTexts[2] =
tr(
"only default host");
4166 showChannelNamesWithSourceTexts[0] =
tr(
"off");
4167 showChannelNamesWithSourceTexts[1] =
tr(
"type");
4168 showChannelNamesWithSourceTexts[2] =
tr(
"full");
4184 svdrpServerNames.Sort(
true);
4185 svdrpServerNames.Insert(strdup(
""));
4207 bool ModifiedSVDRPSettings =
false;
4213 if (ModifiedSVDRPSettings) {
4217 Timers->SetExplicitModify();
4218 if (Timers->StoreRemoteTimers(NULL, NULL))
4219 Timers->SetModified();
4253 SetSection(
tr(
"Plugins"));
4255 for (
int i = 0; ; i++) {
4277 return AddSubMenu(menu);
4297 virtual void Set(
void);
4315 snprintf(buffer,
sizeof(buffer),
"%s - VDR %s",
tr(
"Setup"),
VDRVERSION);
4385 #define STOP_RECORDING trNOOP(" Stop recording ") 4451 for (
int i = 0; ; i++) {
4475 bool result =
false;
4478 if (Force || NewReplaying !=
replaying) {
4513 const char *s = NULL;
4593 default:
switch (Key) {
4595 case kRed:
if (!HadSubMenu)
4598 case kGreen:
if (!HadSubMenu) {
4603 case kYellow:
if (!HadSubMenu)
4606 case kBlue:
if (!HadSubMenu)
4638 if (
const cChannel *Channel = Channels->GetByNumber(LiveChannel)) {
4640 if (
const cSchedule *Schedule = Schedules->GetSchedule(Channel)) {
4641 const cEvent *Present = Schedule->GetPresentEvent();
4650 Components = Recording->Info()->Components();
4655 int indexSubtitle = 0;
4659 case 2:
if (p->
type == 0x05)
4692 channel = Channels->GetByNumber(Number);
4745 const cEvent *Present = Schedule->GetPresentEvent();
4746 const cEvent *Following = Schedule->GetFollowingEvent();
4772 Channel = Direction > 0 ? Channels->
Next(Channel) : Channels->
Prev(Channel);
4774 Channel = Direction > 0 ? Channels->First() : Channels->Last();
4810 int n = channel ?
number * 10 : 0;
4813 while (ch && (ch = Channels->
Next(ch)) != NULL) {
4815 if (n <= ch->Number() && ch->
Number() < n + m) {
4847 group = Channel->Index();
4850 int SaveGroup =
group;
4912 channel = Channels->Get(Channels->GetNextNormal(
group));
4933 if ((Key & (k_Repeat |
k_Release)) == 0) {
4950 Channels->SwitchTo(NewChannel->
Number());
4955 bool PositionerMoving = Positioner && Positioner->
IsMoving();
4957 if (!PositionerMoving) {
4974 #define VOLUMETIMEOUT 1000 //ms 4975 #define MUTETIMEOUT 5000 //ms 5041 #define TRACKTIMEOUT 5000 //ms 5056 if (TrackId && TrackId->
id) {
5059 if (i == CurrentAudioTrack)
5108 int oldTrack =
track;
5125 static int ac[] = { 1, 0, 2 };
5152 if (
track != oldTrack) {
5177 if (TrackId && TrackId->
id) {
5180 if (i == CurrentSubtitleTrack)
5226 int oldTrack =
track;
5253 if (
track != oldTrack) {
5279 timer =
new cTimer(
true, Pause);
5283 timer->SetPending(
true);
5284 timer->SetRecording(
true);
5285 event = timer->Event();
5287 if (event || GetEvent())
5288 dsyslog(
"Title: '%s' Subtitle: '%s'", event->Title(),
event->ShortText());
5290 fileName = strdup(Recording.FileName());
5294 isyslog(
"already recording: '%s'", fileName);
5296 timer->SetPending(
false);
5297 timer->SetRecording(
false);
5306 SchedulesStateKey.
Remove();
5311 isyslog(
"record %s", fileName);
5313 Recording.WriteInfo();
5314 const cChannel *ch = timer->Channel();
5315 recorder =
new cRecorder(fileName, ch, timer->Priority());
5316 if (device->AttachReceiver(recorder)) {
5318 if (!Timer && !LastReplayed)
5320 SchedulesStateKey.
Remove();
5323 Recordings->AddByName(fileName);
5335 SchedulesStateKey.
Remove();
5344 #define INSTANT_REC_EPG_LOOKAHEAD 300 // seconds to look into the EPG data for an instant recording 5348 const cChannel *Channel = timer->Channel();
5353 if (
const cSchedule *Schedule = Schedules->GetSchedule(Channel)) {
5354 event = Schedule->GetEventAround(Time);
5357 dsyslog(
"got EPG info after %d seconds", seconds);
5363 dsyslog(
"waiting for EPG info...");
5366 dsyslog(
"no EPG info available");
5374 timer->SetRecording(
false);
5378 if (ExecuteUserCommand)
5385 if (!recorder || !recorder->IsAttached() || !timer || !timer->Matches(t)) {
5387 timer->SetPending(
false);
5400 static time_t LastNoDiskSpaceMessage = 0;
5409 isyslog(
"not enough disk space to start recording%s%s", Timer ?
" timer " :
"", Timer ? *Timer->
ToDescr() :
"");
5411 LastNoDiskSpaceMessage = time(NULL);
5415 LastNoDiskSpaceMessage = 0;
5420 if (
const cChannel *Channel = Channels->GetByNumber(ch)) {
5424 dsyslog(
"switching device %d to channel %d %s (%s)", device->
DeviceNumber() + 1, Channel->Number(), *Channel->GetChannelID().ToString(), Channel->Name());
5429 if (!Timer || Timer->
Matches()) {
5431 if (!RecordControls[i]) {
5432 RecordControls[i] =
new cRecordControl(device, Timers, Timer, Pause);
5433 return RecordControls[i]->Process(time(NULL));
5438 else if (!Timer || !Timer->
Pending()) {
5439 isyslog(
"no free DVB device to record channel %d (%s)!", ch, Channel->Name());
5444 esyslog(
"ERROR: channel %d not defined!", ch);
5451 return Start(Timers, NULL, Pause);
5459 if (RecordControls[i]) {
5460 const char *
id = RecordControls[i]->InstantId();
5461 if (
id && strcmp(
id, InstantId) == 0) {
5462 cTimer *Timer = RecordControls[i]->Timer();
5463 RecordControls[i]->
Stop();
5477 if (RecordControls[i]) {
5478 if (RecordControls[i]->Timer() == Timer) {
5505 if (RecordControls[i]) {
5506 if (!LastInstantId && RecordControls[i]->InstantId())
5507 return RecordControls[i]->InstantId();
5508 if (LastInstantId && LastInstantId == RecordControls[i]->InstantId())
5509 LastInstantId = NULL;
5519 if (RecordControls[i] && strcmp(RecordControls[i]->FileName(), FileName) == 0)
5520 return RecordControls[i];
5529 if (RecordControls[i] && RecordControls[i]->Timer() == Timer)
5530 return RecordControls[i];
5537 bool Result =
false;
5539 if (RecordControls[i]) {
5540 if (!RecordControls[i]->
Process(t)) {
5553 if (RecordControls[i]) {
5554 if (RecordControls[i]->Timer() && RecordControls[i]->Timer()->Channel() == Channel) {
5555 if (RecordControls[i]->Device()->ProvidesTransponder(Channel)) {
5556 isyslog(
"stopping recording due to modification of channel %d (%s)", Channel->
Number(), Channel->
Name());
5557 RecordControls[i]->Stop();
5570 if (RecordControls[i])
5585 int NewState = state;
5586 bool Result = State != NewState;
5595 initialValue = NULL;
5597 framesPerSecond = 0;
5603 initialValue = InitialValue;
5604 framesPerSecond = FramesPerSecond;
5613 currentValue = int(round(*initialValue * framesPerSecond));
5616 else if (Key != lastKey) {
5624 return max(currentValue, 1);
5674 Timers->SetExplicitModify();
5679 Timers->SetModified();
5687 Recordings->SetExplicitModify();
5689 if (Recording->Delete()) {
5692 Recordings->SetModified();
5732 if (!Recordings->GetByName(
fileName))
5785 bool NormalPlay = (Play && Speed == -1);
5828 Index = Current - Index;
5848 strcpy(buf,
tr(
"Jump: "));
5849 int len = strlen(buf);
5858 sprintf(buf + len,
"%c%c:%c%c", ch10, ch1, cm10, cm1);
5864 #define STAY_SECONDS_OFF_END 10 5937 if (
GetIndex(Current, Total,
true)) {
5948 Goto(Current,
true);
5969 Goto(m->Position());
5973 Goto(m->Position(),
true);
5980 Goto(Forward ? Total : 0,
true);
6017 else if (!MarkRequired)
6108 bool DoShowMode =
true;
int Find(const char *s) const
const cTimer * GetMatch(time_t t) const
cDisplaySubtitleTracks(void)
bool Lock(cStateKey &StateKey, bool Write=false, int TimeoutMs=0) const
Tries to get a lock on this list and returns true if successful.
void ShowTimed(int Seconds=0)
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 - 1).
virtual void SetTrack(int Index, const char *const *Tracks)=0
< This class implements the track display.
static const cChannels * GetChannelsRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of channels for read access.
cOsdItem * stopReplayItem
eOSState ProcessKey(eKeys Key)
cList< cNestedItem > * commands
cCamSlot * MtdSpawn(void)
If this CAM slot can do MTD ("Multi Transponder Decryption"), a call to this function returns a cMtdC...
const int * Dpids(void) const
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 I18nCurrentLanguage(void)
Returns the index of the current language.
virtual void StartActivation(void)
Puts the CAM in this slot into a mode where an inserted smart card can be activated.
static const cSchedules * GetSchedulesRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of schedules for read access.
const cMark * GetNext(int Position) const
void DisplayChannel(void)
virtual void GetData(cChannel *Channel)=0
Copies all source specific parameters to the given Channel.
const cRecordingInfo * Info(void) const
virtual const cRecording * GetRecording(void)
Returns the cRecording that is currently being replayed, or NULL if this player is not playing a cRec...
bool GetSVDRPServerNames(cStringList *ServerNames)
Gets a list of all available VDRs this VDR is connected to via SVDRP, and stores it in the given Serv...
void SetRecordingTimerId(const char *Directory, const char *TimerId)
cOsdItem * stopRecordingItem
void Add(cListObject *Object, cListObject *After=NULL)
int GetNumSequences(void) const
Returns the actual number of sequences to be cut from the recording.
static cString ToText(const cChannel *Channel)
virtual void SetVolume(int Current, int Total, bool Mute)=0
< This class implements the volume/mute display.
static void Shutdown(void)
int Ca(int Index=0) const
static void InvokeCommand(const char *State, const char *RecordingFileName, const char *SourceFileName=NULL)
double FramesPerSecond(void) const
virtual const char * Version(void)=0
eRecordingsSortMode RecordingsSortMode
char language[MAXLANGCODE2]
bool HasUniqueChannelID(const cChannel *NewChannel, const cChannel *OldChannel=NULL) const
const char * Title(char Delimiter= ' ', bool NewIndicator=false, int Level=-1) const
#define RUC_BEFORERECORDING
#define TIMERMACRO_EPISODE
static cString sprintf(const char *fmt,...) __attribute__((format(printf
virtual void Append(T Data)
const char * DefaultFontSml
int QueueMessage(eMessageType Type, const char *s, int Seconds=0, int Timeout=0)
Like Message(), but this function may be called from a background thread.
virtual cOsdObject * MainMenuAction(void)
static cDisplayVolume * Create(void)
cMenuMain(eOSState State=osUnknown, bool OpenSubMenus=false)
char SVDRPDefaultHost[HOST_NAME_MAX]
cString PrintFirstDay(void) const
const cEvent * Event(void) const
void Remove(bool IncState=true)
Removes this key from the lock it was previously used with.
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)...
bool ChangePriorityLifetime(int NewPriority, int NewLifetime)
Changes the priority and lifetime of this recording to the given values.
bool Parse(const char *s)
static const cRecordings * GetRecordingsRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of recordings for read access.
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.
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.
const cRecording * GetByName(const char *FileName) const
virtual bool CanActivate(void)
Returns true if there is a CAM in this slot that can be put into activation mode. ...
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.
void SetExplicitModify(void)
If you have obtained a write lock on this list, and you don't want it to be automatically marked as m...
int EPGLanguages[I18N_MAX_LANGUAGES+1]
bool GroupSep(void) const
virtual eOSState ProcessKey(eKeys Key)
eTrackType types[ttMaxTrackTypes]
tComponent * Component(int Index) const
void SetSubItems(bool On)
bool SetEventFromSchedule(const cSchedules *Schedules)
cSkinDisplayReplay * displayReplay
eOSState ProcessKey(eKeys Key)
static void Process(eKeys Key)
bool HasMarks(void) const
Returns true if this recording has any editing marks.
void ReNumber(void)
Recalculate 'number' based on channel type.
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
const cPositioner * positioner
static cRecordings * GetRecordingsWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of recordings for write access.
void Exit(int ExitCode)
Set VDR exit code and initiate end of VDR main loop.
int weekdays
bitmask, lowest bits: SSFTWTM (the 'M' is the LSB)
virtual void ClearEditingMarks(void)
Clears any editing marks this player might be showing.
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)
static bool OsdSizeChanged(int &State)
Checks if the OSD size has changed and a currently displayed OSD needs to be redrawn.
#define LOCK_CHANNELS_WRITE
virtual bool Filter(const cRecording *Recording) const =0
Returns true if the given Recording shall be displayed in the Recordings menu.
virtual void SetJump(const char *Jump)=0
Sets the prompt that allows the user to enter a jump point.
static int MaxNumber(void)
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.
void Reset(void)
Resets the state of this key, so that the next call to a lock's Lock() function with this key will re...
void SetSyncStateKey(cStateKey &StateKey)
When making changes to this list (while holding a write lock) that shall not affect some other code t...
const cChannel * NextAvailableChannel(const cChannel *Channel, int Direction)
void StopSVDRPHandler(void)
virtual void SetRecording(const cRecording *Recording)
Sets the recording that is currently being played.
cNestedItemList RecordingCommands
static cTimers * GetTimersWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of timers for write access.
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.
static void SetRecording(const char *FileName)
static int CurrentVolume(void)
bool ChangeName(const char *NewName)
Changes the name of this recording to the given value.
A steerable satellite dish generally points to the south on the northern hemisphere, and to the north on the southern hemisphere (unless you're located directly on the equator, in which case the general direction is "up").
void EnsureSubtitleTrack(void)
Makes sure one of the preferred language subtitle tracks is selected.
static const char * Name(void)
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
static cChannels * GetChannelsWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of channels for write access.
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
static int CurrentChannel(void)
Returns the number of the current channel on the primary device.
const char * Name(void) const
const char * I18nLocale(int Language)
Returns the locale code of the given Language (which is an index as returned by I18nCurrentLanguage()...
void Del(cChannel *Channel)
Delete the given Channel from the list.
#define ICON_TIMER_INACT_UTF8
static cPlugin * CallFirstService(const char *Id, void *Data=NULL)
static cDisplayTracks * currentDisplayTracks
void MarkMove(int Frames, bool MarkRequired)
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...
virtual void Insert(T Data, int Before=0)
void SetRemote(const char *Remote)
int AdaptiveSkipAlternate
int GetPrevNormal(int Idx) const
Get previous normal channel (not group)
const int * Caids(void) const
const cChannel * GetByChannelID(tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false) const
virtual ~cDisplayVolume()
void SetMarks(const cMarks *Marks)
cStateKey StateKeySVDRPRemoteTimersPoll
Controls whether a change to the local list of timers needs to result in sending a POLL to the remote...
void StartSVDRPHandler(void)
virtual bool HasUserIO(void)
Returns true if there is a pending user interaction, which shall be retrieved via GetMenu() or GetEnq...
cListObject * Next(void) const
bool ExecSVDRPCommand(const char *ServerName, const char *Command, cStringList *Response)
Sends the given SVDRP Command string to the remote VDR identified by ServerName and collects all of t...
virtual cOsdObject * GetInfo(void)
Returns an OSD object that displays information about the currently played programme.
virtual cCiMenu * GetMenu(void)
Gets a pending menu, or NULL if there is no menu.
cSkinDisplayTracks * displayTracks
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.
#define LOCK_CHANNELS_READ
char FontOsd[MAXFONTNAME]
const char * Description(void)
Returns a user visible, single line description of this theme.
bool TimedOut(void) const
#define LOCK_RECORDINGS_WRITE
int GetNextNormal(int Idx) const
Get next normal channel (not group)
virtual bool IsMoving(void) const
Returns true if the dish is currently moving as a result of a call to GotoPosition() or GotoAngle()...
tChannelID ChannelID(void) const
static cString EditedFileName(const char *FileName)
Returns the full path name of the edited version of the recording with the given FileName.
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 SetText(const char *Text, bool Copy=true)
cSkinDisplayVolume * displayVolume
void SetSelectable(bool Selectable)
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.
cSourceParams SourceParams
static const cCursesFont Font
bool Open(const char *Command, const char *Mode)
#define LOCK_TIMERS_WRITE
#define IS_AUDIO_TRACK(t)
static bool Process(cTimers *Timers, time_t t)
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)
const char * Remote(void) const
bool Put(uint64_t Code, bool Repeat=false, bool Release=false)
const T * Next(const T *Object) const
< Returns the element immediately before Object in this list, or NULL if Object is the first element ...
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()
#define ICON_CLOCK_UH_UTF8
static void Stop(const char *InstantId)
void Sort(__compar_fn_t Compare)
const char * Provider(void) const
static cDisplaySubtitleTracks * Create(void)
cRecordingsHandler RecordingsHandler
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...
#define RUC_AFTERRECORDING
static void TouchUpdate(void)
Touches the '.update' file in the video directory, so that other instances of VDR that access the sam...
cString & CompactChars(char c)
Compact any sequence of characters 'c' to a single character, and strip all of them from the beginnin...
bool SwitchTo(int Number) const
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 ShowProgress(bool Initial)
const char * Title(void) const
virtual bool Reset(void)
Resets the CAM in this slot.
static cDisplaySubtitleTracks * currentDisplayTracks
cString BaseName(void) const
Returns the base name of this recording (without the video directory and folder). ...
int GetUsage(const char *FileName)
Returns the usage type for the given FileName.
double FramesPerSecond(void) const
eOSState ProcessKey(eKeys Key)
bool GetReplayMode(bool &Play, bool &Forward, int &Speed)
static const char * GetInstantId(const char *LastInstantId)
const char * DefaultFontFix
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
static cRecordControl * RecordControls[]
const cMark * Get(int Position) const
cString GetRecordingTimerId(const char *Directory)
const int * Apids(void) const
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)
cString ToDescr(void) const
char SVDRPHostName[HOST_NAME_MAX]
virtual cCiEnquiry * GetEnquiry(void)
Gets a pending enquiry, or NULL if there is no enquiry.
static void ClearLastReplayed(const char *FileName)
static int VideoDiskSpace(int *FreeMB=NULL, int *UsedMB=NULL)
static void MsgOsdChannel(const char *Text)
static void MsgSetSubtitleTrack(int Index, const char *const *Tracks)
const T * Last(void) const
Returns the last element in this list, or NULL if the list is empty.
const cEvent * lastFollowing
cAdaptiveSkipper adaptiveSkipper
static bool DeleteMarksFile(const cRecording *Recording)
virtual eOSState ProcessKey(eKeys Key)
cListObject * Prev(void) const
virtual const char * MainMenuEntry(void)
void Del(cListObject *Object, bool DeleteObject=true)
static void Process(eKeys Key)
void DelAll(void)
Deletes/terminates all operations.
char FontFix[MAXFONTNAME]
int ShowChannelNamesWithSource
const cMark * GetPrev(int Position) const
static void Process(eKeys Key)
static void MsgOsdClear(void)
void EnsureAudioTrack(bool Force=false)
Makes sure an audio track is selected that is actually available.
static cOsdObject * pluginOsdObject
void Reply(const char *s)
static cDevice * PrimaryDevice(void)
Returns the primary device.
#define LOCK_RECORDINGS_READ
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".
bool Active(void)
Checks whether the thread is still alive.
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.
virtual bool HasMMI(void)
Returns 'true' if the CAM in this slot has an active MMI.
virtual ~cDisplayTracks()
cSourceParam * Get(char Source)
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.
virtual 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)
bool ConfirmRestart(bool Ask)
Check for background activity that blocks restart.
static cReplayControl * currentReplayControl
static void SetCurrentChannel(const cChannel *Channel)
const cChannel * GetByNumber(int Number, int SkipGap=0) const
void Add(int Position)
If this cMarks object is used by multiple threads, the caller must Lock() it before calling Add() and...
cString GetTimeString(void) const
void IncRecordingsSortMode(const char *Directory)
int NumComponents(void) const
const char * Description(void) const
const char * Name(void) const
Returns the full name of the recording (without the video directory).
virtual void CancelActivation(void)
Cancels a previously started activation (if any).
static void MsgMarksModified(const cMarks *Marks)
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]
const T * Prev(const T *Object) const
static cRecordControl * GetRecordControl(const char *FileName)
void DelByName(const char *FileName)
static cPlugin * GetPlugin(int Index)
virtual ~cDisplaySubtitleTracks()
const char * Description(void) const
void Sort(bool IgnoreCase=false)
int SecondsToFrames(int Seconds, double FramesPerSecond)
static cDevice * ActualDevice(void)
Returns the actual receiving device in case of Transfer Mode, or the primary device otherwise...
int Priority(void)
Returns the priority of the device this slot is currently assigned to, or IDLEPRIORITY if it is not a...
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
cString Folder(void) const
Returns the name of the folder this recording is stored in (without the video directory).
virtual void SetPositioner(const cPositioner *Positioner)
Sets the Positioner used to move the satellite dish.
char language[MAXLANGCODE2]
bool HandleRemoteTimerModifications(cTimer *NewTimer, cTimer *OldTimer, cString *Msg)
Performs any operations necessary to synchronize changes to a timer between peer VDR machines...
void I18nSetLanguage(int Language)
Sets the current language index to Language.
bool Load(const char *RecordingFileName, double FramesPerSecond=DEFAULTFRAMESPERSECOND, bool IsPesRecording=false)
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.
#define ICON_RUNNING_UTF8
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 Contains(const cListObject *Object) const
If a pointer to an object contained in this list has been obtained while holding a lock...
const cOsdItem * Get(int Index) const
Returns the list element at the given Index, or NULL if no such element exists.
virtual bool EnterMenu(void)
Requests the CAM in this slot to start its menu.
cString ToText(bool UseChannelID=false) const
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)
static bool Start(cTimers *Timers, cTimer *Timer, bool Pause=false)
const T * First(void) const
Returns the first element in this list, or NULL if the list is empty.
void Goto(int Index, bool Still=false)
int SkipFrames(int Frames)
#define IS_DOLBY_TRACK(t)
void Initialize(int *InitialValue, double FramesPerSecond)
char * ExchangeChars(char *s, bool ToFileSystem)
#define LOCK_SCHEDULES_READ
bool GetFrameNumber(int &Current, int &Total)
const char * ShortText(void) const
bool SetCurrentSubtitleTrack(eTrackType Type, bool Manual=false)
Sets the current subtitle track to the given Type.
const char * DefaultFontOsd
#define MAXVIDEOFILESIZETS
static bool PauseLiveVideo(void)
cSkin * Current(void)
Returns a pointer to the current skin.
virtual bool Assign(cDevice *Device, bool Query=false)
Assigns this CAM slot to the given Device, if this is possible.
const char * FileName(void) const
Returns the full path name to the recording directory, including the video directory and the actual '...
static void ForceCheck(void)
To avoid unnecessary load, the video disk usage is only actually checked every DISKSPACECHEK seconds...
static const cTimers * GetTimersRead(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of timers for read access.
virtual bool IsActivating(void)
Returns true if this CAM slot is currently activating a smart card.
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.
bool SetCurrent(const char *Name=NULL)
Sets the current skin to the one indicated by name.
void SetModified(void)
Unconditionally marks this list as modified.
static void Shutdown(void)
virtual cSkinDisplayChannel * DisplayChannel(bool WithInfo)=0
Creates and returns a new object for displaying the current channel.
static void ChannelDataModified(const cChannel *Channel)
void Del(const char *FileName)
Deletes the given FileName from the list of operations.
bool IsPesRecording(void) const
int IsInUse(void) const
Checks whether this recording is currently in use and therefore shall not be tampered with...
void SetModifiedByUser(void)
void RequestEmergencyExit(void)
Requests an emergency exit of the VDR main loop.
static cDisplayVolume * currentDisplayVolume
int SlotNumber(void)
Returns the number of this CAM slot within the whole system.
virtual const cPositioner * Positioner(void) const
Returns a pointer to the positioner (if any) this device has used to move the satellite dish to the r...
bool Add(int Usage, const char *FileNameSrc, const char *FileNameDst=NULL)
Adds the given FileNameSrc to the recordings handler for (later) processing.
static void MsgRecording(const cDevice *Device, const char *Name, const char *FileName, bool On)
#define ICON_TV_CRYPTED_UTF8
cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer=NULL, bool Pause=false)
static const char * NowReplaying(void)
char * descriptions[ttMaxTrackTypes+1]
uint64_t Elapsed(void) const
virtual void SetData(cChannel *Channel)=0
Sets all source specific parameters to those of the given Channel.
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
Sets the current channel to Channel.
cDevice * Device(void)
Returns the device this CAM slot is currently assigned to.
int SVDRPCode(const char *s)
Returns the value of the three digit reply code of the given SVDRP response string.