Switched to proper tsplay-0.2 patch detection

Modified Files:
	server/recplayer.c Makefile CONTRIBUTORS HISTORY
This commit is contained in:
schmirl
2010-06-04 18:32:34 +00:00
parent 7517b874d8
commit 1a1141e4a1
4 changed files with 13 additions and 6 deletions

View File

@@ -21,6 +21,9 @@
#include "recplayer.h"
// for TSPLAY patch detection
#include "vdr/device.h"
#define _XOPEN_SOURCE 600
#include <fcntl.h>
@@ -34,7 +37,7 @@ RecPlayer::RecPlayer(cRecording* rec)
// FIXME find out max file path / name lengths
#if VDRVERSNUM >= 10703 || defined(MAXVIDEOFILESIZETS)
#if VDRVERSNUM >= 10703 || defined(TSPLAY_PATCH_VERSION)
indexFile = new cIndexFile(recording->FileName(), false, rec->IsPesRecording());
#else
indexFile = new cIndexFile(recording->FileName(), false);
@@ -58,7 +61,7 @@ void RecPlayer::scan()
for(i = 1; i < 1000; i++)
{
#if APIVERSNUM < 10703 || !defined(MAXVIDEOFILESIZETS)
#if APIVERSNUM < 10703 || !defined(TSPLAY_PATCH_VERSION)
snprintf(fileName, 2047, "%s/%03i.vdr", recording->FileName(), i);
//log->log("RecPlayer", Log::DEBUG, "FILENAME: %s", fileName);
file = fopen(fileName, "r");
@@ -99,7 +102,7 @@ int RecPlayer::openFile(int index)
char fileName[2048];
#if APIVERSNUM >= 10703 || defined(MAXVIDEOFILESIZETS)
#if APIVERSNUM >= 10703 || defined(TSPLAY_PATCH_VERSION)
snprintf(fileName, 2047, "%s/%05i.ts", recording->FileName(), index);
isyslog("openFile called for index %i string:%s", index, fileName);
@@ -222,7 +225,7 @@ uint64_t RecPlayer::positionFromFrameNumber(uint32_t frameNumber)
{
if (!indexFile) return 0;
#if VDRVERSNUM >= 10703 || defined(MAXVIDEOFILESIZETS)
#if VDRVERSNUM >= 10703 || defined(TSPLAY_PATCH_VERSION)
uint16_t retFileNumber;
off_t retFileOffset;
#else