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

@ -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.

View File

@ -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)

View File

@ -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

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