summaryrefslogtreecommitdiff
path: root/recman.cpp
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2009-08-27 00:19:01 +0200
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2009-08-27 00:19:01 +0200
commitac835e1d5366908e0c3a706ed3c9298041c4bad9 (patch)
treedc26c51cf47f411ac8d0a0b28b845c5c5886b680 /recman.cpp
parent8c131a1710f1b8c83c09e4f247cc0ba44c0ec4bb (diff)
parent854fa820e345ed890e4a7a9a32b14add68fc642c (diff)
downloadvdr-plugin-live-ac835e1d5366908e0c3a706ed3c9298041c4bad9.tar.gz
vdr-plugin-live-ac835e1d5366908e0c3a706ed3c9298041c4bad9.tar.bz2
Merge commit 'tadi/master'
Conflicts: po/de_DE.po
Diffstat (limited to 'recman.cpp')
-rw-r--r--recman.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/recman.cpp b/recman.cpp
index bf7ca3f..8bfccab 100644
--- a/recman.cpp
+++ b/recman.cpp
@@ -242,6 +242,7 @@ namespace vdrlive {
{
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) {
@@ -257,6 +258,14 @@ namespace vdrlive {
}
}
}
+#else
+ // 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;
+#endif
return RecLength;
}