]> git.vomp.tv Git - vompclient-marten.git/commitdiff
New recinfo system - not finished just yet!
authorChris Tallon <chris@vomp.tv>
Sun, 1 Oct 2006 23:36:33 +0000 (23:36 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 1 Oct 2006 23:36:33 +0000 (23:36 +0000)
objects.mk
recinfo.cc [new file with mode: 0644]
recinfo.h [new file with mode: 0644]
recording.cc
recording.h
udp.cc
vdr.cc
vdr.h
vrecordinglist.cc
vrecordingmenu.cc
vvideorec.cc

index aed0e6d4bef5e4e47e488e0d653fabbb1ca85df5..1eb44f808b87d8184bdbdacf9fc7690eefb06419 100644 (file)
@@ -1,6 +1,7 @@
 OBJECTS1 = command.o log.o tcp.o dsock.o thread.o timers.o i18n.o mutex.o     \\r
            message.o messagequeue.o udp.o                                     \\r
-           vdr.o recman.o recording.o channel.o rectimer.o event.o directory.o\\r
+           vdr.o recman.o recording.o recinfo.o channel.o rectimer.o event.o  \\r
+           directory.o                                                        \\r
            player.o vfeed.o afeed.o                                           \\r
            demuxer.o demuxervdr.o stream.o draintarget.o                      \\r
            viewman.o box.o region.o colour.o view.o                           \\r
diff --git a/recinfo.cc b/recinfo.cc
new file mode 100644 (file)
index 0000000..84eb111
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+    Copyright 2006 Chris Tallon
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#include "recinfo.h"
+
+RecInfo::RecInfo()
+{
+  timerStart = 0;
+  timerEnd = 0;
+  resumePoint = 0;
+  summary = NULL;
+
+  numComponents = 0;
+  streams = NULL;
+  types = NULL;
+  languages = NULL;
+  descriptions = NULL;
+}
+
+RecInfo::~RecInfo()
+{
+  if (summary) delete[] summary;
+
+  for (ULONG i = 0; i < numComponents; i++)
+  {
+    delete[] languages[i];
+    delete[] descriptions[i];
+  }
+
+  if (numComponents)
+  {
+    delete[] languages;
+    delete[] descriptions;
+
+    delete[] streams;
+    delete[] types;
+  }
+
+  timerStart = 0;
+  timerEnd = 0;
+  resumePoint = 0;
+  summary = NULL;
+
+  numComponents = 0;
+  streams = NULL;
+  types = NULL;
+  languages = NULL;
+  descriptions = NULL;
+}
+
+void RecInfo::setNumComponents(ULONG tnumComponents)
+{
+  numComponents = tnumComponents;
+  languages = new char*[numComponents];
+  descriptions = new char*[numComponents];
+  streams = new UCHAR[numComponents];
+  types = new UCHAR[numComponents];
+}
+
+void RecInfo::addComponent(ULONG componentNum, UCHAR tstream, UCHAR ttype, char* tlanguage, char* tdescription)
+{
+  if (componentNum >= numComponents) return;
+  streams[componentNum] = tstream;
+  types[componentNum] = ttype;
+  languages[componentNum] = tlanguage;
+  descriptions[componentNum] = tdescription;
+}
+
+void RecInfo::print()
+{
+  Log* logger = Log::getInstance();
+
+  logger->log("RecInfo", Log::DEBUG, "timerStart %lu", timerStart);
+  logger->log("RecInfo", Log::DEBUG, "timerEnd %lu", timerEnd);
+  logger->log("RecInfo", Log::DEBUG, "resumePoint %lu", resumePoint);
+  logger->log("RecInfo", Log::DEBUG, "Summary: %s", summary);
+  logger->log("RecInfo", Log::DEBUG, "numComponents: %lu", numComponents);
+
+  for (ULONG i = 0; i < numComponents; i++)
+  {
+    logger->log("RecInfo", Log::DEBUG, "streams[%lu]: %u", i, streams[i]);
+    logger->log("RecInfo", Log::DEBUG, "types[%lu]: %u", i, types[i]);
+    logger->log("RecInfo", Log::DEBUG, "languages[%lu]: %s", i, languages[i]);
+    logger->log("RecInfo", Log::DEBUG, "descriptions[%lu]: %s", i, descriptions[i]);
+  }
+}
diff --git a/recinfo.h b/recinfo.h
new file mode 100644 (file)
index 0000000..880d9ab
--- /dev/null
+++ b/recinfo.h
@@ -0,0 +1,56 @@
+/*
+    Copyright 2006 Chris Tallon
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifndef RECINFO_H
+#define RECINFO_H
+
+#include <time.h>
+
+#include "defines.h"
+#include "log.h"
+
+class RecInfo
+{
+  public:
+    RecInfo();
+    ~RecInfo();
+
+    time_t timerStart;
+    time_t timerEnd;
+    ULONG resumePoint;
+    char* summary;
+
+    ULONG numComponents;
+    UCHAR* streams;
+    UCHAR* types;
+    char** languages;
+    char** descriptions;
+
+    void setNumComponents(ULONG);
+    void addComponent(ULONG componentNum, UCHAR tstream, UCHAR ttype, char* tlanguage, char* tdescription);
+    // addComponent accepts a pointer to a buffer that RecInfo will free, not the caller
+
+    void print();
+
+  private:
+
+};
+
+#endif
index 8272fd747070dc8bd760d7f4b3d565d1ab3e2adb..28423477e9ec68c1dd62de21b309f2e548b6bd64 100644 (file)
@@ -20,6 +20,9 @@
 
 #include "recording.h"
 
+Recording* Recording::recInfoFor = NULL;
+RecInfo* Recording::recInfo = NULL;
+
 Recording::Recording()
 {
   start = 0;
@@ -70,3 +73,19 @@ void Recording::setFileName(char* tFileName)
   fileName = new char[strlen(tFileName) + 1];
   if (fileName) strcpy(fileName, tFileName);
 }
+
+void Recording::loadRecInfo()
+{
+  if (recInfoFor == this) return; // it already is loaded
+
+  if (recInfo) delete recInfo;
+  recInfoFor = this;
+  recInfo = VDR::getInstance()->getRecInfo(fileName);
+}
+
+void Recording::dropRecInfo()
+{
+  if (recInfo) delete recInfo;
+  recInfo = NULL;
+  recInfoFor = NULL;
+}
index ddbd5930f6886f6faf61f2b29a1b99185c34ba97..03dbc6391b33736a2766416fbb451d092ee5550f 100644 (file)
@@ -24,6 +24,8 @@
 #include <stdio.h>
 #include <string.h>
 #include "defines.h"
+#include "vdr.h"
+#include "recinfo.h"
 
 class Recording
 {
@@ -41,11 +43,20 @@ class Recording
 
     int index;
 
+    void loadRecInfo();
+    void dropRecInfo();
+
+    static RecInfo* recInfo;
+
   private:
     ULONG start;
     char* progName;
     char* fileName;
 
+    // I only want 1 RecInfo loaded at a time
+    // if (recInfoFor == this) then recInfo is valid
+    // else delete recInfo and reload for this recording
+    static Recording* recInfoFor;
 };
 
 #endif
diff --git a/udp.cc b/udp.cc
index 2ff6c56878317070377400f15a81ae06fea20c30..e8e5a752aa083600c8c5c7bc5940071382fe727f 100755 (executable)
--- a/udp.cc
+++ b/udp.cc
@@ -74,12 +74,15 @@ int UDP::run(MessageQueue* tcommandMessageQueue)
 
 void UDP::threadMethod()
 {
+  threadSetKillable();
+
   int retval;
   while(1)
   {
     #ifndef WIN32
     retval = ds->waitforMessage(0);
     #else
+    log->log("UDP", Log::DEBUG, "Wait for packet");
     threadCheckExit();
     retval = ds->waitforMessage(1);
     #endif
diff --git a/vdr.cc b/vdr.cc
index 015879762614caeed409f32a822078e942604862..6ea917837b3dcb4ff501b3af0433d2bd4fc386e0 100644 (file)
--- a/vdr.cc
+++ b/vdr.cc
@@ -19,6 +19,7 @@
 */
 
 #include "vdr.h"
+#include "recman.h"
 
 VDR* VDR::instance = NULL;
 
@@ -216,6 +217,14 @@ char* VDR::extractString()
   return str;
 }
 
