summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorFrank Neumann <fnu@yavdr.org>2017-06-04 11:27:08 +0200
committerFrank Neumann <fnu@yavdr.org>2017-06-04 11:27:08 +0200
commitc8537f7c94658acea25df5be4c281310d0dd1259 (patch)
tree4b3412f6547bfefb3618c25393cdb0a9fe3e0154 /common.c
parent756bbf36c3b18732fd1a8800b01fad6a9a67df8d (diff)
downloadvdr-plugin-text2skin-c8537f7c94658acea25df5be4c281310d0dd1259.tar.gz
vdr-plugin-text2skin-c8537f7c94658acea25df5be4c281310d0dd1259.tar.bz2
Drop legacy code prior VDR 2.2.0.
Diffstat (limited to 'common.c')
-rw-r--r--common.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/common.c b/common.c
index 36faac4..20eeac0 100644
--- a/common.c
+++ b/common.c
@@ -145,38 +145,6 @@ const cRecording *GetRecordingByFileName(const char *FileName)
#endif
}
-#if VDRVERSNUM < 20000
-
-int GetFrontendSTR(void)
-{
- uint16_t value = 0;
- cString dev = cString::sprintf(FRONTEND_DEVICE, cDevice::ActualDevice()->CardIndex(), 0);
-
- int fe = open(dev, O_RDONLY | O_NONBLOCK);
- if (fe < 0)
- return 0;
- CHECK(ioctl(fe, FE_READ_SIGNAL_STRENGTH, &value));
- close(fe);
-
- return value / 655;
-}
-
-int GetFrontendSNR(void)
-{
- uint16_t value = 0;
- cString dev = cString::sprintf(FRONTEND_DEVICE, cDevice::ActualDevice()->CardIndex(), 0);
-
- int fe = open(dev, O_RDONLY | O_NONBLOCK);
- if (fe < 0)
- return 0;
- CHECK(ioctl(fe, FE_READ_SNR, &value));
- close(fe);
-
- return value / 655;
-}
-#endif
-
-#if VDRVERSNUM >= 20000
int GetFrontendSTR(void)
{
int SignalStrength = cDevice::ActualDevice()->SignalStrength();
@@ -194,7 +162,6 @@ int GetFrontendSNR(void)
return SignalQuality;
}
-#endif
bool GetFrontendHasLock(void)
{
@@ -334,29 +301,17 @@ int GetRecordingCuttedLength(const char *FileName, double FramesPerSecond, bool
int totalLength = GetRecordingLength(FileName, FramesPerSecond, IsPesRecording);
const double diffIFrame = FramesPerSecond / 2; // approx. 1/2 sec.
-#if VDRVERSNUM >= 10703
marks.Load(FileName, FramesPerSecond, IsPesRecording);
-#else
- marks.Load(FileName);
-#endif
if (marks.Count()) {
int start = 1; // first frame
bool isStart = true;
-#if APIVERSNUM >= 10721
for (cMark *m = marks.First(); m; m = marks.GetNext(m->Position())) {
if (isStart)
start = m->Position();
else
length += (double)(m->Position() - start + 1 + diffIFrame) / (60 * FramesPerSecond); // [min]
-#else
- for (cMark *m = marks.First(); m; m = marks.GetNext(m->position)) {
- if (isStart)
- start = m->position;
- else
- length += (double)(m->position - start + 1 + diffIFrame) / (60 * FramesPerSecond); // [min]
-#endif
isStart = !isStart;
}