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);
289 virtual void Set(
void);
320 const cEvent *Event = NULL;
330 Event ?
'(' :
' ', Event ? Event->
Title() :
"", Event ?
')' :
' ');
333 Event ?
'(' :
' ', Event ? Event->
Title() :
"", Event ?
')' :
' ');
348 #define CHANNELNUMBERTIMEOUT 1000 //ms 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);
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 ?
" " :
"",
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);
1542 bool Update(
bool Force =
false);
1572 bool result =
false;
1578 char v =
event->Vps() && (
event->Vps() -
event->StartTime()) ?
'V' :
' ';
1579 char r =
event->SeenWithin(30) &&
event->IsRunning() ?
'*' :
' ';
1581 cString eds =
event->GetDateString();
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());
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())
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);
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())
2445 if (strcmp(NewPath,
path)) {
2470 else if (Key ==
kOk)
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"));
2859 if (*
Text() ==
'\t')
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);
3242 virtual void Set(
void);
3327 bool ModifiedAppearance =
false;
3336 ModifiedAppearance =
true;
3345 ModifiedAppearance =
true;
3347 ModifiedAppearance =
true;
3352 ModifiedAppearance =
true;
3354 ModifiedAppearance =
true;
3356 ModifiedAppearance =
true;
3365 if (ModifiedAppearance) {
3461 for (k = 0; k < oldnumLanguages; k++) {
3465 if (k >= oldnumLanguages) {
3522 SetHelp(NULL,
tr(
"Button$Audio"),
tr(
"Button$Subtitles"), NULL);
3559 int oldPrimaryDVB =
::Setup.PrimaryDVB;
3560 int oldVideoDisplayFormat =
::Setup.VideoDisplayFormat;
3561 bool oldVideoFormat =
::Setup.VideoFormat;
3563 bool oldStandardCompliance =
::Setup.StandardCompliance;
3564 bool oldDisplaySubtitles =
::Setup.DisplaySubtitles;
3586 for (k = 0; k < oldnumAudioLanguages; k++) {
3590 if (k >= oldnumAudioLanguages) {
3604 for (k = 0; k < oldnumSubtitleLanguages; k++) {
3608 if (k >= oldnumSubtitleLanguages) {
3623 if (::
Setup.PrimaryDVB != oldPrimaryDVB)
3625 if (::
Setup.VideoDisplayFormat != oldVideoDisplayFormat)
3627 if (::
Setup.VideoFormat != oldVideoFormat)
3629 if (::
Setup.DisplaySubtitles != oldDisplaySubtitles)
3631 if (::
Setup.StandardCompliance != oldStandardCompliance)
3671 int NumSatDevices = 0;
3676 if (NumSatDevices > 1) {
3701 bool DeviceBondingsChanged =
false;
3711 else if (DeviceBondingsChanged)
3736 const char *Activating =
"";
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;
3748 Activating =
tr(
" (activating)");
3750 if (strcmp(buffer,
Text()) != 0) {
3786 const char *NewActivationHelp =
"";
3790 NewActivationHelp =
tr(
"Button$Cancel activation");
3792 NewActivationHelp =
tr(
"Button$Activate");
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)) {
3940 virtual void Store(
void);
4029 for (
int i = 0; ; i++) {
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;
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) {
5051 fileName = strdup(Recording.FileName());
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 5130 dsyslog(
"got EPG info after %d seconds", seconds);
5137 dsyslog(
"waiting for EPG info...");
5140 dsyslog(
"no EPG info available");
5151 if (ExecuteUserCommand)
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()) {
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);
5230 if (
id && strcmp(
id, InstantId) == 0) {
5248 if (
Start(NULL,
true)) {
5265 if (LastInstantId && LastInstantId ==
RecordControls[i]->InstantId())
5266 LastInstantId = NULL;
5310 isyslog(
"stopping recording due to modification of channel %d (%s)", Channel->
Number(), Channel->
Name());
5339 int NewState =
state;
5340 bool Result = State != NewState;
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);
5750 else if (!MarkRequired)
5840 bool DoShowMode =
true;
cDisplaySubtitleTracks(void)
void ShowTimed(int Seconds=0)
static cString ToString(int Code)
const char * Title(char Delimiter=' ', bool NewIndicator=false, int Level=-1) const
virtual void SetTrack(int Index, const char *const *Tracks)=0
< This class implements the track display.
cOsdItem * stopReplayItem
eOSState ProcessKey(eKeys Key)
cList< cNestedItem > * commands
virtual cSkinDisplayVolume * DisplayVolume(void)=0
Creates and returns a new object for displaying the current volume.
virtual eOSState ProcessKey(eKeys Key)
const char * Provider(void) const
time_t StartTime(void) const
void TimeSearchDisplay(void)
bool Confirm(const char *s, int Seconds=10, bool WaitForTimeout=false)
bool DayMatches(time_t t) const
static void ResetVersions(void)
int GetPrevGroup(int Idx)
int I18nCurrentLanguage(void)
Returns the index of the current language.
void SetRecording(bool Recording)
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)
time_t startTime(void) const
void ResetResume(const char *ResumeFileName=NULL)
bool Load(const char *SkinName)
cRecordControl(cDevice *Device, cTimer *Timer=NULL, bool Pause=false)
virtual const cRecording * GetRecording(void)
Returns the cRecording that is currently being replayed, or NULL if this player is not playing a cRec...
cOsdItem * stopRecordingItem
void Add(cListObject *Object, cListObject *After=NULL)
static cString ToText(const cChannel *Channel)
double FramesPerSecond(void)
int NumComponents(void) const
const char * Description(void) const
virtual void SetVolume(int Current, int Total, bool Mute)=0
< This class implements the volume/mute display.
cString BaseName(void) const
Returns the base name of this recording (without the video directory and folder). ...
static void Shutdown(void)
static void InvokeCommand(const char *State, const char *RecordingFileName, const char *SourceFileName=NULL)
virtual const char * Version(void)=0
eRecordingsSortMode RecordingsSortMode
char language[MAXLANGCODE2]
bool HasFlags(uint Flags) const
const char * FileName(void) const
Returns the full path name to the recording directory, including the video directory and the actual '...
#define RUC_BEFORERECORDING
cNestedItemList TimerCommands
static const char * SystemCharacterTable(void)
bool Matches(time_t t=0, bool Directly=false, int Margin=0) const
uint64_t Elapsed(void) const
#define TIMERMACRO_EPISODE
static cString sprintf(const char *fmt,...) __attribute__((format(printf
const cTimer * Timer(void) const
virtual void Append(T Data)
const char * DefaultFontSml
const char * Name(void) const
Returns the full name of the recording (without the video directory.
virtual cOsdObject * MainMenuAction(void)
cString ToDescr(void) const
static cDisplayVolume * Create(void)
cMenuMain(eOSState State=osUnknown, bool OpenSubMenus=false)
cTimer * GetMatch(time_t t)
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)
static cDevice * GetDevice(int Index)
Gets the device with the given Index.
static cControl * Control(bool Hidden=false)
Returns the current replay control (if any) in case it is currently visible.
static void Process(time_t t)
bool AttachReceiver(cReceiver *Receiver)
Attaches the given receiver to this device.
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]
virtual eOSState ProcessKey(eKeys Key)
eTrackType types[ttMaxTrackTypes]
cTimerEntry(cMenuTimerItem *item)
void SetSubItems(bool On)
const cComponents * Components(void) const
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)
const cPositioner * positioner
cString Folder(void) const
Returns the name of the folder this recording is stored in (without the video directory).
const cRecordingInfo * Info(void) const
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)
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.
int GetThemeIndex(const char *Description)
virtual void SetJump(const char *Jump)=0
Sets the prompt that allows the user to enter a jump point.
const char * Convert(const char *From, char *To=NULL, size_t ToLength=0)
Converts the given Text from FromCode to ToCode (as set in the constructor).
void Add(cTimer *Timer, cTimer *After=NULL)
eTrackType GetCurrentAudioTrack(void) const
virtual eOSState ProcessKey(eKeys Key)
virtual bool ProvidesSource(int Source) const
Returns true if this device can provide the given source.
void SetNeedsFastResponse(bool NeedsFastResponse)
void I18nSetLocale(const char *Locale)
Sets the current locale to Locale.
virtual eModuleStatus ModuleStatus(void)
Returns the status of the CAM in this slot.
static const cSchedules * Schedules(cSchedulesLock &SchedulesLock)
Caller must provide a cSchedulesLock which has to survive the entire time the returned cSchedules is ...
virtual bool IsMoving(void) const
Returns true if the dish is currently moving as a result of a call to GotoPosition() or GotoAngle()...
virtual void SetRecording(const cRecording *Recording)
Sets the recording that is currently being played.
cNestedItemList RecordingCommands
cString IndexToHMSF(int Index, bool WithFrame, double FramesPerSecond)
bool SetCurrentAudioTrack(eTrackType Type)
Sets the current audio track to the given Type.
static void SetRecording(const char *FileName)
static int CurrentVolume(void)
cString PrintFirstDay(void) const
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 const char * Description(void)=0
void SetEventFromSchedule(const cSchedules *Schedules=NULL)
cDisplayChannel(int Number, bool Switched)
virtual void SetMarks(const cMarks *Marks)
Sets the editing marks to Marks, which shall be used to display the progress bar through a cProgressB...
int PathIsInUse(const char *Path)
Checks whether any recording in the given Path is currently in use and therefore the whole Path shall...
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 * 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)
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)
virtual void Insert(T Data, int Before=0)
bool repTimer(void) const
time_t FirstDay(void) const
int AdaptiveSkipAlternate
int SubtitleFgTransparency
const char *const * Descriptions(void)
virtual ~cDisplayVolume()
virtual bool HasUserIO(void)
Returns true if there is a pending user interaction, which shall be retrieved via GetMenu() or GetEnq...
cString ToString(void) const
cListObject * Prev(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)
const char * Text(void) const
char FontOsd[MAXFONTNAME]
const char * Description(void)
Returns a user visible, single line description of this theme.
int GetNextNormal(int Idx)
T * Next(const T *object) const
static cString EditedFileName(const char *FileName)
Returns the full path name of the edited version of the recording with the given FileName.
bool GroupSep(void) const
static int GetMDay(time_t t)
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)
bool IsAttached(void)
Returns true if this receiver is (still) attached to a device.
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 char * ShortText(void) const
cSourceParams SourceParams
static const cCursesFont Font
bool Open(const char *Command, const char *Mode)
#define IS_AUDIO_TRACK(t)
int SubtitleLanguages[I18N_MAX_LANGUAGES+1]
virtual cMenuSetupPage * SetupMenu(void)
virtual ~cDisplayChannel()
const cEvent * GetPresentEvent(void) const
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)
cSourceParam * Get(char Source) const
bool Put(uint64_t Code, bool Repeat=false, bool Release=false)
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.
const cSchedule * GetSchedule(tChannelID ChannelID) const
virtual ~cReplayControl()
void SetModified(bool ByUser=false)
int GetNextGroup(int Idx)
void IncBeingEdited(void)
int Find(const char *s) const
static void Stop(const char *InstantId)
bool HasRecordingsSortMode(const char *Directory)
const cChannel * Channel(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
int CardIndex(void) const
Returns the card index of this device (0 ... MAXDEVICES - 1).
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 ShowProgress(bool Initial)
bool IsPesRecording(void) const
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 bool Reset(void)
Resets the CAM in this slot.
tChannelID ChannelID(void) const
const cEvent * GetEventAround(time_t Time) const
static cDisplaySubtitleTracks * currentDisplayTracks
cOsdItem * Get(int Index) const
const char * Name(void) const
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 * Name(int Index)
const cComponents * Components(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...
void TimeSearchProcess(eKeys Key)
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)
const char * Title(void) const
void DecBeingEdited(void)
const cEvent * lastFollowing
cAdaptiveSkipper adaptiveSkipper
bool HasUniqueChannelID(cChannel *NewChannel, cChannel *OldChannel=NULL)
virtual eOSState ProcessKey(eKeys Key)
virtual const char * MainMenuEntry(void)
void Del(cListObject *Object, bool DeleteObject=true)
static void Process(eKeys Key)
time_t StopTime(void) const
void DelAll(void)
Deletes/terminates all operations.
char FontFix[MAXFONTNAME]
int ShowChannelNamesWithSource
int DeviceNumber(void) const
Returns the number of this device (0 ... numDevices - 1).
static void Process(eKeys Key)
static void MsgOsdClear(void)
const cEvent * Event(void) const
cChannel * GetByNumber(int Number, int SkipGap=0)
void EnsureAudioTrack(bool Force=false)
Makes sure an audio track is selected that is actually available.
int AudioLanguages[I18N_MAX_LANGUAGES+1]
static cOsdObject * pluginOsdObject
void Reply(const char *s)
cMark * Get(int Position)
static cDevice * PrimaryDevice(void)
Returns the primary device.
tChannelID GetChannelID(void) const
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)
void SetDeferred(int Seconds)
virtual ~cDisplayTracks()
bool Recording(void) const
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...
static cDisplayTracks * Create(void)
void StopReplay(void)
Stops the current replay session (if any).
bool Selectable(void) const
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
int GetAudioChannel(void)
Gets the current audio channel, which is stereo (0), mono left (1) or mono right (2).
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 Transferring(void) const
Returns true if we are currently in Transfer Mode.
const char * Description(void) const
cRecordings Recordings
Any access to Recordings that loops through the list of recordings needs to hold a thread lock on thi...
cListObject * Next(void) const
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...
void IncRecordingsSortMode(const char *Directory)
virtual void CancelActivation(void)
Cancels a previously started activation (if any).
static void ChangeState(void)
void AssertFreeDiskSpace(int Priority, bool Force)
The special Priority value -1 means that we shall get rid of any deleted recordings faster than norma...
virtual void SetAudioChannel(int AudioChannel)=0
Sets the audio channel indicator.
T * Prev(const T *object) const
eTrackType types[ttMaxTrackTypes]
static cRecordControl * GetRecordControl(const char *FileName)
void DelByName(const char *FileName)
static cPlugin * GetPlugin(int Index)
bool IsSingleEvent(void) const
virtual ~cDisplaySubtitleTracks()
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...
virtual bool Filter(const cRecording *Recording) const =0
Returns true if the given Recording shall be displayed in the Recordings menu.
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...
cString GetTimeString(void) const
void SetKeepTracks(bool KeepTracks)
Controls whether the current audio and subtitle track settings shall be kept as they currently are...
const cEvent * GetFollowingEvent(void) const
double FramesPerSecond(void) const
virtual void SetPositioner(const cPositioner *Positioner)
Sets the Positioner used to move the satellite dish.
int IsInUse(void) const
Checks whether this recording is currently in use and therefore shall not be tampered with...
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)
static cOsdObject * PluginOsdObject(void)
bool DeleteMarks(void)
Deletes the editing marks from this recording (if any).
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.
bool HasTimer(void) const
void SetAudioChannel(int AudioChannel)
Sets the audio channel to stereo (0), mono left (1) or mono right (2).
cReplayControl(bool PauseLive=false)
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".
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 * FileName(int Index)
const cList< cEvent > * Events(void) const
tComponent * Component(int Index) const
const char * ShortName(bool OrName=false) const
char OSDTheme[MaxThemeName]
bool SetCurrentSubtitleTrack(eTrackType Type, bool Manual=false)
Sets the current subtitle track to the given Type.
const char * DefaultFontOsd
#define MAXVIDEOFILESIZETS
char OSDSkin[MaxSkinName]
static bool PauseLiveVideo(void)
cSkin * Current(void)
Returns a pointer to the current skin.
bool Assign(cDevice *Device, bool Query=false)
Assigns this CAM slot to the given Device, if this is possible.
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)
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.
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 Replaying(void) const
Returns true if we are currently replaying.
char OSDLanguage[I18N_MAX_LOCALE_LEN]
void RequestEmergencyExit(void)
Requests an emergency exit of the VDR main loop.
static cDisplayVolume * currentDisplayVolume
int SubtitleBgTransparency
int SlotNumber(void)
Returns the number of this CAM slot within the whole system.
The cDevice class is the base from which actual devices can be derived.
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)
time_t StartTime(void) const
static const char * NowReplaying(void)
char * descriptions[ttMaxTrackTypes+1]
const char * Text(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 char * File(void) const
bool TimedOut(void) const
const char * Description(void) const
eTrackType GetCurrentSubtitleTrack(void) const
static bool Start(cTimer *Timer=NULL, bool Pause=false)