+UCHAR VDR::extractUCHAR()
+{
+  if ((packetPos + sizeof(UCHAR)) > packetLength) return 0;
+  UCHAR uc = packet[packetPos];
+  packetPos += sizeof(UCHAR);
+  return uc;
+}
+
 ULONG VDR::extractULONG()
 {
   if ((packetPos + sizeof(ULONG)) > packetLength) return 0;
@@ -455,40 +464,6 @@ char* VDR::moveRecording(char* fileName, char* newPath)
   return toReturn;
 }
 
-char* VDR::getRecordingSummary(char* fileName)
-{
-  unsigned long totalLength = 8 + strlen(fileName) + 1;
-  UCHAR* buffer = new UCHAR[totalLength];
-
-  *(unsigned long*)&buffer[0] = htonl(totalLength - 4);
-  *(unsigned long*)&buffer[4] = htonl(VDR_GETSUMMARY);
-  strcpy((char*)&buffer[8], fileName);
-
-  MUTEX_LOCK(&mutex);
-  if (!connected) { MUTEX_UNLOCK(&mutex); return 0; }
-
-  unsigned int a = tcp->sendPacket(buffer, totalLength);
-  delete []buffer;
-
-  if (a != totalLength)
-  {
-    disconnect();
-    MUTEX_UNLOCK(&mutex);
-    return NULL;
-  }
-
-  if (!getPacket())
-  {
-    MUTEX_UNLOCK(&mutex);
-    return NULL;
-  }
-  char* toReturn = extractString();
-  freePacket();
-  MUTEX_UNLOCK(&mutex);
-
-  return toReturn;
-}
-
 ChannelList* VDR::getChannelsList(ULONG type)
 {
   UCHAR buffer[8];
@@ -691,44 +666,6 @@ ULLONG VDR::streamRecording(char* fileName, ULONG* totalFrames)
   return lengthBytes;
 }
 
