diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-03-04 16:30:10 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-03-04 17:47:32 +0100 |
commit | fdc8195174cc5f108094967fe41656f81d0b3869 (patch) | |
tree | 4f4470172727594bc269fc97efc7ea9132bf66e1 /coreengine/viewelementsdisplayreplay.c | |
parent | e7ea88c253ad9dcf940b690905e0054896968ddc (diff) | |
download | vdr-plugin-skindesigner-fdc8195174cc5f108094967fe41656f81d0b3869.tar.gz vdr-plugin-skindesigner-fdc8195174cc5f108094967fe41656f81d0b3869.tar.bz2 |
Add active recordings to timeshift mode
If the current program is paused (timeshift mode), a recording
is created with an "@" at the beginning. A skin can display
this mode differently than the normal playback of a recording.
This change also enables a different display mode for currently
active timer recordings.
Diffstat (limited to 'coreengine/viewelementsdisplayreplay.c')
-rw-r--r-- | coreengine/viewelementsdisplayreplay.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/coreengine/viewelementsdisplayreplay.c b/coreengine/viewelementsdisplayreplay.c index 4116153..2f7b690 100644 --- a/coreengine/viewelementsdisplayreplay.c +++ b/coreengine/viewelementsdisplayreplay.c @@ -10,7 +10,7 @@ cVeDrRecTitle::cVeDrRecTitle(void) { recording = NULL; event = NULL; title = NULL; - timeshiftActive = false; + timeShiftActive = NoRec; } cVeDrRecTitle::~cVeDrRecTitle(void) { @@ -29,8 +29,8 @@ void cVeDrRecTitle::SetTokenContainer(void) { InheritTokenContainer(); } -void cVeDrRecTitle::Set(const cRecording *recording, const cEvent *event, bool timeshiftActive) { - this->timeshiftActive = timeshiftActive; +void cVeDrRecTitle::Set(const cRecording *recording, const cEvent *event, eRecType_t timeShiftActive) { + this->timeShiftActive = timeShiftActive; if (this->title) { free(this->title); this->title = NULL; @@ -88,7 +88,7 @@ bool cVeDrRecTitle::Parse(bool force) { tokenContainer->AddStringToken((int)eDRRecTitleST::recsubtitle, recShortText); tokenContainer->AddStringToken((int)eDRRecTitleST::recdate, *ShortDateString(recording->Start())); tokenContainer->AddStringToken((int)eDRRecTitleST::rectime, *TimeString(recording->Start())); - tokenContainer->AddIntToken((int)eDRRecTitleIT::timeshift, timeshiftActive); + tokenContainer->AddIntToken((int)eDRRecTitleIT::timeshift, timeShiftActive); if (event) { tokenContainer->AddStringToken((int)eDRRecTitleST::eventstart, *TimeString(event->StartTime())); tokenContainer->AddStringToken((int)eDRRecTitleST::eventstop, *TimeString(event->EndTime())); @@ -164,7 +164,7 @@ bool cVeDrRecInfo::Parse(bool force) { cVeDrCurrentTime::cVeDrCurrentTime(void) { changed = true; current = NULL; - timeshiftActive = false; + timeShiftActive = NoRec; } cVeDrCurrentTime::~cVeDrCurrentTime(void) { @@ -178,12 +178,12 @@ void cVeDrCurrentTime::SetTokenContainer(void) { InheritTokenContainer(); } -void cVeDrCurrentTime::Set(const char *current, bool timeshiftActive) { +void cVeDrCurrentTime::Set(const char *current, eRecType_t timeShiftActive) { if (!current) return; free(this->current); this->current = strdup(current); - this->timeshiftActive = timeshiftActive; + this->timeShiftActive = timeShiftActive; changed = true; } @@ -192,7 +192,7 @@ bool cVeDrCurrentTime::Parse(bool force) { return false; tokenContainer->Clear(); tokenContainer->AddStringToken((int)eDRCurrentTimeST::reccurrent, current); - tokenContainer->AddIntToken((int)eDRCurrentTimeIT::timeshift, timeshiftActive); + tokenContainer->AddIntToken((int)eDRCurrentTimeIT::timeshift, timeShiftActive); SetDirty(); changed = false; return true; @@ -205,7 +205,7 @@ cVeDrTotalTime::cVeDrTotalTime(void) { changed = true; total = NULL; timeshiftDuration = NULL; - timeshiftActive = false; + timeShiftActive = NoRec; } cVeDrTotalTime::~cVeDrTotalTime(void) { @@ -221,12 +221,12 @@ void cVeDrTotalTime::SetTokenContainer(void) { InheritTokenContainer(); } -void cVeDrTotalTime::Set(const char *total, const char *timeshiftDuration, bool timeshiftActive) { +void cVeDrTotalTime::Set(const char *total, const char *timeshiftDuration, eRecType_t timeShiftActive) { if (!total) return; free(this->total); this->total = strdup(total); - this->timeshiftActive = timeshiftActive; + this->timeShiftActive = timeShiftActive; free(this->timeshiftDuration); this->timeshiftDuration = NULL; if (timeshiftDuration) @@ -240,7 +240,7 @@ bool cVeDrTotalTime::Parse(bool force) { tokenContainer->Clear(); tokenContainer->AddStringToken((int)eDRTotalTimeST::rectotal, total); tokenContainer->AddStringToken((int)eDRTotalTimeST::timeshifttotal, timeshiftDuration); - tokenContainer->AddIntToken((int)eDRTotalTimeIT::timeshift, timeshiftActive); + tokenContainer->AddIntToken((int)eDRTotalTimeIT::timeshift, timeShiftActive); SetDirty(); changed = false; return true; @@ -254,7 +254,7 @@ cVeDrTimeshiftTimes::cVeDrTimeshiftTimes(void) { start = ""; playbacktime = ""; timeshiftrest = ""; - timeshiftActive = false; + timeShiftActive = NoRec; } cVeDrTimeshiftTimes::~cVeDrTimeshiftTimes(void) { @@ -269,8 +269,8 @@ void cVeDrTimeshiftTimes::SetTokenContainer(void) { InheritTokenContainer(); } -void cVeDrTimeshiftTimes::Set(cString start, cString playbacktime, cString timeshiftrest, bool timeshiftActive) { - this->timeshiftActive = timeshiftActive; +void cVeDrTimeshiftTimes::Set(cString start, cString playbacktime, cString timeshiftrest, eRecType_t timeShiftActive) { + this->timeShiftActive = timeShiftActive; if (strcmp(*this->start, *start) || strcmp(*this->playbacktime, *playbacktime) || strcmp(*this->timeshiftrest, *timeshiftrest)) { this->start = start; this->playbacktime = playbacktime; @@ -286,7 +286,7 @@ bool cVeDrTimeshiftTimes::Parse(bool force) { tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::recstart, *start); tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::playbacktime, *playbacktime); tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::timeshiftrest, *timeshiftrest); - tokenContainer->AddIntToken((int)eDRTimeshiftTimesIT::timeshift, timeshiftActive); + tokenContainer->AddIntToken((int)eDRTimeshiftTimesIT::timeshift, timeShiftActive); SetDirty(); changed = false; return true; @@ -298,7 +298,7 @@ bool cVeDrTimeshiftTimes::Parse(bool force) { cVeDrEndTime::cVeDrEndTime(void) { changed = true; end = ""; - timeshiftActive = false; + timeShiftActive = NoRec; } cVeDrEndTime::~cVeDrEndTime(void) { @@ -311,8 +311,8 @@ void cVeDrEndTime::SetTokenContainer(void) { InheritTokenContainer(); } -void cVeDrEndTime::Set(cString end, bool timeshiftActive) { - this->timeshiftActive = timeshiftActive; +void cVeDrEndTime::Set(cString end, eRecType_t timeShiftActive) { + this->timeShiftActive = timeShiftActive; if (strcmp(*this->end, *end)) { this->end = end; changed = true; @@ -324,7 +324,7 @@ bool cVeDrEndTime::Parse(bool force) { return false; tokenContainer->Clear(); tokenContainer->AddStringToken((int)eDREndTimeST::recend, *end); - tokenContainer->AddIntToken((int)eDREndTimeIT::timeshift, timeshiftActive); + tokenContainer->AddIntToken((int)eDREndTimeIT::timeshift, timeShiftActive); SetDirty(); changed = false; return true; @@ -337,7 +337,7 @@ cVeDrProgressBar::cVeDrProgressBar(void) { current = -1; total = -1; timeshiftTotal = -1; - timeshiftActive = false; + timeShiftActive = NoRec; changed = true; } @@ -353,12 +353,12 @@ void cVeDrProgressBar::SetTokenContainer(void) { InheritTokenContainer(); } -void cVeDrProgressBar::Set(int current, int total, bool timeshiftActive, int timeshiftTotal) { +void cVeDrProgressBar::Set(int current, int total, eRecType_t timeShiftActive, int timeshiftTotal) { if (!(this->current != current || this->total != total)) return; this->current = current; this->total = total; - this->timeshiftActive = timeshiftActive; + this->timeShiftActive = timeShiftActive; this->timeshiftTotal = timeshiftTotal; changed = true; @@ -371,7 +371,7 @@ bool cVeDrProgressBar::Parse(bool force) { tokenContainer->Clear(); tokenContainer->AddIntToken((int)eDRProgressbarIT::current, current); tokenContainer->AddIntToken((int)eDRProgressbarIT::total, total); - tokenContainer->AddIntToken((int)eDRProgressbarIT::timeshift, timeshiftActive); + tokenContainer->AddIntToken((int)eDRProgressbarIT::timeshift, timeShiftActive); tokenContainer->AddIntToken((int)eDRProgressbarIT::timeshifttotal, timeshiftTotal); SetDirty(); @@ -384,7 +384,7 @@ bool cVeDrProgressBar::Parse(bool force) { cVeDrCutMarks::cVeDrCutMarks(void) { cutmarksIndex = -1; lastMarks = NULL; - timeshiftActive = false; + timeShiftActive = NoRec; Reset(); } @@ -405,11 +405,11 @@ void cVeDrCutMarks::SetTokenContainer(void) { InheritTokenContainer(); } -void cVeDrCutMarks::Set(const cMarks *marks, int current, int total, bool timeshiftActive, int timeshiftTotal) { +void cVeDrCutMarks::Set(const cMarks *marks, int current, int total, eRecType_t timeShiftActive, int timeshiftTotal) { this->marks = marks; this->current = current; this->total = total; - this->timeshiftActive = timeshiftActive; + this->timeShiftActive = timeShiftActive; this->timeshiftTotal = timeshiftTotal; } @@ -421,7 +421,7 @@ void cVeDrCutMarks::Reset(void) { delete[] lastMarks; lastMarks = NULL; markActive = -1; - timeshiftActive = false; + timeShiftActive = NoRec; timeshiftTotal = -1; } @@ -432,7 +432,7 @@ bool cVeDrCutMarks::Parse(bool force) { return false; } tokenContainer->Clear(); - tokenContainer->AddIntToken((int)eDRCutmarksIT::timeshift, timeshiftActive); + tokenContainer->AddIntToken((int)eDRCutmarksIT::timeshift, timeShiftActive); int numMarks = marks->Count(); vector<int> cutmarksInfo; cutmarksInfo.push_back(numMarks); @@ -444,7 +444,7 @@ bool cVeDrCutMarks::Parse(bool force) { for (const cMark *m = marks->First(); m; m = marks->Next(m)) { tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::position, *cString::sprintf("%d", m->Position())); tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::total, *tot); - if (timeshiftActive) { + if (timeShiftActive) { tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::timeshifttotal, *timeshifttot); } tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::startmark, isStartMark ? "1" : "0"); |