35 #define MAXWAIT4EPGINFO 3 // seconds 36 #define MODETIMEOUT 3 // seconds 37 #define NEWTIMERLIMIT 120 // seconds until the start time of a new timer created from the Schedule menu, 40 #define DEFERTIMER 60 // seconds by which a timer is deferred in case of problems 42 #define MAXRECORDCONTROLS (MAXDEVICES * MAXRECEIVERS) 43 #define MAXINSTANTRECTIME (24 * 60 - 1) // 23:59 hours 44 #define MAXWAITFORCAMMENU 10 // seconds to wait for the CAM menu to open 45 #define CAMMENURETYTIMEOUT 3 // seconds after which opening the CAM menu is retried 46 #define CAMRESPONSETIMEOUT 5 // seconds to wait for a response from a CAM 47 #define MINFREEDISK 300 // minimum free disk space (in MB) required to start recording 48 #define NODISKSPACEDELTA 300 // seconds between "Not enough disk space to start recording!" messages 49 #define MAXCHNAMWIDTH 16 // maximum number of characters of channels' short names shown in schedules menus 51 #define CHNUMWIDTH (numdigits(Channels.MaxNumber()) + 1) 52 #define CHNAMWIDTH (min(MAXCHNAMWIDTH, Channels.MaxShortChannelNameLength() + 1)) 58 virtual void Set(
void);
101 virtual void Set(
void);
288 virtual int Compare(
const cListObject &ListObject)
const;
289 virtual void Set(
void);
300 SetSelectable(
false);
308 if (sortMode == csmProvider)
310 if (sortMode == csmName || r == 0)
312 if (sortMode == csmNumber || r == 0)
320 const cEvent *Event = NULL;
328 if (sortMode == csmProvider)
330 Event ?
'(' :
' ', Event ? Event->
Title() :
"", Event ?
')' :
' ');
333 Event ?
'(' :
' ', Event ? Event->
Title() :
"", Event ?
')' :
' ');
343 DisplayMenu->
SetItem(Text(), Index, Current, Selectable);
348 #define CHANNELNUMBERTIMEOUT 1000 //ms 356 void Propagate(
void);
363 virtual void Move(
int From,
int To);
395 if (channel == currentChannel)
405 SetHelp(
tr(
"Button$Edit"),
tr(
"Button$New"),
tr(
"Button$Delete"),
tr(
"Button$Mark"));
437 if (!ci->Channel()->GroupSep() && ci->Channel()->Number() ==
number) {
482 int DeletedChannel = channel->
Number();
489 if (CurrentChannel && channel == CurrentChannel) {
494 CurrentChannelNr = 0;
500 isyslog(
"channel %d deleted", DeletedChannel);
501 if (CurrentChannel && CurrentChannel->
Number() != CurrentChannelNr) {
518 if (FromChannel && ToChannel) {
519 int FromNumber = FromChannel->
Number();
520 int ToNumber = ToChannel->
Number();
525 isyslog(
"channel %d moved to %d", FromNumber, ToNumber);
526 if (CurrentChannel && CurrentChannel->
Number() != CurrentChannelNr) {
586 text = Text ? strdup(Text) : NULL;
659 :
cOsdMenu(Folder ?
tr(
"Edit folder") :
tr(
"New folder"), 12)
692 if (strcmp(Folder->Text(),
name) == 0) {
697 char *p = strpbrk(
name,
"\\{}#~");
768 if (Folder->Folder()->SubItems())
778 #define FOLDERDELIMCHARSUBST 0x01 786 for (Folder = List->
First(); Folder; Folder = List->
Next(Folder)) {
787 if (strcmp(Path, Folder->
Text()) == 0)
801 cString Folder = Recording->Folder();
803 if (Dirs.
Find(Folder) < 0)
804 Dirs.
Append(strdup(Folder));
807 for (
int i = 0; i < Dirs.
Size(); i++) {
817 static int RecordingsState = -1;
830 Add(FolderItem, CurrentFolder ? strcmp(Folder->Text(), CurrentFolder) == 0 :
false);
842 if (strncmp(Folder->Folder()->Text(), Path, p - Path) == 0) {
904 Set(mef->GetFolder());
1005 cString Folder = mf->GetFolder();
1014 memmove(
data.
file, p, strlen(p) + 1);
1079 void SetDiskStatus(
char DiskStatus);
1080 virtual int Compare(
const cListObject &ListObject)
const;
1081 virtual void Set(
void);
1110 localtime_r(&Day, &tm_r);
1112 strftime(buffer,
sizeof(buffer),
"%Y%m%d", &tm_r);
1121 char diskStatusString[2] = { diskStatus, 0 };
1123 csc.
Convert(diskStatusString),
1127 *name && **name ?
" " :
"",
1139 DisplayMenu->
SetItem(Text(), Index, Current, Selectable);
1144 diskStatus = DiskStatus;
1158 virtual int Compare(
const cListObject &ListObject)
const;
1162 int duration(
void)
const;
1166 void SetDiskStatus(
char DiskStatus);
1172 int r = startTime() - entry->
startTime();
1174 r = entry->
priority() - priority();
1190 item->SetDiskStatus(DiskStatus);
1204 cTimer *CurrentTimer(
void);
1206 void ActualiseDiskStatus(
void);
1221 timer->SetEventFromSchedule();
1239 return item ? item->
Timer() : NULL;
1244 int NewHelpKeys = 0;
1316 #define CHECK_2PTR_NULL(x_,y_) ((x_)? ((y_)? y_:""):"") 1324 char *parameter = NULL;
1330 pEvent = ti->
Event();
1340 iRecNumber=rc->
Index() + 1;
1344 asprintf(¶meter,
"%d '%s' %d %d '%s' '%s' '%s' %d", ti->
Index(),
1352 isyslog(
"timercmd: %s", parameter);
1368 if (ti && ti->
Event())
1379 int freeMB, freeMinutes, runshortMinutes;
1381 freeMinutes = int(
double(freeMB) * 1.1 / 25.75);
1382 runshortMinutes = freeMinutes / 5;
1392 for (entry = entries.
First(); entry; entry = entries.
Next(entry))
1396 for (entry = entries.
First(); entry; entry = entries.
Next(entry))
1406 for (entry = entries.
First(); entry; entry = entries.
Next(entry)) {
1410 status = freeMinutes > runshortMinutes ?
'+' : freeMinutes > 0 ? 177 :
'-';
1413 #ifdef DEBUG_TIMER_INFO 1414 dsyslog(
"timer-info: %c | %d | %s | %s | %3d | %+5d -> %+5d",
1417 entry->
active() ?
"aktiv " :
"n.akt.",
1418 entry->
repTimer() ? entry->
isDummy() ?
" dummy " :
"mehrmalig" :
"einmalig ",
1443 state =
OnOff();
break;
1481 SetHelp(TimerMatch ==
tmFull ?
tr(
"Button$Timer") :
tr(
"Button$Record"), NULL, NULL, CanSwitch ?
tr(
"Button$Switch") : NULL);
1541 virtual int Compare(
const cListObject &ListObject)
const;
1542 bool Update(
bool Force =
false);
1552 withDate = WithDate;
1561 if (sortMode != ssmAllThis)
1563 if (sortMode == ssmAllThis || r == 0)
1572 bool result =
false;
1575 if (Force || timerMatch != OldTimerMatch) {
1578 char v =
event->Vps() && (
event->Vps() -
event->StartTime()) ?
'V' :
' ';
1579 char r =
event->SeenWithin(30) &&
event->IsRunning() ?
'*' :
' ';
1580 const char *csn = channel ? channel->ShortName(
true) : NULL;
1581 cString eds =
event->GetDateString();
1582 if (channel && withDate)
1583 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());
1585 buffer =
cString::sprintf(
"%d\t%.*s\t%s\t%c%c%c\t%s", channel->Number(),
Utf8SymChars(csn, 999), csn, *
event->GetTimeString(), t, v, r,
event->Title());
1596 if (!DisplayMenu->
SetItemEvent(
event, Index, Current, Selectable, channel, withDate, timerMatch))
1597 DisplayMenu->
SetItem(Text(), Index, Current, Selectable);
1613 void SetHelpKeys(
void);
1618 static const cEvent *ScheduleEvent(
void);
1635 if (!Channel->GroupSep()) {
1651 bool result =
false;
1665 int NewHelpKeys = 0;
1668 NewHelpKeys |= 0x02;
1670 NewHelpKeys |= 0x01;
1672 NewHelpKeys |= 0x04;
1674 NewHelpKeys |= 0x08;
1677 NewHelpKeys |= 0x10;
1683 const char *Red[] = { NULL,
tr(
"Button$Record"),
tr(
"Button$Timer") };
1684 SetHelp(Red[NewHelpKeys & 0x03],
now ?
tr(
"Button$Next") :
tr(
"Button$Now"),
tr(
"Button$Schedule"),
canSwitch ?
tr(
"Button$Switch") : NULL);
1771 if (HadSubMenu &&
Update())
1792 void PrepareScheduleAllThis(
const cEvent *Event,
const cChannel *Channel);
1793 void PrepareScheduleThisThis(
const cEvent *Event,
const cChannel *Channel);
1794 void PrepareScheduleThisAll(
const cEvent *Event,
const cChannel *Channel);
1795 void PrepareScheduleAllAll(
const cEvent *Event,
const cChannel *Channel);
1839 if (ev->EndTime() > now || ev == PresentEvent)
1856 if ((ev->EndTime() > now || ev == Event) && !strcmp(ev->Title(), Event->
Title()))
1874 if ((ev->EndTime() > now || ev == Event) && !strcmp(ev->Title(), Event->
Title()))
1893 if (ev->EndTime() > now || ev == Event)
1903 bool result =
false;
1917 int NewHelpKeys = 0;
1920 NewHelpKeys |= 0x02;
1922 NewHelpKeys |= 0x01;
1925 NewHelpKeys |= 0x10;
1931 const char *Red[] = { NULL,
tr(
"Button$Record"),
tr(
"Button$Timer") };
1932 SetHelp(Red[NewHelpKeys & 0x03],
tr(
"Button$Now"),
tr(
"Button$Next"),
canSwitch ?
tr(
"Button$Switch") : NULL);
1942 const cEvent *Event = NULL;
1944 Event = CurrentItem->
event;
2025 ChannelNr = channel->
Number();
2058 else if (HadSubMenu &&
Update())
2077 const char *s = Command->Text();
2078 if (Command->SubItems())
2092 const char *p = strchr(s,
':');
2099 if (l > 1 && t[l - 1] ==
'?') {
2127 const char *cmd = *cmdbuf ? *cmdbuf : *
command;
2128 dsyslog(
"executing command '%s'", cmd);
2130 if (p.
Open(cmd,
"r")) {
2133 while ((c = fgetc(p)) != EOF) {
2135 if (
char *NewBuffer = (
char *)realloc(
result, l + 21))
2138 esyslog(
"ERROR: out of memory");
2149 esyslog(
"ERROR: can't open pipe for command '%s'", cmd);
2189 void GenerateTitle(
const char *s = NULL);
2190 void QueryCam(
void);
2191 void AddMultiLineItem(
const char *s);
2288 const char *p = strchr(s,
'\n');
2289 int l = p ? p - s : strlen(s);
2292 item->
SetText(strndup(s, l),
false);
2337 else if (state ==
osBack) {
2364 if (CamSlot->HasUserIO())
2380 char folder[PATH_MAX];
2381 char name[NAME_MAX];
2445 if (strcmp(NewPath,
path)) {
2447 if (NumRecordings > 1 && !
Interface->
Confirm(cString::sprintf(
tr(
"Move entire folder containing %d recordings?"), NumRecordings)))
2470 else if (Key ==
kOk)
2500 void SetHelpKeys(
void);
2501 bool RefreshRecording(
void);
2553 Add(
new cOsdItem(
tr(
"This recording is currently in use - no changes are possible!"),
osUnknown,
false));
2577 buttonDelete = (ResumeFile.Read() != -1) ?
tr(
"Button$Delete resume") : NULL;
2633 if (access(*FileName, F_OK) != 0 ||
Interface->
Confirm(
tr(
"Edited version already exists - overwrite?"))) {
2687 bool Modified =
false;
2762 SetHelp(
tr(
"Button$Play"),
tr(
"Button$Rewind"), NULL,
tr(
"Button$Edit"));
2843 void IncrementCounter(
bool New);
2844 const char *
Name(
void) {
return name; }
2857 totalEntries = newEntries = 0;
2858 SetText(Recording->
Title(
'\t',
true, Level));
2859 if (*Text() ==
'\t')
2860 name = strdup(Text() + 2);
2879 DisplayMenu->
SetItem(Text(), Index, Current, Selectable);
2888 :
cOsdMenu(Base ? Base :
tr(
"Recordings"), 9, 6, 6)
2891 base = Base ? strdup(Base) : NULL;
2913 if (!ri->IsDirectory())
2922 int NewHelpKeys = 0;
2930 switch (NewHelpKeys) {
2932 case 1:
SetHelp(
tr(
"Button$Open"), NULL, NULL,
tr(
"Button$Edit"));
break;
2947 CurrentRecording = ri->Recording()->FileName();
2959 if (p->Name() && strcmp(p->Name(), Item->
Name()) == 0) {
2965 if (*Item->
Text() && !LastDir) {
2973 if (LastItem || LastDir) {
2975 if (strcmp(
path, recording->Folder()) == 0)
2978 else if (CurrentRecording && strcmp(CurrentRecording, recording->FileName()) == 0)
3015 const char *t = ri->
Name();
3093 if (!recording || recording->
Delete()) {
3116 if (ri->IsDirectory())
3187 ri->SetRecording(riSub->Recording());
3209 virtual void Store(
void);
3230 const char *useSmallFontTexts[3];
3231 const char *keyColorTexts[4];
3242 virtual void Set(
void);
3255 skinDescriptions =
new const char*[numSkins];
3272 delete[] skinDescriptions;
3279 skinDescriptions[Skin->Index()] = Skin->Description();
3280 useSmallFontTexts[0] =
tr(
"never");
3281 useSmallFontTexts[1] =
tr(
"skin dependent");
3282 useSmallFontTexts[2] =
tr(
"always");
3283 keyColorTexts[0] =
tr(
"Key$Red");
3284 keyColorTexts[1] =
tr(
"Key$Green");
3285 keyColorTexts[2] =
tr(
"Key$Yellow");
3286 keyColorTexts[3] =
tr(
"Key$Blue");
3288 SetSection(
tr(
"OSD"));
3291 if (themes.NumThemes())
3292 Add(
new cMenuEditStraItem(
tr(
"Setup.OSD$Theme"), &themeIndex, themes.NumThemes(), themes.Descriptions()));
3300 Add(
new cMenuEditStraItem(
tr(
"Setup.OSD$Default font"), &fontOsdIndex, fontOsdNames.Size(), &fontOsdNames[0]));
3301 Add(
new cMenuEditStraItem(
tr(
"Setup.OSD$Small font"), &fontSmlIndex, fontSmlNames.Size(), &fontSmlNames[0]));
3302 Add(
new cMenuEditStraItem(
tr(
"Setup.OSD$Fixed font"), &fontFixIndex, fontFixNames.Size(), &fontFixNames[0]));
3303 Add(
new cMenuEditPrcItem(
tr(
"Setup.OSD$Default font size (%)"), &data.FontOsdSizeP, 0.01, 0.1, 1));
3327 bool ModifiedAppearance =
false;
3331 if (skinIndex != originalSkinIndex) {
3336 ModifiedAppearance =
true;
3341 Utf8Strn0Cpy(data.OSDTheme, themes.Name(themeIndex),
sizeof(data.OSDTheme));
3342 ModifiedAppearance |= themeIndex != originalThemeIndex;
3345 ModifiedAppearance =
true;
3347 ModifiedAppearance =
true;
3348 Utf8Strn0Cpy(data.FontOsd, fontOsdNames[fontOsdIndex],
sizeof(data.FontOsd));
3349 Utf8Strn0Cpy(data.FontSml, fontSmlNames[fontSmlIndex],
sizeof(data.FontSml));
3350 Utf8Strn0Cpy(data.FontFix, fontFixNames[fontFixIndex],
sizeof(data.FontFix));
3352 ModifiedAppearance =
true;
3354 ModifiedAppearance =
true;
3356 ModifiedAppearance =
true;
3361 int oldSkinIndex = skinIndex;
3362 int oldOsdLanguageIndex = osdLanguageIndex;
3365 if (ModifiedAppearance) {
3370 if (osdLanguageIndex != oldOsdLanguageIndex || skinIndex != oldSkinIndex) {
3377 char *d = themes.NumThemes() ? strdup(themes.Descriptions()[themeIndex]) : NULL;
3378 themes.Load(Skin->
Name());
3379 if (skinIndex != oldSkinIndex)
3380 themeIndex = d ? themes.GetThemeIndex(d) : 0;
3405 for (numLanguages = 0; numLanguages <
I18nLanguages()->
Size() && data.EPGLanguages[numLanguages] >= 0; numLanguages++)
3407 originalNumLanguages = numLanguages;
3408 SetSection(
tr(
"EPG"));
3423 if (data.SetSystemTime)
3424 Add(
new cMenuEditTranItem(
tr(
"Setup.EPG$Use time from transponder"), &data.TimeTransponder, &data.TimeSource));
3427 for (
int i = 0; i < numLanguages; i++)
3438 bool Modified = numLanguages != originalNumLanguages;
3440 for (
int i = 0; i < numLanguages; i++) {
3451 int oldnumLanguages = numLanguages;
3452 int oldSetSystemTime = data.SetSystemTime;
3456 if (numLanguages != oldnumLanguages || data.SetSystemTime != oldSetSystemTime) {
3457 for (
int i = oldnumLanguages; i < numLanguages; i++) {
3458 data.EPGLanguages[i] = 0;
3461 for (k = 0; k < oldnumLanguages; k++) {
3462 if (data.EPGLanguages[k] == l)
3465 if (k >= oldnumLanguages) {
3466 data.EPGLanguages[i] = l;
3471 data.EPGLanguages[numLanguages] = -1;
3491 const char *videoDisplayFormatTexts[3];
3492 const char *updateChannelsTexts[6];
3493 const char *standardComplianceTexts[3];
3502 for (numAudioLanguages = 0; numAudioLanguages <
I18nLanguages()->
Size() && data.AudioLanguages[numAudioLanguages] >= 0; numAudioLanguages++)
3504 for (numSubtitleLanguages = 0; numSubtitleLanguages <
I18nLanguages()->
Size() && data.SubtitleLanguages[numSubtitleLanguages] >= 0; numSubtitleLanguages++)
3506 originalNumAudioLanguages = numAudioLanguages;
3507 originalNumSubtitleLanguages = numSubtitleLanguages;
3508 videoDisplayFormatTexts[0] =
tr(
"pan&scan");
3509 videoDisplayFormatTexts[1] =
tr(
"letterbox");
3510 videoDisplayFormatTexts[2] =
tr(
"center cut out");
3511 updateChannelsTexts[0] =
tr(
"no");
3512 updateChannelsTexts[1] =
tr(
"names only");
3513 updateChannelsTexts[2] =
tr(
"PIDs only");
3514 updateChannelsTexts[3] =
tr(
"names and PIDs");
3515 updateChannelsTexts[4] =
tr(
"add new channels");
3516 updateChannelsTexts[5] =
tr(
"add new transponders");
3517 standardComplianceTexts[0] =
"DVB";
3518 standardComplianceTexts[1] =
"ANSI/SCTE";
3519 standardComplianceTexts[2] =
"NORDIG";
3521 SetSection(
tr(
"DVB"));
3522 SetHelp(NULL,
tr(
"Button$Audio"),
tr(
"Button$Subtitles"), NULL);
3533 Add(
new cMenuEditStraItem(
tr(
"Setup.DVB$Standard compliance"), &data.StandardCompliance, 3, standardComplianceTexts));
3535 if (data.VideoFormat == 0)
3536 Add(
new cMenuEditStraItem(
tr(
"Setup.DVB$Video display format"), &data.VideoDisplayFormat, 3, videoDisplayFormatTexts));
3538 Add(
new cMenuEditStraItem(
tr(
"Setup.DVB$Update channels"), &data.UpdateChannels, 6, updateChannelsTexts));
3540 for (
int i = 0; i < numAudioLanguages; i++)
3543 if (data.DisplaySubtitles) {
3545 for (
int i = 0; i < numSubtitleLanguages; i++)
3548 Add(
new cMenuEditIntItem(
tr(
"Setup.DVB$Subtitle foreground transparency"), &data.SubtitleFgTransparency, 0, 9));
3549 Add(
new cMenuEditIntItem(
tr(
"Setup.DVB$Subtitle background transparency"), &data.SubtitleBgTransparency, 0, 10));
3562 bool newVideoFormat = data.VideoFormat;
3565 bool newDisplaySubtitles = data.DisplaySubtitles;
3566 int oldnumAudioLanguages = numAudioLanguages;
3567 int oldnumSubtitleLanguages = numSubtitleLanguages;
3579 bool DoSetup = data.VideoFormat != newVideoFormat;
3580 DoSetup |= data.DisplaySubtitles != newDisplaySubtitles;
3581 if (numAudioLanguages != oldnumAudioLanguages) {
3582 for (
int i = oldnumAudioLanguages; i < numAudioLanguages; i++) {
3583 data.AudioLanguages[i] = 0;
3586 for (k = 0; k < oldnumAudioLanguages; k++) {
3587 if (data.AudioLanguages[k] == l)
3590 if (k >= oldnumAudioLanguages) {
3591 data.AudioLanguages[i] = l;
3596 data.AudioLanguages[numAudioLanguages] = -1;
3599 if (numSubtitleLanguages != oldnumSubtitleLanguages) {
3600 for (
int i = oldnumSubtitleLanguages; i < numSubtitleLanguages; i++) {
3601 data.SubtitleLanguages[i] = 0;
3604 for (k = 0; k < oldnumSubtitleLanguages; k++) {
3605 if (data.SubtitleLanguages[k] == l)
3608 if (k >= oldnumSubtitleLanguages) {
3609 data.SubtitleLanguages[i] = l;
3614 data.SubtitleLanguages[numSubtitleLanguages] = -1;
3671 int NumSatDevices = 0;
3676 if (NumSatDevices > 1) {
3701 bool DeviceBondingsChanged =
false;
3711 else if (DeviceBondingsChanged)
3736 const char *Activating =
"";
3737 const char *CamName = camSlot->GetCamName();
3739 switch (camSlot->ModuleStatus()) {
3740 case msReset: CamName =
tr(
"CAM reset");
break;
3741 case msPresent: CamName =
tr(
"CAM present");
break;
3742 case msReady: CamName =
tr(
"CAM ready");
break;
3743 default: CamName =
"-";
break;
3746 else if (camSlot->IsActivating())
3748 Activating =
tr(
" (activating)");
3750 if (strcmp(buffer, Text()) != 0) {
3763 void SetHelpKeys(
void);
3771 activationHelp = NULL;
3786 const char *NewActivationHelp =
"";
3790 NewActivationHelp =
tr(
"Button$Cancel activation");
3792 NewActivationHelp =
tr(
"Button$Activate");
3794 if (NewActivationHelp != activationHelp) {
3795 activationHelp = NewActivationHelp;
3796 SetHelp(
tr(
"Button$Menu"),
tr(
"Button$Reset"), activationHelp);
3806 time_t t0 = time(NULL);
3839 if (Device->ProvidesChannel(Channel)) {
3842 if (CamSlot->
Assign(Device,
true)) {
3844 if (CamSlot->
Assign(Device)) {
3845 if (Device->SwitchChannel(Channel,
true)) {
3883 case kRed:
return Menu();
3884 case kGreen: state = Reset();
break;
3885 case kYellow: state = Activate();
break;
3901 const char *pauseKeyHandlingTexts[3];
3902 const char *delTimeshiftRecTexts[3];
3910 pauseKeyHandlingTexts[0] =
tr(
"do not pause live video");
3911 pauseKeyHandlingTexts[1] =
tr(
"confirm pause live video");
3912 pauseKeyHandlingTexts[2] =
tr(
"pause live video");
3913 delTimeshiftRecTexts[0] =
tr(
"no");
3914 delTimeshiftRecTexts[1] =
tr(
"confirm");
3915 delTimeshiftRecTexts[2] =
tr(
"yes");
3940 virtual void Store(
void);
4027 SetSection(
tr(
"Plugins"));
4029 for (
int i = 0; ; i++) {
4051 return AddSubMenu(menu);
4072 virtual void Set(
void);
4090 snprintf(buffer,
sizeof(buffer),
"%s - VDR %s",
tr(
"Setup"),
VDRVERSION);
4160 #define STOP_RECORDING trNOOP(" Stop recording ") 4226 for (
int i = 0; ; i++) {
4250 bool result =
false;
4253 if (Force || NewReplaying !=
replaying) {
4288 const char *s = NULL;
4369 default:
switch (Key) {
4371 case kRed:
if (!HadSubMenu)
4374 case kGreen:
if (!HadSubMenu) {
4379 case kYellow:
if (!HadSubMenu)
4382 case kBlue:
if (!HadSubMenu)
4436 int indexSubtitle = 0;
4440 case 2:
if (p->
type == 0x05)
4584 if (n <= ch->Number() && ch->
Number() < n + m) {
4619 int SaveGroup =
group;
4698 if ((Key & (k_Repeat |
k_Release)) == 0) {
4718 bool PositionerMoving = Positioner && Positioner->
IsMoving();
4720 if (!PositionerMoving) {
4736 #define VOLUMETIMEOUT 1000 //ms 4737 #define MUTETIMEOUT 5000 //ms 4803 #define TRACKTIMEOUT 5000 //ms 4818 if (TrackId && TrackId->
id) {
4821 if (i == CurrentAudioTrack)
4870 int oldTrack =
track;
4887 static int ac[] = { 1, 0, 2 };
4914 if (
track != oldTrack) {
4939 if (TrackId && TrackId->
id) {
4942 if (i == CurrentSubtitleTrack)
4988 int oldTrack =
track;
5015 if (
track != oldTrack) {
5040 timer =
new cTimer(
true, Pause);
5044 timer->SetPending(
true);
5045 timer->SetRecording(
true);
5046 event = timer->Event();
5048 if (event || GetEvent())
5049 dsyslog(
"Title: '%s' Subtitle: '%s'", event->Title(),
event->ShortText());
5051 fileName = strdup(Recording.FileName());
5055 isyslog(
"already recording: '%s'", fileName);
5057 timer->SetPending(
false);
5058 timer->SetRecording(
false);
5071 isyslog(
"record %s", fileName);
5073 const cChannel *ch = timer->Channel();
5074 recorder =
new cRecorder(fileName, ch, timer->Priority());
5075 if (device->AttachReceiver(recorder)) {
5076 Recording.WriteInfo();
5082 char *Directory = strdup(fileName);
5084 if (
char *p = strrchr(Directory,
'/')) {
5085 while (p > Directory && *--p !=
'/')
5089 dsyslog(
"setting %s to be sorted by time", Directory);
5114 #define INSTANT_REC_EPG_LOOKAHEAD 300 // seconds to look into the EPG data for an instant recording 5118 const cChannel *channel = timer->Channel();
5130 dsyslog(
"got EPG info after %d seconds", seconds);
5137 dsyslog(
"waiting for EPG info...");
5140 dsyslog(
"no EPG info available");
5148 timer->SetRecording(
false);
5151 if (ExecuteUserCommand)
5159 if (!recorder || !recorder->IsAttached() || !timer || !timer->Matches(t)) {
5161 timer->SetPending(
false);
5175 static time_t LastNoDiskSpaceMessage = 0;
5184 isyslog(
"not enough disk space to start recording%s%s", Timer ?
" timer " :
"", Timer ? *Timer->
ToDescr() :
"");
5186 LastNoDiskSpaceMessage = time(NULL);
5190 LastNoDiskSpaceMessage = 0;
5205 if (!Timer || Timer->
Matches()) {
5207 if (!RecordControls[i]) {
5209 return RecordControls[i]->Process(time(NULL));
5214 else if (!Timer || !Timer->
Pending()) {
5215 isyslog(
"no free DVB device to record channel %d (%s)!", ch, channel->
Name());
5220 esyslog(
"ERROR: channel %d not defined!", ch);
5228 if (RecordControls[i]) {
5229 const char *
id = RecordControls[i]->InstantId();
5230 if (
id && strcmp(
id, InstantId) == 0) {
5231 cTimer *timer = RecordControls[i]->Timer();
5232 RecordControls[i]->
Stop();
5248 if (Start(NULL,
true)) {
5262 if (RecordControls[i]) {
5263 if (!LastInstantId && RecordControls[i]->InstantId())
5264 return RecordControls[i]->InstantId();
5265 if (LastInstantId && LastInstantId == RecordControls[i]->InstantId())
5266 LastInstantId = NULL;
5276 if (RecordControls[i] && strcmp(RecordControls[i]->FileName(), FileName) == 0)
5277 return RecordControls[i];
5286 if (RecordControls[i] && RecordControls[i]->Timer() == Timer)
5287 return RecordControls[i];
5295 if (RecordControls[i]) {
5296 if (!RecordControls[i]->
Process(t)) {
5307 if (RecordControls[i]) {
5308 if (RecordControls[i]->Timer() && RecordControls[i]->Timer()->Channel() == Channel) {
5309 if (RecordControls[i]->Device()->ProvidesTransponder(Channel)) {
5310 isyslog(
"stopping recording due to modification of channel %d (%s)", Channel->
Number(), Channel->
Name());
5311 RecordControls[i]->Stop();
5324 if (RecordControls[i])
5339 int NewState = state;
5340 bool Result = State != NewState;
5349 initialValue = NULL;
5351 framesPerSecond = 0;
5357 initialValue = InitialValue;
5358 framesPerSecond = FramesPerSecond;
5367 currentValue = int(round(*initialValue * framesPerSecond));
5370 else if (Key != lastKey) {
5378 return max(currentValue, 1);
5436 if (recording->
Delete()) {
5517 bool NormalPlay = (Play && Speed == -1);
5540 if (
GetIndex(Current, Total) && Total > 0) {
5558 Index = Current - Index;
5581 strcpy(buf,
tr(
"Jump: "));
5582 int len = strlen(buf);
5591 sprintf(buf + len,
"%c%c:%c%c", ch10, ch1, cm10, cm1);
5597 #define STAY_SECONDS_OFF_END 10 5670 if (
GetIndex(Current, Total,
true)) {
5684 Goto(Current,
true);
5703 Goto(m->Position());
5707 Goto(m->Position(),
true);
5714 Goto(Forward ? Total : 0,
true);
5750 else if (!MarkRequired)
5840 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 - 1).
virtual void SetTrack(int Index, const char *const *Tracks)=0
< This class implements the track display.
cOsdItem * stopReplayItem
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.
virtual void StartActivation(void)
Puts the CAM in this slot into a mode where an inserted smart card can be activated.
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)
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
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
eRecordingsSortMode RecordingsSortMode
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
virtual void Append(T Data)
const char * DefaultFontSml
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)...
bool ChangePriorityLifetime(int NewPriority, int NewLifetime)
Changes the priority and lifetime of this recording to the given values.
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)
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.
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
const cPositioner * positioner
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)
static bool OsdSizeChanged(int &State)
Checks if the OSD size has changed and a currently displayed OSD needs to be redrawn.
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.
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.
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)
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
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
int PathIsInUse(const char *Path)
Checks whether any recording in the given Path is currently in use and therefore the whole Path shall...
bool Recording(void) const
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
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 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...
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)
int AdaptiveSkipAlternate
virtual ~cDisplayVolume()
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
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.
void IncBeingEdited(void)
char FontOsd[MAXFONTNAME]
const char * Description(void)
Returns a user visible, single line description of this theme.
int GetNextNormal(int Idx)
bool TimedOut(void) const
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 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
int GetNumRecordingsInPath(const char *Path)
Returns the total number of recordings in the given Path, including all sub-folders of Path...
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)
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
void SetMarks(cMarks *Marks)
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)
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...
static time_t IncDay(time_t t, int Days)
#define RUC_AFTERRECORDING
cChannel * GetByChannelID(tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false)
cString & CompactChars(char c)
Compact any sequence of characters 'c' to a single character, and strip all of them from the beginnin...
bool MoveRecordings(const char *OldPath, const char *NewPath)
Moves all recordings in OldPath to NewPath.
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
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.
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[]
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
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)
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
cAdaptiveSkipper adaptiveSkipper
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)
void DelAll(void)
Deletes/terminates all operations.
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.
static cOsdObject * pluginOsdObject
void Reply(const char *s)
cMark * Get(int Position)
static cDevice * PrimaryDevice(void)
Returns the primary device.
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.
virtual bool HasMMI(void)
Returns 'true' if the CAM in this slot has an active MMI.
cChannel * NextAvailableChannel(cChannel *Channel, int Direction)
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.
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)
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...
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).
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)
void DelByName(const char *FileName)
static cPlugin * GetPlugin(int Index)
virtual ~cDisplaySubtitleTracks()
const char * Description(void) const
void Sort(bool IgnoreCase=false)
void ClearSortNames(void)
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...
bool StateChanged(int &State)
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]
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)
bool DeleteMarks(void)
Deletes the editing marks from this recording (if any).
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 Active(void)
Checks whether there is currently any operation running and starts the next one form the list if the ...
virtual 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)
void Initialize(int *InitialValue, double FramesPerSecond)
char * ExchangeChars(char *s, bool ToFileSystem)
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.
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...
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.
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 Del(const char *FileName)
Deletes the given FileName from the list of operations.
void AddByName(const char *FileName, bool TriggerUpdate=true)
bool IsPesRecording(void) const
int IsInUse(void) const
Checks whether this recording is currently in use and therefore shall not be tampered with...
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...
The cDevice class is the base from which actual devices can be derived.
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)
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.
bool HasMarks(void)
Returns true if this recording has any editing marks.
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.
const cEvent * GetFollowingEvent(void) const
static bool Start(cTimer *Timer=NULL, bool Pause=false)