-ULLONG VDR::rescanRecording(ULONG* totalFrames)
-{
-  unsigned long totalLength = 8;
-  UCHAR* buffer = new UCHAR[totalLength];
-
-  *(unsigned long*)&buffer[0] = htonl(totalLength - 4);
-  *(unsigned long*)&buffer[4] = htonl(VDR_RESCANRECORDING);
-
-  MUTEX_LOCK(&mutex);
-  if (!connected) { MUTEX_UNLOCK(&mutex); return 0; }
-
-  unsigned int a = tcp->sendPacket(buffer, totalLength);
-  delete []buffer;
-
-  if (a != totalLength)
-  {
-    disconnect();
-    MUTEX_UNLOCK(&mutex);
-    return 0;
-  }
-
-  if (!getPacket())
-  {
-    MUTEX_UNLOCK(&mutex);
-    return 0;
-  }
-
-  ULLONG lengthBytes = extractULLONG();
-  ULONG lengthFrames = extractULONG();
-  freePacket();
-  MUTEX_UNLOCK(&mutex);
-
-  Log::getInstance()->log("VDR", Log::DEBUG, "VDR said length is: %llu %lu", lengthBytes, lengthFrames);
-
-  *totalFrames = lengthFrames;
-  return lengthBytes;
-}
-
 ULLONG VDR::positionFromFrameNumber(ULONG frameNumber)
 {
   unsigned long totalLength = 12;
@@ -908,45 +845,15 @@ EventList* VDR::getChannelSchedule(ULONG number, time_t start, ULONG duration)
     event->subtitle = extractString();
     event->description = extractString();
     eventList->push_back(event);
-//    eventList->next();
   }
 
   freePacket();
   MUTEX_UNLOCK(&mutex);
 
   Log::getInstance()->log("VDR", Log::DEBUG, "Success got to end of getChannelSchedule");
-
-
-  // debug
-/*
-  Log* l = Log::getInstance();
-
-
-  l->log("VDR", Log::DEBUG, "datalength = %i count = %i", dataLength, count);
-
-  Event* currentEvent;
-  for(eventList->reset(); !eventList->eol(); eventList->next())
-  {
-    currentEvent = (Event*)eventList->getCurrent();
-    l->log("VDR", Log::DEBUG, "%lu %lu %lu %s %s %s", currentEvent->id, currentEvent->time, currentEvent->duration, currentEvent->title, currentEvent->subtitle, currentEvent->description);
-  }
-*/
-
   return eventList;
 }
 
