summaryrefslogtreecommitdiff
path: root/coreengine/viewdisplayreplay.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-02-15 13:19:49 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-02-15 14:00:40 +0100
commit99d2bc6a8636ce30384d2d10180b1e12dec431b4 (patch)
tree75a6f50cb2bdffa2e7968a3b13ba2c31fcd84b8c /coreengine/viewdisplayreplay.c
parent15aa722410efcbf474a3b68ec67ec8b23d19f0f2 (diff)
downloadvdr-plugin-skindesigner-99d2bc6a8636ce30384d2d10180b1e12dec431b4.tar.gz
vdr-plugin-skindesigner-99d2bc6a8636ce30384d2d10180b1e12dec431b4.tar.bz2
Eliminate SetRecordingLength
Diffstat (limited to 'coreengine/viewdisplayreplay.c')
-rw-r--r--coreengine/viewdisplayreplay.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/coreengine/viewdisplayreplay.c b/coreengine/viewdisplayreplay.c
index 02d0998..30986bb 100644
--- a/coreengine/viewdisplayreplay.c
+++ b/coreengine/viewdisplayreplay.c
@@ -154,7 +154,6 @@ void cViewReplay::ClearVariables(void) {
lastFlush = 0;
lastFlushModeOnly = 0;
message = false;
- reclength = -1;
timeShiftActive = false;
timeShiftFramesTotal = -1;
timeShiftLength = -1;
@@ -216,7 +215,7 @@ void cViewReplay::SetTimeShiftValues(int current, int total) {
time_t liveEventStop = eventEnde->EndTime();
// Begin of timeshift recording
time_t recordingStart = time(0) - recording->LengthInSeconds();
- // actual timeshiftlength
+ // actual timeshiftlength in sec
timeShiftLength = liveEventStop - recordingStart;
// timeshiftlength until end of live program
timeShiftFramesTotal = total * ((double)timeShiftLength / (double)recording->LengthInSeconds());
@@ -275,7 +274,7 @@ void cViewReplay::SetTotal(const char *total) {
}
void cViewReplay::SetTimeshiftTimes(int current, int total) {
- if (!veTimeshiftTimes || reclength == 0)
+ if (!veTimeshiftTimes || !recording)
return;
time_t recordingStart = 0;
time_t playbackTime = 0;
@@ -289,10 +288,10 @@ void cViewReplay::SetTimeshiftTimes(int current, int total) {
}
void cViewReplay::SetEndTime(int current, int total) {
- if (!veEndTime || reclength == 0)
+ if (!veEndTime || !recording)
return;
int totalLength = total;
- int recordingLength = reclength;
+ int recordingLength = recording->LengthInSeconds();
if (timeShiftActive && timeShiftFramesTotal > 0) {
totalLength = timeShiftFramesTotal;
recordingLength = timeShiftLength;