From 6ea279a74a84b13aa72237448c9ed848c8fdcad4 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Fri, 13 Feb 2015 23:46:21 +0100 Subject: Removed all conditional compilation based on VDRVERSNUM. The youngest VDRVERSNUM-check was for 10728. So all VDR versions less or equal 10728 are not supported any more now. --- epg_events.cpp | 10 ---------- pages/ibox.ecpp | 4 ---- pages/recstream.ecpp | 8 -------- recman.cpp | 33 --------------------------------- tasks.cpp | 14 -------------- timers.cpp | 4 ---- 6 files changed, 73 deletions(-) diff --git a/epg_events.cpp b/epg_events.cpp index 1bf8935..9e35f79 100644 --- a/epg_events.cpp +++ b/epg_events.cpp @@ -183,18 +183,11 @@ namespace vdrlive time_t EpgRecording::GetStartTime() const { -#if VDRVERSNUM < 10726 - return m_recording ? m_recording->start : 0; -#else return m_recording ? m_recording->Start() : 0; -#endif } time_t EpgRecording::GetEndTime() const { -#if VDRVERSNUM < 10726 - return m_recording ? m_recording->start : 0; -#else time_t endTime = 0; if (m_recording) { @@ -204,12 +197,10 @@ namespace vdrlive endTime = (length < 0) ? startTime : startTime + length; } return endTime; -#endif } int EpgRecording::Elapsed() const { -#if VDRVERSNUM >= 10726 cControl* pControl = cControl::Control(); if (pControl) { @@ -222,7 +213,6 @@ namespace vdrlive } } } -#endif return 0; } diff --git a/pages/ibox.ecpp b/pages/ibox.ecpp index 4aaa957..84c9615 100644 --- a/pages/ibox.ecpp +++ b/pages/ibox.ecpp @@ -44,11 +44,7 @@ TimerConflictNotifier timerNotifier(); infoUrl = "timerconflicts.html"; } -#if VDRVERSNUM >= 10403 const char* NowReplaying = cReplayControl::NowReplaying(); -#else - const char* NowReplaying = cControl::Control()?cReplayControl::LastReplayed():NULL; -#endif EpgInfoPtr epgEvent; diff --git a/pages/recstream.ecpp b/pages/recstream.ecpp index f45d1c4..61a48e1 100644 --- a/pages/recstream.ecpp +++ b/pages/recstream.ecpp @@ -15,11 +15,7 @@ using namespace vdrlive; off_t RecSize(cRecording const * recording) { -#if VDRVERSNUM < 10704 - cFileName recFile(recording->FileName(), false, false); -#else cFileName recFile(recording->FileName(), false, false, recording->IsPesRecording()); -#endif off_t recSize = 0; for (cUnbufferedFile *recData = recFile.Open(); recData; recData = recFile.NextFile()) { struct stat buf; @@ -52,11 +48,7 @@ if (recording) { reply.setContentLengthHeader(RecSize(recording)); reply.setDirectMode(); -#if VDRVERSNUM < 10704 - cFileName recFile(recording->FileName(), false, false); -#else cFileName recFile(recording->FileName(), false, false, recording->IsPesRecording()); -#endif // dsyslog("LIVE: start send video data."); for (cUnbufferedFile *recData = recFile.Open(); recData; recData = recFile.NextFile()) { char buffer[KILOBYTE(16)]; diff --git a/recman.cpp b/recman.cpp index f1cc9bc..d5d9f29 100644 --- a/recman.cpp +++ b/recman.cpp @@ -137,11 +137,7 @@ namespace vdrlive { return; //dsyslog("[LIVE]: deleting resume '%s'", recording->Name()); -#if VDRVERSNUM < 10704 - cResumeFile ResumeFile(recording->FileName()); -#else cResumeFile ResumeFile(recording->FileName(), recording->IsPesRecording()); -#endif ResumeFile.Delete(); } @@ -387,43 +383,14 @@ namespace vdrlive { time_t RecordingsItemRec::StartTime() const { -#if VDRVERSNUM < 10726 - return m_recording->start; -#else return m_recording->Start(); -#endif } long RecordingsItemRec::Duration() const { long RecLength = 0; if (!m_recording->FileName()) return 0; -#if VDRVERSNUM < 10704 - cString filename = cString::sprintf("%s%s", m_recording->FileName(), INDEXFILESUFFIX); - if (*filename) { - if (access(filename, R_OK) == 0) { - struct stat buf; - if (stat(filename, &buf) == 0) { - struct tIndex { int offset; uchar type; uchar number; short reserved; }; - int delta = buf.st_size % sizeof(tIndex); - if (delta) { - delta = sizeof(tIndex) - delta; - esyslog("ERROR: invalid file size (%ld) in '%s'", buf.st_size, *filename); - } - RecLength = (buf.st_size + delta) / sizeof(tIndex) / SecondsToFrames(60); - } - } - } -#elif VDRVERSNUM < 10721 - // open index file for reading only - cIndexFile *index = new cIndexFile(m_recording->FileName(), false, m_recording->IsPesRecording()); - if (index && index->Ok()) { - RecLength = (int) (index->Last() / SecondsToFrames(60, m_recording->FramesPerSecond())); - } - delete index; -#else return m_recording->LengthInSeconds() / 60; -#endif if (RecLength == 0) { cString lengthFile = cString::sprintf("%s%s", m_recording->FileName(), LENGTHFILESUFFIX); ifstream length(*lengthFile); diff --git a/tasks.cpp b/tasks.cpp index 2a2b8d5..5f73ba6 100644 --- a/tasks.cpp +++ b/tasks.cpp @@ -19,11 +19,7 @@ using namespace std::tr1::placeholders; const char* NowReplaying() { -#if VDRVERSNUM >= 10403 return cReplayControl::NowReplaying(); -#else - return cControl::Control()?cReplayControl::LastReplayed():NULL; -#endif } StickyTask::StickyTask() @@ -60,15 +56,9 @@ void PlayRecordingTask::Action() const char *current = NowReplaying(); if (!current || (0 != strcmp(current, recording->FileName()))) { -#if VDRVERSNUM >= 10728 cReplayControl::SetRecording( 0 ); cControl::Shutdown(); cReplayControl::SetRecording( recording->FileName() ); -#else - cReplayControl::SetRecording( 0, 0 ); - cControl::Shutdown(); - cReplayControl::SetRecording( recording->FileName(), recording->Title() ); -#endif cControl::Launch( new cReplayControl ); cControl::Attach(); } @@ -128,11 +118,7 @@ void StopRecordingTask::Action() return; } -#if VDRVERSNUM >= 10728 cReplayControl::SetRecording( 0 ); -#else - cReplayControl::SetRecording( 0, 0 ); -#endif cControl::Shutdown(); } diff --git a/timers.cpp b/timers.cpp index de303d4..3bcbe1b 100644 --- a/timers.cpp +++ b/timers.cpp @@ -97,11 +97,7 @@ namespace vdrlive { string SortedTimers::GetTimerDays(cTimer const& timer) { string currentDay = timer.WeekDays() > 0 ? -#if VDRVERSNUM < 10503 - *cTimer::PrintDay(0, timer.WeekDays()) : -#else *cTimer::PrintDay(0, timer.WeekDays(), true) : -#endif FormatDateTime(tr("%A, %x"), timer.Day()); return currentDay; } -- cgit v1.2.3