-ULONG VDR::getResumePoint(char* fileName)
-{
-  if (!connected) return 0;
-
-  char* resumeString = configLoad("ResumeData", fileName);
-  if (!resumeString) return 0;
-
-  ULONG toReturn = STRTOUL(resumeString, NULL, 10);
-  delete[] resumeString;
-  return toReturn;
-}
-
 int VDR::configSave(char* section, char* key, const char* value)
 {
   ULONG totalLength = 8 + strlen(section) + strlen(key) + strlen(value) + 3; // 8 for headers, 3 for nulls
@@ -1086,8 +993,6 @@ RecTimerList* VDR::getRecTimersList()
   freePacket();
   MUTEX_UNLOCK(&mutex);
 
-  // Sort the list
-
   sort(recTimerList->begin(), recTimerList->end(), RecTimerSorter());
 
   return recTimerList;
@@ -1127,3 +1032,107 @@ ULONG VDR::setEventTimer(char* timerString)
 
   return toReturn;
 }
+
+RecInfo* VDR::getRecInfo(char* fileName)
+{
+  unsigned long totalLength = 8 + strlen(fileName) + 1;
+  UCHAR* buffer = new UCHAR[totalLength];
+
+  *(unsigned long*)&buffer[0] = htonl(totalLength - 4);
+  *(unsigned long*)&buffer[4] = htonl(VDR_GETRECINFO);
+  strcpy((char*)&buffer[8], fileName);
+
+  MUTEX_LOCK(&mutex);
+  if (!connected) { MUTEX_UNLOCK(&mutex); return NULL; }
+
+  unsigned int a = tcp->sendPacket(buffer, totalLength);
+  delete []buffer;
+
+  if (a != totalLength)
+  {
+    disconnect();
+    MUTEX_UNLOCK(&mutex);
+    return NULL;
+  }
+
+  if (!getPacket())
+  {
+    MUTEX_UNLOCK(&mutex);
+    return NULL;
+  }
+
+  if (serverError())
+  {
+    Log::getInstance()->log("VDR", Log::DEBUG, "Could not get rec info");
+    freePacket();
+    MUTEX_UNLOCK(&mutex);
+    return NULL;
+  }
+
+  TCP::dump(packet, packetLength);
+
+  RecInfo* recInfo = new RecInfo();
+
+  recInfo->timerStart = extractULONG();
+  recInfo->timerEnd = extractULONG();
+  recInfo->resumePoint = extractULONG();
+  recInfo->summary = extractString();
+
+  ULONG numComponents = extractULONG();
+  if (numComponents)
+  {
+    recInfo->setNumComponents(numComponents);
+    for (ULONG i = 0; i < numComponents; i++)
+    {
+      recInfo->streams[i] = extractUCHAR();
+      recInfo->types[i] = extractUCHAR();
+      recInfo->languages[i] = extractString();
+      recInfo->descriptions[i] = extractString();
+    }
+  }
+
+  recInfo->print();
+
+  freePacket();
+  MUTEX_UNLOCK(&mutex);
+  return recInfo;
+}
+
+// FIXME obselete
+ULLONG VDR::rescanRecording(ULONG* totalFrames)
+{
+  unsigned long totalLength = 8;
+  UCHAR* buffer = new UCHAR[totalLength];
+
+  *(unsigned long*)&buffer[0] = htonl(totalLength - 4);
+  *(unsigned long*)&buffer[4] = htonl(VDR_RESCANRECORDING);
+
+  MUTEX_LOCK(&mutex);
+  if (!connected) { MUTEX_UNLOCK(&mutex); return 0; }
+
+  unsigned int a = tcp->sendPacket(buffer, totalLength);
+  delete []buffer;
+
+  if (a != totalLength)
+  {
+    disconnect();
+    MUTEX_UNLOCK(&mutex);
+    return 0;
+  }
+
+  if (!getPacket())
+  {
+    MUTEX_UNLOCK(&mutex);
+    return 0;
+  }
+
+  ULLONG lengthBytes = extractULLONG();
+  ULONG lengthFrames = extractULONG();
+  freePacket();
+  MUTEX_UNLOCK(&mutex);
+
+  Log::getInstance()->log("VDR", Log::DEBUG, "VDR said length is: %llu %lu", lengthBytes, lengthFrames);
+
+  *totalFrames = lengthFrames;
+  return lengthBytes;
+}
diff --git a/vdr.h b/vdr.h
index c3d9f8a000bf35a9982dc25477e13706e9c0eec5..5d512e12901eddf5ef17ed977ac913146b2b97fb 100644 (file)
--- a/vdr.h
+++ b/vdr.h
@@ -38,7 +38,7 @@
 #include "channel.h"
 #include "event.h"
 #include "rectimer.h"
