From 788115cc9d68a2813966e36477f2f085254a9682 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Mon, 28 May 2012 22:53:23 +0100 Subject: [PATCH] Makefile changes as per VDR HISTORY file Changes for compilation with VDR 1.21+ --- .gitignore | 3 +++ Makefile | 10 +++++++--- vompclientrrproc.c | 22 +++++++++++++++++----- 3 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..100f728 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o +.dependencies +*~ diff --git a/Makefile b/Makefile index 4e83ec3..ef3e4af 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id$ +# $Id: Makefile,v 1.17 2009/05/30 14:22:59 christallon Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -17,9 +17,9 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri CXX ?= g++ ifdef DEBUG -CXXFLAGS ?= -g -fPIC -Wall -Woverloaded-virtual #-Werror +CXXFLAGS ?= -g -Wall -Woverloaded-virtual -Wno-parentheses #-Werror else -CXXFLAGS ?= -O2 -fPIC -Wall -Woverloaded-virtual #-Werror +CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual -Wno-parentheses #-Werror endif ### The directory environment: @@ -28,6 +28,10 @@ VDRDIR = ../../.. LIBDIR = ../../lib TMPDIR = /tmp +### Make sure that necessary options are included: + +include $(VDRDIR)/Make.global + ### Allow user defined options to overwrite defaults: -include $(VDRDIR)/Make.config diff --git a/vompclientrrproc.c b/vompclientrrproc.c index 1476880..ccc628f 100644 --- a/vompclientrrproc.c +++ b/vompclientrrproc.c @@ -57,7 +57,9 @@ VompClientRRProc::~VompClientRRProc() bool VompClientRRProc::init() { - return threadStart(); + int a = threadStart(); + sleep(1); + return a; } bool VompClientRRProc::recvRequest(RequestPacket* newRequest) @@ -71,6 +73,7 @@ bool VompClientRRProc::recvRequest(RequestPacket* newRequest) Marten */ + log->log("RRProc", Log::DEBUG, "recvReq"); threadLock(); req_queue.push(newRequest); threadSignalNoLock(); @@ -601,7 +604,11 @@ int VompClientRRProc::processGetRecordingsList() for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) { +#if VDRVERSNUM < 10721 resp->addULONG(recording->start); +#else + resp->addULONG(recording->Start()); +#endif resp->addString(recording->Name()); resp->addString(recording->FileName()); } @@ -1449,9 +1456,9 @@ int VompClientRRProc::processSetTimer() timerString[d] = '\0'; log->log("RRProc", Log::DEBUG, "Timer string after 1.2 conversion:"); - log->log("RRProc", Log::DEBUG, "%s", timerString); #endif + log->log("RRProc", Log::DEBUG, "%s", timerString); cTimer *timer = new cTimer; if (timer->Parse((char*)timerString)) @@ -1468,7 +1475,7 @@ int VompClientRRProc::processSetTimer() resp->addULONG(0); resp->finalise(); x.tcp.sendPacket(resp->getPtr(), resp->getLen()); - return 1; + return 1; // FIXME - cTimer* timer is leaked here! } else { @@ -1774,9 +1781,14 @@ int VompClientRRProc::processGetMarks() { for (const cMark *m = Marks.First(); m; m = Marks.Next(m)) { - log->log("RRProc", Log::DEBUG, "found Mark %i", m->position); +#if VDRVERSNUM < 10721 + ULLONG mposition = m->position; +#else + ULLONG mposition = m->Position(); +#endif + log->log("RRProc", Log::DEBUG, "found Mark %i", mposition); - resp->addULONG(m->position); + resp->addULONG(mposition); } } else -- 2.39.5