mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
Eliminate SetRecordingLength
This commit is contained in:
parent
15aa722410
commit
99d2bc6a86
@ -154,7 +154,6 @@ void cViewReplay::ClearVariables(void) {
|
|||||||
lastFlush = 0;
|
lastFlush = 0;
|
||||||
lastFlushModeOnly = 0;
|
lastFlushModeOnly = 0;
|
||||||
message = false;
|
message = false;
|
||||||
reclength = -1;
|
|
||||||
timeShiftActive = false;
|
timeShiftActive = false;
|
||||||
timeShiftFramesTotal = -1;
|
timeShiftFramesTotal = -1;
|
||||||
timeShiftLength = -1;
|
timeShiftLength = -1;
|
||||||
@ -216,7 +215,7 @@ void cViewReplay::SetTimeShiftValues(int current, int total) {
|
|||||||
time_t liveEventStop = eventEnde->EndTime();
|
time_t liveEventStop = eventEnde->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
|
// actual timeshiftlength in sec
|
||||||
timeShiftLength = liveEventStop - recordingStart;
|
timeShiftLength = liveEventStop - recordingStart;
|
||||||
// timeshiftlength until end of live program
|
// timeshiftlength until end of live program
|
||||||
timeShiftFramesTotal = total * ((double)timeShiftLength / (double)recording->LengthInSeconds());
|
timeShiftFramesTotal = total * ((double)timeShiftLength / (double)recording->LengthInSeconds());
|
||||||
@ -275,7 +274,7 @@ void cViewReplay::SetTotal(const char *total) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cViewReplay::SetTimeshiftTimes(int current, int total) {
|
void cViewReplay::SetTimeshiftTimes(int current, int total) {
|
||||||
if (!veTimeshiftTimes || reclength == 0)
|
if (!veTimeshiftTimes || !recording)
|
||||||
return;
|
return;
|
||||||
time_t recordingStart = 0;
|
time_t recordingStart = 0;
|
||||||
time_t playbackTime = 0;
|
time_t playbackTime = 0;
|
||||||
@ -289,10 +288,10 @@ void cViewReplay::SetTimeshiftTimes(int current, int total) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cViewReplay::SetEndTime(int current, int total) {
|
void cViewReplay::SetEndTime(int current, int total) {
|
||||||
if (!veEndTime || reclength == 0)
|
if (!veEndTime || !recording)
|
||||||
return;
|
return;
|
||||||
int totalLength = total;
|
int totalLength = total;
|
||||||
int recordingLength = reclength;
|
int recordingLength = recording->LengthInSeconds();
|
||||||
if (timeShiftActive && timeShiftFramesTotal > 0) {
|
if (timeShiftActive && timeShiftFramesTotal > 0) {
|
||||||
totalLength = timeShiftFramesTotal;
|
totalLength = timeShiftFramesTotal;
|
||||||
recordingLength = timeShiftLength;
|
recordingLength = timeShiftLength;
|
||||||
|
@ -46,7 +46,6 @@ public:
|
|||||||
virtual ~cViewReplay(void);
|
virtual ~cViewReplay(void);
|
||||||
void PreCache(void);
|
void PreCache(void);
|
||||||
void SetModeOnly(bool modeOnly) { this->modeOnly = modeOnly; };
|
void SetModeOnly(bool modeOnly) { this->modeOnly = modeOnly; };
|
||||||
void SetRecordingLength(int length) { reclength = length; };
|
|
||||||
void SetRecording(const cRecording *recording);
|
void SetRecording(const cRecording *recording);
|
||||||
void SetTimeShiftValues(int current, int total);
|
void SetTimeShiftValues(int current, int total);
|
||||||
void SetTitle(const char *title);
|
void SetTitle(const char *title);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "displayreplay.h"
|
#include "displayreplay.h"
|
||||||
|
|
||||||
cSDDisplayReplay::cSDDisplayReplay(cViewReplay *replayView, bool ModeOnly) {
|
cSDDisplayReplay::cSDDisplayReplay(cViewReplay *replayView, bool ModeOnly) {
|
||||||
init = true;
|
|
||||||
view = replayView;
|
view = replayView;
|
||||||
ok = view->Init();
|
ok = view->Init();
|
||||||
if (!ok)
|
if (!ok)
|
||||||
@ -16,10 +15,6 @@ cSDDisplayReplay::~cSDDisplayReplay() {
|
|||||||
void cSDDisplayReplay::SetRecording(const cRecording *Recording) {
|
void cSDDisplayReplay::SetRecording(const cRecording *Recording) {
|
||||||
if (ok) {
|
if (ok) {
|
||||||
view->SetRecording(Recording);
|
view->SetRecording(Recording);
|
||||||
if (init) {
|
|
||||||
view->SetRecordingLength(Recording->LengthInSeconds());
|
|
||||||
init = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,10 +22,6 @@ void cSDDisplayReplay::SetTitle(const char *Title) {
|
|||||||
if (!ok)
|
if (!ok)
|
||||||
return;
|
return;
|
||||||
view->SetTitle(Title);
|
view->SetTitle(Title);
|
||||||
if (init) {
|
|
||||||
view->SetRecordingLength(0);
|
|
||||||
init = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cSDDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
|
void cSDDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
class cSDDisplayReplay : public cSkinDisplayReplay {
|
class cSDDisplayReplay : public cSkinDisplayReplay {
|
||||||
private:
|
private:
|
||||||
bool ok;
|
bool ok;
|
||||||
bool init;
|
|
||||||
cViewReplay *view;
|
cViewReplay *view;
|
||||||
public:
|
public:
|
||||||
cSDDisplayReplay(cViewReplay *replayView, bool ModeOnly);
|
cSDDisplayReplay(cViewReplay *replayView, bool ModeOnly);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user