36 #define MAXWAIT4EPGINFO 3 // seconds 37 #define MODETIMEOUT 3 // seconds 38 #define NEWTIMERLIMIT 120 // seconds until the start time of a new timer created from the Schedule menu, 41 #define DEFERTIMER 60 // seconds by which a timer is deferred in case of problems 43 #define MAXRECORDCONTROLS (MAXDEVICES * MAXRECEIVERS) 44 #define MAXINSTANTRECTIME (24 * 60 - 1) // 23:59 hours 45 #define MAXWAITFORCAMMENU 10 // seconds to wait for the CAM menu to open 46 #define CAMMENURETYTIMEOUT 3 // seconds after which opening the CAM menu is retried 47 #define CAMRESPONSETIMEOUT 5 // seconds to wait for a response from a CAM 48 #define MINFREEDISK 300 // minimum free disk space (in MB) required to start recording 49 #define NODISKSPACEDELTA 300 // seconds between "Not enough disk space to start recording!" messages 50 #define MAXCHNAMWIDTH 16 // maximum number of characters of channels' short names shown in schedules menus 52 #define CHNUMWIDTH (numdigits(Channels.MaxNumber()) + 1) 53 #define CHNAMWIDTH (min(MAXCHNAMWIDTH, Channels.MaxShortChannelNameLength() + 1)) 59 virtual void Set(
void);
102 virtual void Set(
void);
290 virtual void Set(
void);
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);
1079 virtual void Set(
void);
1107 localtime_r(&Day, &tm_r);
1109 strftime(buffer,
sizeof(buffer),
"%Y%m%d", &tm_r);
1121 *name && **name ?
" " :
"",
1160 timer->SetEventFromSchedule();
1177 return item ? item->
Timer() : NULL;
1182 int NewHelpKeys = 0;
1259 if (ti && ti->
Event())
1305 SetHelp(TimerMatch ==
tmFull ?
tr(
"Button$Timer") :
tr(
"Button$Record"), NULL, NULL, CanSwitch ?
tr(
"Button$Switch") : NULL);
1366 bool Update(
bool Force =
false);
1401 bool result =
false;
1410 cString eds =
event->GetDateString();
1412 buffer =
cString::sprintf(
"%d\t%.*s\t%.*s\t%s\t%s%s%s\t%s",
channel->
Number(),
Utf8SymChars(csn, 6), csn,
Utf8SymChars(eds, 6), *eds, *
event->GetTimeString(), t, v, r,
event->Title());
1464 if (!Channel->GroupSep()) {
1480 bool result =
false;
1494 int NewHelpKeys = 0;
1497 NewHelpKeys |= 0x02;
1499 NewHelpKeys |= 0x01;
1501 NewHelpKeys |= 0x04;
1503 NewHelpKeys |= 0x08;
1506 NewHelpKeys |= 0x10;
1512 const char *Red[] = { NULL,
tr(
"Button$Record"),
tr(
"Button$Timer") };
1513 SetHelp(Red[NewHelpKeys & 0x03],
now ?
tr(
"Button$Next") :
tr(
"Button$Now"),
tr(
"Button$Schedule"),
canSwitch ?
tr(
"Button$Switch") : NULL);
1600 if (HadSubMenu &&
Update())
1668 if (ev->EndTime() >
now || ev == PresentEvent)
1685 if ((ev->EndTime() >
now || ev == Event) && !strcmp(ev->Title(), Event->
Title()))
1703 if ((ev->EndTime() >
now || ev == Event) && !strcmp(ev->Title(), Event->
Title()))
1722 if (ev->EndTime() >
now || ev == Event)
1732 bool result =
false;
1746 int NewHelpKeys = 0;
1749 NewHelpKeys |= 0x02;
1751 NewHelpKeys |= 0x01;
1754 NewHelpKeys |= 0x10;
1760 const char *Red[] = { NULL,
tr(
"Button$Record"),
tr(
"Button$Timer") };
1761 SetHelp(Red[NewHelpKeys & 0x03],
tr(
"Button$Now"),
tr(
"Button$Next"),
canSwitch ?
tr(
"Button$Switch") : NULL);
1771 const cEvent *Event = NULL;
1773 Event = CurrentItem->
event;
1854 ChannelNr = channel->
Number();
1887 else if (HadSubMenu &&
Update())
1906 const char *s = Command->Text();
1907 if (Command->SubItems())
1921 const char *p = strchr(s,
':');
1928 if (l > 1 && t[l - 1] ==
'?') {
1956 const char *cmd = *cmdbuf ? *cmdbuf : *
command;
1957 dsyslog(
"executing command '%s'", cmd);
1959 if (p.
Open(cmd,
"r")) {
1962 while ((c = fgetc(p)) != EOF) {
1964 if (
char *NewBuffer = (
char *)realloc(
result, l + 21))
1967 esyslog(
"ERROR: out of memory");
1978 esyslog(
"ERROR: can't open pipe for command '%s'", cmd);
2117 const char *p = strchr(s,
'\n');
2118 int l = p ? p - s : strlen(s);
2121 item->
SetText(strndup(s, l),
false);
2166 else if (state ==
osBack) {
2193 if (CamSlot->HasUserIO())
2274 if (strcmp(NewPath,
path)) {
2299 else if (Key ==
kOk)
2378 Add(
new cOsdItem(
tr(
"This recording is currently in use - no changes are possible!"),
osUnknown,
false));
2480 bool Modified =
false;
2554 SetHelp(
tr(
"Button$Play"),
tr(
"Button$Rewind"), NULL,
tr(
"Button$Edit"));
2651 if (*
Text() ==
'\t')
2680 :
cOsdMenu(Base ? Base :
tr(
"Recordings"), 9, 6, 6)
2683 base = Base ? strdup(Base) : NULL;
2705 if (!ri->IsDirectory())
2714 int NewHelpKeys = 0;
2722 switch (NewHelpKeys) {
2724 case 1:
SetHelp(
tr(
"Button$Open"), NULL, NULL,
tr(
"Button$Edit"));
break;
2739 CurrentRecording = ri->Recording()->FileName();
2751 if (p->Name() && strcmp(p->Name(), Item->
Name()) == 0) {
2757 if (*Item->
Text() && !LastDir) {
2765 if (LastItem || LastDir) {
2767 if (strcmp(
path, recording->Folder()) == 0)
2770 else if (CurrentRecording && strcmp(CurrentRecording, recording->FileName()) == 0)
2807 const char *t = ri->
Name();
2885 if (!recording || recording->
Delete()) {
2908 if (ri->IsDirectory())
2979 ri->SetRecording(riSub->Recording());
3001 virtual void Store(
void);
3034 virtual void Set(
void);
3120 bool ModifiedAppearance =
false;
3129 ModifiedAppearance =
true;
3138 ModifiedAppearance =
true;
3140 ModifiedAppearance =
true;
3145 ModifiedAppearance =
true;
3147 ModifiedAppearance =
true;
3149 ModifiedAppearance =
true;
3158 if (ModifiedAppearance) {
3254 for (k = 0; k < oldnumLanguages; k++) {
3258 if (k >= oldnumLanguages) {
3315 SetHelp(NULL,
tr(
"Button$Audio"),
tr(
"Button$Subtitles"), NULL);
3351 int oldPrimaryDVB =
::Setup.PrimaryDVB;
3352 int oldVideoDisplayFormat =
::Setup.VideoDisplayFormat;
3353 bool oldVideoFormat =
::Setup.VideoFormat;
3355 bool oldDisplaySubtitles =
::Setup.DisplaySubtitles;
3377 for (k = 0; k < oldnumAudioLanguages; k++) {
3381 if (k >= oldnumAudioLanguages) {
3395 for (k = 0; k < oldnumSubtitleLanguages; k++) {
3399 if (k >= oldnumSubtitleLanguages) {
3414 if (::
Setup.PrimaryDVB != oldPrimaryDVB)
3416 if (::
Setup.VideoDisplayFormat != oldVideoDisplayFormat)
3418 if (::
Setup.VideoFormat != oldVideoFormat)
3420 if (::
Setup.DisplaySubtitles != oldDisplaySubtitles)
3460 int NumSatDevices = 0;
3465 if (NumSatDevices > 1) {
3490 bool DeviceBondingsChanged =
false;
3500 else if (DeviceBondingsChanged)
3525 const char *Activating =
"";
3529 case msReset: CamName =
tr(
"CAM reset");
break;
3530 case msPresent: CamName =
tr(
"CAM present");
break;
3531 case msReady: CamName =
tr(
"CAM ready");
break;
3532 default: CamName =
"-";
break;
3537 Activating =
tr(
" (activating)");
3539 if (strcmp(buffer,
Text()) != 0) {
3575 const char *NewActivationHelp =
"";
3579 NewActivationHelp =
tr(
"Button$Cancel activation");
3581 NewActivationHelp =
tr(
"Button$Activate");
3595 time_t t0 = time(NULL);
3628 if (Device->ProvidesChannel(Channel)) {
3631 if (CamSlot->
Assign(Device,
true)) {
3633 if (CamSlot->
Assign(Device)) {
3634 if (Device->SwitchChannel(Channel,
true)) {
3728 virtual void Store(
void);
3817 for (
int i = 0; ; i++) {
3860 virtual void Set(
void);
3878 snprintf(buffer,
sizeof(buffer),
"%s - VDR %s",
tr(
"Setup"),
VDRVERSION);
3948 #define STOP_RECORDING trNOOP(" Stop recording ") 4014 for (
int i = 0; ; i++) {
4038 bool result =
false;
4041 if (Force || NewReplaying !=
replaying) {
4076 const char *s = NULL;
4157 default:
switch (Key) {
4159 case kRed:
if (!HadSubMenu)
4162 case kGreen:
if (!HadSubMenu) {
4167 case kYellow:
if (!HadSubMenu)
4170 case kBlue:
if (!HadSubMenu)
4224 int indexSubtitle = 0;
4228 case 2:
if (p->
type == 0x05)
4372 if (n <= ch->Number() && ch->
Number() < n + m) {
4407 int SaveGroup =
group;
4506 bool PositionerMoving = Positioner && Positioner->
IsMoving();
4508 if (!PositionerMoving) {
4524 #define VOLUMETIMEOUT 1000 //ms 4525 #define MUTETIMEOUT 5000 //ms 4591 #define TRACKTIMEOUT 5000 //ms 4606 if (TrackId && TrackId->
id) {
4609 if (i == CurrentAudioTrack)
4658 int oldTrack =
track;
4675 static int ac[] = { 1, 0, 2 };
4702 if (
track != oldTrack) {
4727 if (TrackId && TrackId->
id) {
4730 if (i == CurrentSubtitleTrack)
4776 int oldTrack =
track;
4803 if (
track != oldTrack) {
4839 fileName = strdup(Recording.FileName());
4864 Recording.WriteInfo();
4870 char *Directory = strdup(
fileName);
4872 if (
char *p = strrchr(Directory,
'/')) {
4873 while (p > Directory && *--p !=
'/')
4877 dsyslog(
"setting %s to be sorted by time", Directory);
4902 #define INSTANT_REC_EPG_LOOKAHEAD 300 // seconds to look into the EPG data for an instant recording 4918 dsyslog(
"got EPG info after %d seconds", seconds);
4925 dsyslog(
"waiting for EPG info...");
4928 dsyslog(
"no EPG info available");
4939 if (ExecuteUserCommand)
4963 static time_t LastNoDiskSpaceMessage = 0;
4972 isyslog(
"not enough disk space to start recording%s%s", Timer ?
" timer " :
"", Timer ? *Timer->
ToDescr() :
"");
4974 LastNoDiskSpaceMessage = time(NULL);
4978 LastNoDiskSpaceMessage = 0;
4993 if (!Timer || Timer->
Matches()) {
5002 else if (!Timer || !Timer->
Pending()) {
5003 isyslog(
"no free DVB device to record channel %d (%s)!", ch, channel->
Name());
5008 esyslog(
"ERROR: channel %d not defined!", ch);
5018 if (
id && strcmp(
id, InstantId) == 0) {
5036 if (
Start(NULL,
true)) {
5053 if (LastInstantId && LastInstantId ==
RecordControls[i]->InstantId())
5054 LastInstantId = NULL;
5098 isyslog(
"stopping recording due to modification of channel %d (%s)", Channel->
Number(), Channel->
Name());
5127 int NewState =
state;
5128 bool Result = State != NewState;
5224 if (recording->
Delete()) {
5305 bool NormalPlay = (
Play && Speed == -1);
5328 if (
GetIndex(Current, Total) && Total > 0) {
5346 Index = Current - Index;
5369 strcpy(buf,
tr(
"Jump: "));
5370 int len = strlen(buf);
5379 sprintf(buf + len,
"%c%c:%c%c", ch10, ch1, cm10, cm1);
5385 #define STAY_SECONDS_OFF_END 10 5458 if (
GetIndex(Current, Total,
true)) {
5472 Goto(Current,
true);
5491 Goto(m->Position());
5495 Goto(m->Position(),
true);
5538 else if (!MarkRequired)
5628 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)
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)
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)
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
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
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]
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)...
int Ca(int Index=0) const
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.
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)
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)
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...
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 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
#define ICON_CLOCK_UH_UTF8
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...
#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 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.
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).
#define ICON_RUNNING_UTF8
virtual void SetCurrent(const char *Current)=0
Sets the current position within the recording, as a user readable string if the form "h:mm:ss...
char NameInstantRecord[NAME_MAX+1]
bool 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)
#define ICON_TV_CRYPTED_UTF8
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)