Bug #950 ยป reclength_vdr1.7.17.diff
helpers.cpp 2012-04-04 20:30:22.000000000 +0200 | ||
---|---|---|
*/
|
||
int cHelpers::RecordingLengthInSeconds(cRecording* recording) {
|
||
#if APIVERSNUM < 10721
|
||
return -1;
|
||
#endif
|
||
int nf=cIndexFile::Length(recording->FileName(), recording->IsPesRecording());
|
||
//esyslog("[vdrmanager] length of record %s: %d", recording->FileName(), length);
|
||
//if (length >= 0)
|
||
// return int(length / SecondsToFrames(60, recording->FramesPerSecond()));
|
||
//return -1;
|
||
#else
|
||
int nf = recording->NumFrames();
|
||
#endif
|
||
if (nf >= 0)
|
||
#if APIVERSNUM >= 10703
|
||
return int(((double) nf / recording->FramesPerSecond()));
|