diff options
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | server/recplayer.c | 11 |
4 files changed, 13 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 18dbd35..5ccccc6 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -56,6 +56,7 @@ Udo Richter for speeding up cPluginStreamdevServer::Active() for adapting to VDR 1.5.0 API for adapting to VDR 1.7.1 + for proper tsplay-0.2 patch detection greenman for reporting that the log could get flooded on connection failures. @@ -1,6 +1,8 @@ VDR Plugin 'streamdev' Revision History --------------------------------------- +- proper tsplay-0.2 patch detection. tsplay-0.1 is no longer recognized + (thanks to Udo Richter) - added compatibility with VDR 1.6 tsplay-0.1 patch - added support for EnhancedAC3 (thanks to Eric Valette) - fixed a memory leak in cStreamdevPatFilter::GetPid (thanks to lhanisch) @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile,v 1.20 2009/11/04 11:12:20 schmirl Exp $ +# $Id: Makefile,v 1.21 2010/06/04 18:32:34 schmirl Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -32,6 +32,7 @@ TMPDIR = /tmp APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') APIVERSNUM = $(shell grep 'define APIVERSNUM ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') +TSPLAYVERSNUM = $(shell grep 'define TSPLAY_PATCH_VERSION ' $(VDRDIR)/device.h | awk '{ print $$3 }') ### The name of the distribution archive: @@ -44,7 +45,7 @@ INCLUDES += -I$(VDRDIR)/include -I. DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -ifeq ($(shell test $(APIVERSNUM) -ge 10704; echo $$?),0) +ifeq ($(shell test $(APIVERSNUM) -ge 10704 -o -n "$(TSPLAYVERSNUM)" ; echo $$?),0) DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE endif diff --git a/server/recplayer.c b/server/recplayer.c index 3c0e728..384ac13 100644 --- a/server/recplayer.c +++ b/server/recplayer.c @@ -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 |