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 ?
')' :
' ');
343 DisplayMenu->
SetItem(
Text(), Index, Current, Selectable);
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 ?
" " :
"",
1139 DisplayMenu->
SetItem(
Text(), Index, Current, Selectable);
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());
1597 DisplayMenu->
SetItem(
Text(), Index, Current, Selectable);
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)) {
2447 if (NumRecordings > 1 && !
Interface->
Confirm(cString::sprintf(
tr(
"Move entire folder containing %d recordings?"), NumRecordings)))
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')
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);
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);
3560 int oldPrimaryDVB =
::Setup.PrimaryDVB;
3561 int oldVideoDisplayFormat =
::Setup.VideoDisplayFormat;
3562 bool oldVideoFormat =
::Setup.VideoFormat;
3564 bool oldUseAutoChannelNumbering =
::Setup.UseAutoChannelNumbering;
3565 bool oldDisplaySubtitles =
::Setup.DisplaySubtitles;
3587 for (k = 0; k < oldnumAudioLanguages; k++) {
3591 if (k >= oldnumAudioLanguages) {
3605 for (k = 0; k < oldnumSubtitleLanguages; k++) {
3609 if (k >= oldnumSubtitleLanguages) {
3624 if (::
Setup.PrimaryDVB != oldPrimaryDVB)
3626 if (::
Setup.VideoDisplayFormat != oldVideoDisplayFormat)
3628 if (::
Setup.VideoFormat != oldVideoFormat)
3630 if (::
Setup.DisplaySubtitles != oldDisplaySubtitles)
3632 if (::
Setup.UseAutoChannelNumbering != oldUseAutoChannelNumbering)
3672 int NumSatDevices = 0;
3677 if (NumSatDevices > 1) {
3702 bool DeviceBondingsChanged =
false;
3712 else if (DeviceBondingsChanged)
3737 const char *Activating =
"";
3741 case msReset: CamName =
tr(
"CAM reset");
break;
3742 case msPresent: CamName =
tr(
"CAM present");
break;
3743 case msReady: CamName =
tr(
"CAM ready");
break;
3744 default: CamName =
"-";
break;
3749 Activating =
tr(
" (activating)");
3751 if (strcmp(buffer,
Text()) != 0) {
3787 const char *NewActivationHelp =
"";
3791 NewActivationHelp =
tr(
"Button$Cancel activation");
3793 NewActivationHelp =
tr(
"Button$Activate");
3807 time_t t0 = time(NULL);
3840 if (Device->ProvidesChannel(Channel)) {
3843 if (CamSlot->
Assign(Device,
true)) {
3845 if (CamSlot->
Assign(Device)) {
3846 if (Device->SwitchChannel(Channel,
true)) {
3941 virtual void Store(
void);
4030 for (
int i = 0; ; i++) {
4073 virtual void Set(
void);
4091 snprintf(buffer,
sizeof(buffer),
"%s - VDR %s",
tr(
"Setup"),
VDRVERSION);
4161 #define STOP_RECORDING trNOOP(" Stop recording ")
4227 for (
int i = 0; ; i++) {
4251 bool result =
false;
4254 if (Force || NewReplaying !=
replaying) {
4289 const char *s = NULL;
4370 default:
switch (Key) {
4372 case kRed:
if (!HadSubMenu)
4375 case kGreen:
if (!HadSubMenu) {
4380 case kYellow:
if (!HadSubMenu)
4383 case kBlue:
if (!HadSubMenu)
4437 int indexSubtitle = 0;
4441 case 2:
if (p->
type == 0x05)
4585 if (n <= ch->Number() && ch->
Number() < n + m) {
4620 int SaveGroup =
group;
4699 if ((Key & (k_Repeat |
k_Release)) == 0) {
4719 bool PositionerMoving = Positioner && Positioner->
IsMoving();
4721 if (!PositionerMoving) {
4737 #define VOLUMETIMEOUT 1000 //ms
4738 #define MUTETIMEOUT 5000 //ms
4804 #define TRACKTIMEOUT 5000 //ms
4819 if (TrackId && TrackId->
id) {
4822 if (i == CurrentAudioTrack)
4871 int oldTrack =
track;
4888 static int ac[] = { 1, 0, 2 };
4915 if (
track != oldTrack) {
4940 if (TrackId && TrackId->
id) {
4943 if (i == CurrentSubtitleTrack)
4989 int oldTrack =
track;
5016 if (
track != oldTrack) {
5052 fileName = strdup(Recording.FileName());
5077 Recording.WriteInfo();
5083 char *Directory = strdup(
fileName);
5085 if (
char *p = strrchr(Directory,
'/')) {
5086 while (p > Directory && *--p !=
'/')
5090 dsyslog(
"setting %s to be sorted by time", Directory);
5115 #define INSTANT_REC_EPG_LOOKAHEAD 300 // seconds to look into the EPG data for an instant recording
5131 dsyslog(
"got EPG info after %d seconds", seconds);
5138 dsyslog(
"waiting for EPG info...");
5141 dsyslog(
"no EPG info available");
5152 if (ExecuteUserCommand)
5176 static time_t LastNoDiskSpaceMessage = 0;
5185 isyslog(
"not enough disk space to start recording%s%s", Timer ?
" timer " :
"", Timer ? *Timer->
ToDescr() :
"");
5187 LastNoDiskSpaceMessage = time(NULL);
5191 LastNoDiskSpaceMessage = 0;
5206 if (!Timer || Timer->
Matches()) {
5215 else if (!Timer || !Timer->
Pending()) {
5216 isyslog(
"no free DVB device to record channel %d (%s)!", ch, channel->
Name());
5221 esyslog(
"ERROR: channel %d not defined!", ch);
5231 if (
id && strcmp(
id, InstantId) == 0) {
5249 if (
Start(NULL,
true)) {
5266 if (LastInstantId && LastInstantId ==
RecordControls[i]->InstantId())
5267 LastInstantId = NULL;
5311 isyslog(
"stopping recording due to modification of channel %d (%s)", Channel->
Number(), Channel->
Name());
5340 int NewState =
state;
5341 bool Result = State != NewState;
5437 if (recording->
Delete()) {
5518 bool NormalPlay = (Play && Speed == -1);
5541 if (
GetIndex(Current, Total) && Total > 0) {
5559 Index = Current - Index;
5582 strcpy(buf,
tr(
"Jump: "));
5583 int len = strlen(buf);
5592 sprintf(buf + len,
"%c%c:%c%c", ch10, ch1, cm10, cm1);
5598 #define STAY_SECONDS_OFF_END 10
5671 if (
GetIndex(Current, Total,
true)) {
5685 Goto(Current,
true);
5704 Goto(m->Position());
5708 Goto(m->Position(),
true);
5715 Goto(Forward ? Total : 0,
true);
5751 else if (!MarkRequired)
5841 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.
void SetRecording(bool Recording)
int UseAutoChannelNumbering
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)
bool Load(const char *SkinName)
cRecordControl(cDevice *Device, cTimer *Timer=NULL, bool Pause=false)
virtual const cRecording * GetRecording(void)
Returns the cRecording that is currently being replayed, or NULL if this player is not playing a cRec...
cOsdItem * stopRecordingItem
void Add(cListObject *Object, cListObject *After=NULL)
static cString ToText(const cChannel *Channel)
double FramesPerSecond(void)
cSourceParam * Get(char Source) const
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)
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]
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.
int GetThemeIndex(const char *Description)
virtual void SetJump(const char *Jump)=0
Sets the prompt that allows the user to enter a jump point.
const char * Convert(const char *From, char *To=NULL, size_t ToLength=0)
Converts the given Text from FromCode to ToCode (as set in the constructor).
void Add(cTimer *Timer, cTimer *After=NULL)
virtual eOSState ProcessKey(eKeys Key)
void SetNeedsFastResponse(bool NeedsFastResponse)
void I18nSetLocale(const char *Locale)
Sets the current locale to Locale.
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 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
bool Selectable(void) const
const char * I18nLocale(int Language)
Returns the locale code of the given Language (which is an index as returned by I18nCurrentLanguage()...
static cPlugin * CallFirstService(const char *Id, void *Data=NULL)
cMark * GetNext(int Position)
T * Next(const T *object) const
static cDisplayTracks * currentDisplayTracks
void 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)
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...
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
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 cEvent * GetEventAround(time_t Time) const
cSourceParams SourceParams
static const cCursesFont Font
bool Open(const char *Command, const char *Mode)
#define IS_AUDIO_TRACK(t)
int SubtitleLanguages[I18N_MAX_LANGUAGES+1]
virtual cMenuSetupPage * SetupMenu(void)
virtual ~cDisplayChannel()
bool Delete(void)
Changes the file name so that it will no longer be visible in the "Recordings" menu Returns false in ...
cList< cNestedItem > * SubItems(void)
bool Put(uint64_t Code, bool Repeat=false, bool Release=false)
tChannelID GetChannelID(void) const
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
int CardIndex(void) const
Returns the card index of this device (0 ... MAXDEVICES - 1).
static bool HasPlugins(void)
static void TriggerLastActivity(void)
Simulates user activity, for instance to keep the current menu open even if no remote control key has...
static void MsgSetAudioTrack(int Index, const char *const *Tracks)
static void MsgOsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle)
const char * Description(void) const
const char * Name(int Index)
static cRecordControl * RecordControls[]
virtual void SetProgress(int Current, int Total)=0
This function will be called whenever the position in or the total length of the recording has change...
const cSchedule * GetSchedule(tChannelID ChannelID) const
void TimeSearchProcess(eKeys Key)
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.
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.
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()
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).
static void ChangeState(void)
void AssertFreeDiskSpace(int Priority, bool Force)
The special Priority value -1 means that we shall get rid of any deleted recordings faster than norma...
virtual void SetAudioChannel(int AudioChannel)=0
Sets the audio channel indicator.
eTrackType types[ttMaxTrackTypes]
static cRecordControl * GetRecordControl(const char *FileName)
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...
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...
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 * FileName(int Index)
const char * ShortText(void) const
char OSDTheme[MaxThemeName]
bool SetCurrentSubtitleTrack(eTrackType Type, bool Manual=false)
Sets the current subtitle track to the given Type.
const char * DefaultFontOsd
#define MAXVIDEOFILESIZETS
char OSDSkin[MaxSkinName]
static bool PauseLiveVideo(void)
cSkin * Current(void)
Returns a pointer to the current skin.
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)
char OSDLanguage[I18N_MAX_LOCALE_LEN]
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 SubtitleBgTransparency
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)