-#include "recman.h"
+#include "recinfo.h"
 
 using namespace std;
 
@@ -69,6 +69,7 @@ struct ServerSorter
   }
 };
 
+class RecMan;
 
 class VDR
 {
@@ -87,7 +88,6 @@ class VDR
     int connect();
     void disconnect();
     bool isConnected() { return connected; }
-    ULONG getResumePoint(char* fileName);  // uses configLoad
 
     void setReceiveWindow(size_t size);
 
@@ -99,10 +99,8 @@ class VDR
     //  getChannelSchedule
     //  getRecTimersList
     // isConnected can be called after the following to determine if still ok
-    //  getRecordingSummary
     //  deleteRecording
     //  streamRecording
-    //  rescanRecording
     //  positionFromFrameNumber
     //  streamChannel
     //  getBlock
@@ -114,11 +112,10 @@ class VDR
     int doLogin();
 
     bool       getRecordingsList(RecMan* recman);
-    char*      getRecordingSummary(char* fileName);
+    RecInfo*   getRecInfo(char* fileName);
     int        deleteRecording(char* fileName);
     char*      moveRecording(char* fileName, char* newPath);
     ULLONG     streamRecording(char* fileName, ULONG* lengthFrames);
-    ULLONG     rescanRecording(ULONG* lengthFrames);
     ULLONG     positionFromFrameNumber(ULONG frameNumber);
     ULONG      frameNumberFromPosition(ULLONG position);
     bool       getNextIFrame(ULONG frameNumber, ULONG direction, ULLONG* rfilePosition, ULONG* rframeNumber, ULONG* rframeLength);
@@ -142,6 +139,14 @@ class VDR
     const static ULONG VIDEO = 1;
     const static ULONG RADIO = 2;
 
+
+
+
+    // obselete
+    ULLONG     rescanRecording(ULONG* lengthFrames);                    // FIXME obselete
+
+
+
   private:
     static VDR* instance;
     Log* logger;
@@ -164,7 +169,6 @@ class VDR
     const static ULONG VDR_LOGIN               = 1;
     const static ULONG VDR_GETRECORDINGLIST    = 2;
     const static ULONG VDR_DELETERECORDING     = 3;
-    const static ULONG VDR_GETSUMMARY          = 4;
     const static ULONG VDR_GETCHANNELLIST      = 5;
     const static ULONG VDR_STREAMCHANNEL       = 6;
     const static ULONG VDR_GETBLOCK            = 7;
@@ -173,18 +177,20 @@ class VDR
     const static ULONG VDR_GETCHANNELSCHEDULE  = 10;
     const static ULONG VDR_CONFIGSAVE          = 11;
     const static ULONG VDR_CONFIGLOAD          = 12;
-    const static ULONG VDR_RESCANRECORDING     = 13;
+    const static ULONG VDR_RESCANRECORDING     = 13;  // FIXME obselete
     const static ULONG VDR_GETTIMERS           = 14;
     const static ULONG VDR_SETTIMER            = 15;
     const static ULONG VDR_POSFROMFRAME        = 16;
     const static ULONG VDR_FRAMEFROMPOS        = 17;
     const static ULONG VDR_MOVERECORDING       = 18;
     const static ULONG VDR_GETNEXTIFRAME       = 19;
+    const static ULONG VDR_GETRECINFO          = 20;
 
     int  getPacket();
     void freePacket();
     int  serverError();
     char*  extractString();
+    UCHAR  extractUCHAR();
     ULONG  extractULONG();
     ULLONG extractULLONG();
     long   extractLONG();
index dd6ae8d2e9e8570aabdb727b59784b5388ca4e76..ec4bcd2b4d75d56fb0386659e4554ef43356dac7 100644 (file)
@@ -296,6 +296,7 @@ int VRecordingList::doPlay()
   Recording* toPlay = getCurrentOptionRecording();
   if (toPlay)
   {
+    toPlay->loadRecInfo();
     VVideoRec* vidrec = new VVideoRec(toPlay);
     vidrec->draw();
     viewman->add(vidrec);
@@ -313,13 +314,13 @@ int VRecordingList::doResume()
 
   if (toResume)
   {
-    ULLONG position = VDR::getInstance()->getResumePoint(toResume->getFileName());
+    toResume->loadRecInfo();
 
     VVideoRec* vidrec = new VVideoRec(toResume);
     vidrec->draw();
     viewman->add(vidrec);
     viewman->updateView(vidrec);
-    vidrec->go(position);
+    vidrec->go(toResume->recInfo->resumePoint);
     return 1;
   }
 
index 6997844fd74b689d3067b9619b58b224933ac548..60880b403761763e92afe207a7938029f094cb97 100644 (file)
@@ -115,19 +115,16 @@ int VRecordingMenu::handleCommand(int command)
 
       if (sl.getCurrentOptionData() == 3)
       {
-        char* summary = VDR::getInstance()->getRecordingSummary(rec->getFileName());
-        if (!summary && !VDR::getInstance()->isConnected())
-        {
-          Command::getInstance()->connectionLost();
-          return 2;
-        }
+        rec->loadRecInfo();
 
         VInfo* vi = new VInfo();
         vi->setTitleText(tr("Programme summary"));
         vi->setBorderOn(1);
         vi->setExitable();
-        if (summary) vi->setMainText(summary);
-        else vi->setMainText(tr("Summary unavailable"));
+        if (strlen(rec->recInfo->summary))
+          vi->setMainText(rec->recInfo->summary);
+        else
+          vi->setMainText(tr("Summary unavailable"));
         if (Video::getInstance()->getFormat() == Video::PAL)
         {
           vi->setScreenPos(120, 130);
@@ -141,8 +138,6 @@ int VRecordingMenu::handleCommand(int command)
         ViewMan::getInstance()->add(vi);
         ViewMan::getInstance()->updateView(vi);
 
-        if (summary) delete[] summary;
-
         return 2;
       }
 
index bea2e337e42498133bbaff05d94e73f98b0aa41f..e506573f79c6cb962adf022d2a37d7dbeb396596 100644 (file)
@@ -26,7 +26,9 @@ VVideoRec::VVideoRec(Recording* rec)
   video = Video::getInstance();
   timers = Timers::getInstance();
 
-  player = new Player(Command::getInstance(), true, false); // say 0 for radio because buffering will work anyway
+  // TODO Work out if is a radio stream
+
+  player = new Player(Command::getInstance(), true, false);
   player->init();
 
   videoMode = video->getMode();
@@ -87,6 +89,11 @@ VVideoRec::~VVideoRec()
 
   timers->cancelTimer(this, 1);
   timers->cancelTimer(this, 2);
+
+  // kill recInfo in case resumePoint has changed (likely)
+  myRec->dropRecInfo();
+  // FIXME - do this properly - save the resume point back to the server manually and update
+  // rec->recInfo->resumePoint - this will fix the ~10s offset problem as well
 }
 
 void VVideoRec::draw()
@@ -220,13 +227,6 @@ int VVideoRec::handleCommand(int command)
       return 2;
     }
 
-
-//    case Remote::REVERSE:
-//    {
-//      player->toggleFastBackward();
-//      return 2;
-//    }
-
     case Remote::ZERO:  player->jumpToPercent(0);  doBar(0);  return 2;
     case Remote::ONE:   player->jumpToPercent(10); doBar(0);  return 2;
     case Remote::TWO:   player->jumpToPercent(20); doBar(0);  return 2;