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.
This commit is contained in:
kamel5 2021-03-04 16:30:10 +01:00
parent e7ea88c253
commit fdc8195174
6 changed files with 111 additions and 88 deletions

View File

@ -154,7 +154,7 @@ void cViewReplay::ClearVariables(void) {
lastFlush = 0; lastFlush = 0;
lastFlushModeOnly = 0; lastFlushModeOnly = 0;
message = false; message = false;
timeShiftActive = false; timeShiftActive = NoRec;
timeShiftFramesTotal = -1; timeShiftFramesTotal = -1;
timeShiftLength = -1; timeShiftLength = -1;
timeShiftDuration = ""; timeShiftDuration = "";
@ -181,35 +181,41 @@ void cViewReplay::GetGlobalTimers(void) {
void cViewReplay::SetTimeShiftValues(int current, int total) { void cViewReplay::SetTimeShiftValues(int current, int total) {
if (!recording) if (!recording)
return; return;
timeShiftActive = false; timeShiftActive = NoRec;
#if APIVERSNUM >= 20101 #if APIVERSNUM >= 20101
int usage = recording->IsInUse(); int usage = recording->IsInUse();
if (usage & ruTimer) if (usage & ruTimer)
timeShiftActive = true; timeShiftActive = NormalRec;
else { else {
GetGlobalTimers(); GetGlobalTimers();
if (globalTimers.IsRecording(recording)) if (globalTimers.IsRecording(recording))
timeShiftActive = true; timeShiftActive = NormalRec;
} }
#endif #endif
if (!timeShiftActive) if (!timeShiftActive)
return; return;
const char *recName = recording->Name();
if (recName && *recName == '@')
timeShiftActive = TimeshiftRec;
const cRecordingInfo *recInfo = recording->Info(); const cRecordingInfo *recInfo = recording->Info();
if (!recInfo) if (!recInfo)
return; return;
const cSchedule *Schedule = NULL; const cSchedule *Schedule = NULL;
{ if (timeShiftActive == TimeshiftRec) {
LOCK_SCHEDULES_READ; {
Schedule = Schedules->GetSchedule(recInfo->ChannelID()); LOCK_SCHEDULES_READ;
Schedule = Schedules->GetSchedule(recInfo->ChannelID());
}
if (!Schedule)
return;
} }
if (!Schedule)
return;
// Get event at actual recording position // Get event at actual recording position
const cEvent *eventEnde = Schedule->GetEventAround(time(0)); const cEvent *event = (timeShiftActive == TimeshiftRec) ? Schedule->GetEventAround(time(0))
if (!eventEnde) : recInfo->GetEvent();
if (!event)
return; return;
// End of live program // End of live program
time_t liveEventStop = eventEnde->EndTime(); time_t liveEventStop = event->EndTime();
// Begin of timeshift recording // Begin of timeshift recording
time_t recordingStart = time(0) - recording->LengthInSeconds(); time_t recordingStart = time(0) - recording->LengthInSeconds();
// actual timeshiftlength in sec // actual timeshiftlength in sec
@ -218,12 +224,14 @@ void cViewReplay::SetTimeShiftValues(int current, int total) {
timeShiftFramesTotal = total * ((double)timeShiftLength / (double)recording->LengthInSeconds()); timeShiftFramesTotal = total * ((double)timeShiftLength / (double)recording->LengthInSeconds());
// Get event at actual replay position (add 30sec for a better match) // Get event at actual replay position (add 30sec for a better match)
int timeShiftSecondsAfter = (int)(recording->LengthInSeconds() * (1.0 - (double)current / (double)total)) + 30; int timeShiftSecondsAfter = (int)(recording->LengthInSeconds() * (1.0 - (double)current / (double)total)) + 30;
const cEvent *eventReplay = Schedule->GetEventAround(time(0) - timeShiftSecondsAfter); if (timeShiftActive == TimeshiftRec) {
// Display title at replay position const cEvent *eventReplay = Schedule->GetEventAround(time(0) - timeShiftSecondsAfter);
if (eventReplay && eventReplay != lastEvent && veRecTitle) { // Display title at replay position
veRecTitle->Set(recording, eventReplay, true); if (veRecTitle && eventReplay != lastEvent) {
veRecTitle->Parse(); veRecTitle->Set(recording, eventReplay, timeShiftActive);
lastEvent = eventReplay; veRecTitle->Parse();
lastEvent = eventReplay;
}
} }
int mins = (timeShiftLength / 60) % 60; int mins = (timeShiftLength / 60) % 60;
int hours = (timeShiftLength / 3600) % 24; int hours = (timeShiftLength / 3600) % 24;

View File

@ -29,7 +29,7 @@ private:
time_t lastFlushModeOnly; time_t lastFlushModeOnly;
bool message; bool message;
int reclength; int reclength;
bool timeShiftActive; eRecType_t timeShiftActive;
int timeShiftFramesTotal; int timeShiftFramesTotal;
int timeShiftLength; int timeShiftLength;
cString timeshiftrest; cString timeshiftrest;

View File

@ -10,7 +10,7 @@ cVeDrRecTitle::cVeDrRecTitle(void) {
recording = NULL; recording = NULL;
event = NULL; event = NULL;
title = NULL; title = NULL;
timeshiftActive = false; timeShiftActive = NoRec;
} }
cVeDrRecTitle::~cVeDrRecTitle(void) { cVeDrRecTitle::~cVeDrRecTitle(void) {
@ -29,8 +29,8 @@ void cVeDrRecTitle::SetTokenContainer(void) {
InheritTokenContainer(); InheritTokenContainer();
} }
void cVeDrRecTitle::Set(const cRecording *recording, const cEvent *event, bool timeshiftActive) { void cVeDrRecTitle::Set(const cRecording *recording, const cEvent *event, eRecType_t timeShiftActive) {
this->timeshiftActive = timeshiftActive; this->timeShiftActive = timeShiftActive;
if (this->title) { if (this->title) {
free(this->title); free(this->title);
this->title = NULL; this->title = NULL;
@ -88,7 +88,7 @@ bool cVeDrRecTitle::Parse(bool force) {
tokenContainer->AddStringToken((int)eDRRecTitleST::recsubtitle, recShortText); tokenContainer->AddStringToken((int)eDRRecTitleST::recsubtitle, recShortText);
tokenContainer->AddStringToken((int)eDRRecTitleST::recdate, *ShortDateString(recording->Start())); tokenContainer->AddStringToken((int)eDRRecTitleST::recdate, *ShortDateString(recording->Start()));
tokenContainer->AddStringToken((int)eDRRecTitleST::rectime, *TimeString(recording->Start())); tokenContainer->AddStringToken((int)eDRRecTitleST::rectime, *TimeString(recording->Start()));
tokenContainer->AddIntToken((int)eDRRecTitleIT::timeshift, timeshiftActive); tokenContainer->AddIntToken((int)eDRRecTitleIT::timeshift, timeShiftActive);
if (event) { if (event) {
tokenContainer->AddStringToken((int)eDRRecTitleST::eventstart, *TimeString(event->StartTime())); tokenContainer->AddStringToken((int)eDRRecTitleST::eventstart, *TimeString(event->StartTime()));
tokenContainer->AddStringToken((int)eDRRecTitleST::eventstop, *TimeString(event->EndTime())); tokenContainer->AddStringToken((int)eDRRecTitleST::eventstop, *TimeString(event->EndTime()));
@ -164,7 +164,7 @@ bool cVeDrRecInfo::Parse(bool force) {
cVeDrCurrentTime::cVeDrCurrentTime(void) { cVeDrCurrentTime::cVeDrCurrentTime(void) {
changed = true; changed = true;
current = NULL; current = NULL;
timeshiftActive = false; timeShiftActive = NoRec;
} }
cVeDrCurrentTime::~cVeDrCurrentTime(void) { cVeDrCurrentTime::~cVeDrCurrentTime(void) {
@ -178,12 +178,12 @@ void cVeDrCurrentTime::SetTokenContainer(void) {
InheritTokenContainer(); InheritTokenContainer();
} }
void cVeDrCurrentTime::Set(const char *current, bool timeshiftActive) { void cVeDrCurrentTime::Set(const char *current, eRecType_t timeShiftActive) {
if (!current) if (!current)
return; return;
free(this->current); free(this->current);
this->current = strdup(current); this->current = strdup(current);
this->timeshiftActive = timeshiftActive; this->timeShiftActive = timeShiftActive;
changed = true; changed = true;
} }
@ -192,7 +192,7 @@ bool cVeDrCurrentTime::Parse(bool force) {
return false; return false;
tokenContainer->Clear(); tokenContainer->Clear();
tokenContainer->AddStringToken((int)eDRCurrentTimeST::reccurrent, current); tokenContainer->AddStringToken((int)eDRCurrentTimeST::reccurrent, current);
tokenContainer->AddIntToken((int)eDRCurrentTimeIT::timeshift, timeshiftActive); tokenContainer->AddIntToken((int)eDRCurrentTimeIT::timeshift, timeShiftActive);
SetDirty(); SetDirty();
changed = false; changed = false;
return true; return true;
@ -205,7 +205,7 @@ cVeDrTotalTime::cVeDrTotalTime(void) {
changed = true; changed = true;
total = NULL; total = NULL;
timeshiftDuration = NULL; timeshiftDuration = NULL;
timeshiftActive = false; timeShiftActive = NoRec;
} }
cVeDrTotalTime::~cVeDrTotalTime(void) { cVeDrTotalTime::~cVeDrTotalTime(void) {
@ -221,12 +221,12 @@ void cVeDrTotalTime::SetTokenContainer(void) {
InheritTokenContainer(); 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) if (!total)
return; return;
free(this->total); free(this->total);
this->total = strdup(total); this->total = strdup(total);
this->timeshiftActive = timeshiftActive; this->timeShiftActive = timeShiftActive;
free(this->timeshiftDuration); free(this->timeshiftDuration);
this->timeshiftDuration = NULL; this->timeshiftDuration = NULL;
if (timeshiftDuration) if (timeshiftDuration)
@ -240,7 +240,7 @@ bool cVeDrTotalTime::Parse(bool force) {
tokenContainer->Clear(); tokenContainer->Clear();
tokenContainer->AddStringToken((int)eDRTotalTimeST::rectotal, total); tokenContainer->AddStringToken((int)eDRTotalTimeST::rectotal, total);
tokenContainer->AddStringToken((int)eDRTotalTimeST::timeshifttotal, timeshiftDuration); tokenContainer->AddStringToken((int)eDRTotalTimeST::timeshifttotal, timeshiftDuration);
tokenContainer->AddIntToken((int)eDRTotalTimeIT::timeshift, timeshiftActive); tokenContainer->AddIntToken((int)eDRTotalTimeIT::timeshift, timeShiftActive);
SetDirty(); SetDirty();
changed = false; changed = false;
return true; return true;
@ -254,7 +254,7 @@ cVeDrTimeshiftTimes::cVeDrTimeshiftTimes(void) {
start = ""; start = "";
playbacktime = ""; playbacktime = "";
timeshiftrest = ""; timeshiftrest = "";
timeshiftActive = false; timeShiftActive = NoRec;
} }
cVeDrTimeshiftTimes::~cVeDrTimeshiftTimes(void) { cVeDrTimeshiftTimes::~cVeDrTimeshiftTimes(void) {
@ -269,8 +269,8 @@ void cVeDrTimeshiftTimes::SetTokenContainer(void) {
InheritTokenContainer(); InheritTokenContainer();
} }
void cVeDrTimeshiftTimes::Set(cString start, cString playbacktime, cString timeshiftrest, bool timeshiftActive) { void cVeDrTimeshiftTimes::Set(cString start, cString playbacktime, cString timeshiftrest, eRecType_t timeShiftActive) {
this->timeshiftActive = timeshiftActive; this->timeShiftActive = timeShiftActive;
if (strcmp(*this->start, *start) || strcmp(*this->playbacktime, *playbacktime) || strcmp(*this->timeshiftrest, *timeshiftrest)) { if (strcmp(*this->start, *start) || strcmp(*this->playbacktime, *playbacktime) || strcmp(*this->timeshiftrest, *timeshiftrest)) {
this->start = start; this->start = start;
this->playbacktime = playbacktime; this->playbacktime = playbacktime;
@ -286,7 +286,7 @@ bool cVeDrTimeshiftTimes::Parse(bool force) {
tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::recstart, *start); tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::recstart, *start);
tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::playbacktime, *playbacktime); tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::playbacktime, *playbacktime);
tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::timeshiftrest, *timeshiftrest); tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::timeshiftrest, *timeshiftrest);
tokenContainer->AddIntToken((int)eDRTimeshiftTimesIT::timeshift, timeshiftActive); tokenContainer->AddIntToken((int)eDRTimeshiftTimesIT::timeshift, timeShiftActive);
SetDirty(); SetDirty();
changed = false; changed = false;
return true; return true;
@ -298,7 +298,7 @@ bool cVeDrTimeshiftTimes::Parse(bool force) {
cVeDrEndTime::cVeDrEndTime(void) { cVeDrEndTime::cVeDrEndTime(void) {
changed = true; changed = true;
end = ""; end = "";
timeshiftActive = false; timeShiftActive = NoRec;
} }
cVeDrEndTime::~cVeDrEndTime(void) { cVeDrEndTime::~cVeDrEndTime(void) {
@ -311,8 +311,8 @@ void cVeDrEndTime::SetTokenContainer(void) {
InheritTokenContainer(); InheritTokenContainer();
} }
void cVeDrEndTime::Set(cString end, bool timeshiftActive) { void cVeDrEndTime::Set(cString end, eRecType_t timeShiftActive) {
this->timeshiftActive = timeshiftActive; this->timeShiftActive = timeShiftActive;
if (strcmp(*this->end, *end)) { if (strcmp(*this->end, *end)) {
this->end = end; this->end = end;
changed = true; changed = true;
@ -324,7 +324,7 @@ bool cVeDrEndTime::Parse(bool force) {
return false; return false;
tokenContainer->Clear(); tokenContainer->Clear();
tokenContainer->AddStringToken((int)eDREndTimeST::recend, *end); tokenContainer->AddStringToken((int)eDREndTimeST::recend, *end);
tokenContainer->AddIntToken((int)eDREndTimeIT::timeshift, timeshiftActive); tokenContainer->AddIntToken((int)eDREndTimeIT::timeshift, timeShiftActive);
SetDirty(); SetDirty();
changed = false; changed = false;
return true; return true;
@ -337,7 +337,7 @@ cVeDrProgressBar::cVeDrProgressBar(void) {
current = -1; current = -1;
total = -1; total = -1;
timeshiftTotal = -1; timeshiftTotal = -1;
timeshiftActive = false; timeShiftActive = NoRec;
changed = true; changed = true;
} }
@ -353,12 +353,12 @@ void cVeDrProgressBar::SetTokenContainer(void) {
InheritTokenContainer(); 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)) if (!(this->current != current || this->total != total))
return; return;
this->current = current; this->current = current;
this->total = total; this->total = total;
this->timeshiftActive = timeshiftActive; this->timeShiftActive = timeShiftActive;
this->timeshiftTotal = timeshiftTotal; this->timeshiftTotal = timeshiftTotal;
changed = true; changed = true;
@ -371,7 +371,7 @@ bool cVeDrProgressBar::Parse(bool force) {
tokenContainer->Clear(); tokenContainer->Clear();
tokenContainer->AddIntToken((int)eDRProgressbarIT::current, current); tokenContainer->AddIntToken((int)eDRProgressbarIT::current, current);
tokenContainer->AddIntToken((int)eDRProgressbarIT::total, total); tokenContainer->AddIntToken((int)eDRProgressbarIT::total, total);
tokenContainer->AddIntToken((int)eDRProgressbarIT::timeshift, timeshiftActive); tokenContainer->AddIntToken((int)eDRProgressbarIT::timeshift, timeShiftActive);
tokenContainer->AddIntToken((int)eDRProgressbarIT::timeshifttotal, timeshiftTotal); tokenContainer->AddIntToken((int)eDRProgressbarIT::timeshifttotal, timeshiftTotal);
SetDirty(); SetDirty();
@ -384,7 +384,7 @@ bool cVeDrProgressBar::Parse(bool force) {
cVeDrCutMarks::cVeDrCutMarks(void) { cVeDrCutMarks::cVeDrCutMarks(void) {
cutmarksIndex = -1; cutmarksIndex = -1;
lastMarks = NULL; lastMarks = NULL;
timeshiftActive = false; timeShiftActive = NoRec;
Reset(); Reset();
} }
@ -405,11 +405,11 @@ void cVeDrCutMarks::SetTokenContainer(void) {
InheritTokenContainer(); 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->marks = marks;
this->current = current; this->current = current;
this->total = total; this->total = total;
this->timeshiftActive = timeshiftActive; this->timeShiftActive = timeShiftActive;
this->timeshiftTotal = timeshiftTotal; this->timeshiftTotal = timeshiftTotal;
} }
@ -421,7 +421,7 @@ void cVeDrCutMarks::Reset(void) {
delete[] lastMarks; delete[] lastMarks;
lastMarks = NULL; lastMarks = NULL;
markActive = -1; markActive = -1;
timeshiftActive = false; timeShiftActive = NoRec;
timeshiftTotal = -1; timeshiftTotal = -1;
} }
@ -432,7 +432,7 @@ bool cVeDrCutMarks::Parse(bool force) {
return false; return false;
} }
tokenContainer->Clear(); tokenContainer->Clear();
tokenContainer->AddIntToken((int)eDRCutmarksIT::timeshift, timeshiftActive); tokenContainer->AddIntToken((int)eDRCutmarksIT::timeshift, timeShiftActive);
int numMarks = marks->Count(); int numMarks = marks->Count();
vector<int> cutmarksInfo; vector<int> cutmarksInfo;
cutmarksInfo.push_back(numMarks); cutmarksInfo.push_back(numMarks);
@ -444,7 +444,7 @@ bool cVeDrCutMarks::Parse(bool force) {
for (const cMark *m = marks->First(); m; m = marks->Next(m)) { 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::position, *cString::sprintf("%d", m->Position()));
tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::total, *tot); 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::timeshifttotal, *timeshifttot);
} }
tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::startmark, isStartMark ? "1" : "0"); tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::startmark, isStartMark ? "1" : "0");

View File

@ -4,6 +4,13 @@
#include "viewelement.h" #include "viewelement.h"
#include "../extensions/scrapmanager.h" #include "../extensions/scrapmanager.h"
// define recordingtypes
enum eRecType_t {
NoRec = 0,
NormalRec,
TimeshiftRec
};
/****************************************************************** /******************************************************************
* cVeDrRecTitle * cVeDrRecTitle
******************************************************************/ ******************************************************************/
@ -12,12 +19,12 @@ private:
const cRecording *recording; const cRecording *recording;
const cEvent *event; const cEvent *event;
char *title; char *title;
bool timeshiftActive; eRecType_t timeShiftActive;
public: public:
cVeDrRecTitle(void); cVeDrRecTitle(void);
virtual ~cVeDrRecTitle(void); virtual ~cVeDrRecTitle(void);
void SetTokenContainer(void); void SetTokenContainer(void);
void Set(const cRecording *recording = NULL, const cEvent *event = NULL, bool timeshiftActive = false); void Set(const cRecording *recording = NULL, const cEvent *event = NULL, eRecType_t timeShiftActive = NoRec);
void Set(const char *title = NULL); void Set(const char *title = NULL);
bool Parse(bool forced = false); bool Parse(bool forced = false);
}; };
@ -43,12 +50,12 @@ class cVeDrCurrentTime : public cViewElement {
private: private:
bool changed; bool changed;
char *current; char *current;
bool timeshiftActive; eRecType_t timeShiftActive;
public: public:
cVeDrCurrentTime(void); cVeDrCurrentTime(void);
virtual ~cVeDrCurrentTime(void); virtual ~cVeDrCurrentTime(void);
void SetTokenContainer(void); void SetTokenContainer(void);
void Set(const char *current, bool timeshiftActive = false); void Set(const char *current, eRecType_t timeShiftActive = NoRec);
bool Parse(bool forced = false); bool Parse(bool forced = false);
}; };
@ -59,13 +66,13 @@ class cVeDrTotalTime : public cViewElement {
private: private:
bool changed; bool changed;
char *total; char *total;
bool timeshiftActive; eRecType_t timeShiftActive;
char *timeshiftDuration; char *timeshiftDuration;
public: public:
cVeDrTotalTime(void); cVeDrTotalTime(void);
virtual ~cVeDrTotalTime(void); virtual ~cVeDrTotalTime(void);
void SetTokenContainer(void); void SetTokenContainer(void);
void Set(const char *total, const char *timeshiftDuration = NULL, bool timeshiftActive = false); void Set(const char *total, const char *timeshiftDuration = NULL, eRecType_t timeShiftActive = NoRec);
bool Parse(bool forced = false); bool Parse(bool forced = false);
}; };
@ -78,12 +85,12 @@ private:
cString playbacktime; cString playbacktime;
cString timeshiftrest; cString timeshiftrest;
bool changed; bool changed;
bool timeshiftActive; eRecType_t timeShiftActive;
public: public:
cVeDrTimeshiftTimes(void); cVeDrTimeshiftTimes(void);
virtual ~cVeDrTimeshiftTimes(void); virtual ~cVeDrTimeshiftTimes(void);
void SetTokenContainer(void); void SetTokenContainer(void);
void Set(cString start, cString playbacktime, cString timeshiftrest, bool timeshiftActive = false); void Set(cString start, cString playbacktime, cString timeshiftrest, eRecType_t timeShiftActive = NoRec);
bool Parse(bool forced = false); bool Parse(bool forced = false);
}; };
@ -93,13 +100,13 @@ public:
class cVeDrEndTime : public cViewElement { class cVeDrEndTime : public cViewElement {
private: private:
cString end; cString end;
bool timeshiftActive; eRecType_t timeShiftActive;
bool changed; bool changed;
public: public:
cVeDrEndTime(void); cVeDrEndTime(void);
virtual ~cVeDrEndTime(void); virtual ~cVeDrEndTime(void);
void SetTokenContainer(void); void SetTokenContainer(void);
void Set(cString end, bool timeshiftActive = false); void Set(cString end, eRecType_t timeShiftActive = NoRec);
bool Parse(bool forced = false); bool Parse(bool forced = false);
}; };
@ -110,14 +117,14 @@ class cVeDrProgressBar : public cViewElement {
private: private:
int current; int current;
int total; int total;
bool timeshiftActive; eRecType_t timeShiftActive;
int timeshiftTotal; int timeshiftTotal;
bool changed; bool changed;
public: public:
cVeDrProgressBar(void); cVeDrProgressBar(void);
virtual ~cVeDrProgressBar(void); virtual ~cVeDrProgressBar(void);
void SetTokenContainer(void); void SetTokenContainer(void);
void Set(int current, int total, bool timeshiftActive = false, int timeshiftTotal = 0); void Set(int current, int total, eRecType_t timeShiftActive = NoRec, int timeshiftTotal = 0);
bool Parse(bool forced = false); bool Parse(bool forced = false);
}; };
@ -130,7 +137,7 @@ private:
const cMarks *marks; const cMarks *marks;
int current; int current;
int total; int total;
bool timeshiftActive; eRecType_t timeShiftActive;
int timeshiftTotal; int timeshiftTotal;
int numMarksLast; int numMarksLast;
int *lastMarks; int *lastMarks;
@ -141,7 +148,7 @@ public:
cVeDrCutMarks(void); cVeDrCutMarks(void);
virtual ~cVeDrCutMarks(void); virtual ~cVeDrCutMarks(void);
void SetTokenContainer(void); void SetTokenContainer(void);
void Set(const cMarks *marks, int current, int total, bool timeshiftActive = false, int timeshiftTotal = 0); void Set(const cMarks *marks, int current, int total, eRecType_t timeShiftActive = NoRec, int timeshiftTotal = 0);
void Reset(void); void Reset(void);
bool Parse(bool forced = false); bool Parse(bool forced = false);
}; };

View File

@ -95,7 +95,8 @@
<drawtext align="left" y="0" fontsize="{areaheight}*{replayendtimesize}/100" font="{regular}" color="{fontdefault}" text="{tr(start)}: {recstart}" /> <drawtext align="left" y="0" fontsize="{areaheight}*{replayendtimesize}/100" font="{regular}" color="{fontdefault}" text="{tr(start)}: {recstart}" />
</area> </area>
<area condition="{timeshift}" x="40%" y="81%" width="20%" height="5%" layer="2"> <area condition="{timeshift}" x="40%" y="81%" width="20%" height="5%" layer="2">
<drawtext name="rest" align="center" y="0" fontsize="{areaheight}*{replayendtimesize}/100" font="{regular}" color="{fontdefault}" text="TS {tr(rest)}: -{timeshiftrest}" /> <drawtext condition="eq({timeshift}, 1)" align="center" y="0" fontsize="{areaheight}*{replayendtimesize}/100" font="{regular}" color="{fontdefault}" text="{tr(rest)}: -{timeshiftrest}" />
<drawtext condition="gt({timeshift}, 1)" align="center" y="0" fontsize="{areaheight}*{replayendtimesize}/100" font="{regular}" color="{fontdefault}" text="Timeshift Mode {tr(rest)}: -{timeshiftrest}" />
</area> </area>
<area condition="{timeshift}" x="12%" y="87%" width="19%" height="5%" layer="2"> <area condition="{timeshift}" x="12%" y="87%" width="19%" height="5%" layer="2">
<drawtext align="left" y="0" fontsize="{areaheight}*{replayendtimesize}/100" font="{regular}" color="{fontdefault}" text="{tr(playback)}: {playbacktime}" /> <drawtext align="left" y="0" fontsize="{areaheight}*{replayendtimesize}/100" font="{regular}" color="{fontdefault}" text="{tr(playback)}: {playbacktime}" />

View File

@ -58,7 +58,8 @@
{rectime} Time of Recording in hh:mm {rectime} Time of Recording in hh:mm
{eventstart} Starttime of coresponding event in timeshiftmode in hh:mm {eventstart} Starttime of coresponding event in timeshiftmode in hh:mm
{eventstop} Endtime of coresponding event in timeshiftmode in hh:mm {eventstop} Endtime of coresponding event in timeshiftmode in hh:mm
{timeshift} true if a timeshifted recording is displayed {timeshift} 1 if a active recording is displayed
2 if a timeshift recording is displayed
--> -->
<rectitle> <rectitle>
</rectitle> </rectitle>
@ -76,54 +77,60 @@
</recinfo> </recinfo>
<!-- Available Variables currenttime: <!-- Available Variables currenttime:
{reccurrent} Current Time in hh:mm:ss {reccurrent} Current Time in hh:mm:ss
{timeshift} true if a timeshifted recording is displayed {timeshift} 1 if a active recording is displayed
2 if a timeshift recording is displayed
--> -->
<currenttime> <currenttime>
</currenttime> </currenttime>
<!-- Available Variables totaltime: <!-- Available Variables totaltime:
{rectotal} Total Time in hh:mm:ss {rectotal} Total Time in hh:mm:ss
{timeshift} true if a timeshifted recording is displayed {timeshift} 1 if a active recording is displayed
{timeshifttotal} Total Time of timeshift event in hh:mm 2 if a timeshift recording is displayed
{timeshifttotal} Total Time of timeshift event in hh:mm
--> -->
<totaltime> <totaltime>
</totaltime> </totaltime>
<!-- Available Variables timeshifttimes: <!-- Available Variables timeshifttimes:
{recstart} Start Time in hh:mm {recstart} Start Time in hh:mm
{playbacktime} actual replaying time in timeshift mode in hh:mm {playbacktime} actual replaying time in timeshift mode in hh:mm
{timeshiftrest} Rest of unseen timeshift buffer in hh:mm {timeshiftrest} Rest of unseen timeshift buffer in hh:mm
{timeshift} true if a timeshifted recording is displayed {timeshift} 1 if a active recording is displayed
2 if a timeshift recording is displayed
--> -->
<timeshifttimes> <timeshifttimes>
</timeshifttimes> </timeshifttimes>
<!-- Available Variables endtime: <!-- Available Variables endtime:
{recend} End Time in hh:mm {recend} End Time in hh:mm
{timeshift} true if a timeshifted recording is displayed {timeshift} 1 if a active recording is displayed
2 if a timeshift recording is displayed
--> -->
<endtime> <endtime>
</endtime> </endtime>
<!-- Available Variables progressbar: <!-- Available Variables progressbar:
{current} current frame of recording {current} current frame of recording
{total} total frames of recording {total} total frames of recording
{timeshift} true if a timeshifted recording is displayed {timeshift} 1 if a active recording is displayed
{timeshifttotal} total number of frames of timeshift event 2 if a timeshift recording is displayed
{timeshifttotal} total number of frames of timeshift event
--> -->
<progressbar> <progressbar>
</progressbar> </progressbar>
<!-- Available Variables cutmarks: <!-- Available Variables cutmarks:
{timeshift} true if a timeshifted recording is displayed {timeshift} 1 if a active recording is displayed
{marks[]} array of available marks 2 if a timeshift recording is displayed
{marks[position]} frame of current mark {marks[]} array of available marks
{marks[endposition]} frame where startmark ends {marks[position]} frame of current mark
{marks[total]} total number of frames {marks[endposition]} frame where startmark ends
{marks[timeshifttotal]} total number of frames of timeshift event {marks[total]} total number of frames
{marks[active]} true if current replay position hits exactly the mark {marks[timeshifttotal]} total number of frames of timeshift event
{marks[startmark]} true if mark is start mark {marks[active]} true if current replay position hits exactly the mark
{marks[startmark]} true if mark is start mark
--> -->
<cutmarks> <cutmarks>
</cutmarks> </cutmarks>