]> git.vomp.tv Git - vompclient.git/commitdiff
*** empty log message ***
authorChris Tallon <chris@vomp.tv>
Sun, 12 Nov 2006 23:16:40 +0000 (23:16 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 12 Nov 2006 23:16:40 +0000 (23:16 +0000)
voptionsmenu.cc
vvideolive.cc
vvideolive.h
vvideorec.cc
vvideorec.h

index 0639347eff7bb8110bd2fcc4ce4a70b937be6e7e..0b8f04066a3f371d2d19547bdf73441337180f59 100644 (file)
@@ -143,7 +143,7 @@ void VOptionsMenu::processMessage(Message* m)
   if (m->message == Message::CHANGED_OPTIONS)
   {
     doApplyChanges((map<int,int>*)m->parameter);
-    viewman->removeView(this);
+    //viewman->removeView(this);
 
     if (!VDR::getInstance()->isConnected()) Command::getInstance()->connectionLost();
   }
@@ -283,7 +283,7 @@ void VOptionsMenu::doTimers()
 
   const static OPTIONDATA optionData[numOptions] =
   {
-    {9, "Default start margin (minutes)", "Timers", "Start margin",  OPTIONTYPE_INT, 20, 5, 0, NULL },
+    {9, "Default start margin (minutes)",  "Timers", "Start margin",  OPTIONTYPE_INT, 20, 5, 0, NULL },
     {10, "Default end margin (minutes)",   "Timers", "End margin",    OPTIONTYPE_INT, 20, 5, 0, NULL },
     {11, "Default priority",               "Timers", "Priority",      OPTIONTYPE_INT, 100, 99, 0, NULL },
     {12, "Default lifetime",               "Timers", "Lifetime",      OPTIONTYPE_INT, 100, 99, 0, NULL },
@@ -300,14 +300,16 @@ void VOptionsMenu::doTimers()
 
 void VOptionsMenu::doAdvanced()
 {
-  static const int numOptions = 2;
+  static const int numOptions = 3;
 
   static const char* options13[] = {"1024", "2048", "4096", "8192", "16384", "32768", "65536"};
+  static const char* options14[] = {"No", "Yes"};
 
   const static OPTIONDATA optionData[numOptions] =
   {
     {8, "VDR-Pri 0=OK !See forums!",  "General",  "Live priority",      OPTIONTYPE_INT,  100, 0, 0, NULL },
-    {13, "TCP receive window size",   "Advanced", "TCP receive window", OPTIONTYPE_TEXT, 7, 1, 0, options13 }
+    {13, "TCP receive window size",   "Advanced", "TCP receive window", OPTIONTYPE_TEXT, 7, 1, 0, options13 },
+    {14, "Use WSS (PAL only)",        "General",  "WSS",                OPTIONTYPE_TEXT, 2, 0, 0, options14 }
   };
 
   // As all the above data is const static, it can be sent to the new View, this stack frame can
index e5156645d0711a720649f00f0aeb203d8a7c7c61..8bd9fddeea2fb03eaa1d61ab01b24d3b95772762 100644 (file)
@@ -46,6 +46,12 @@ VVideoLive::VVideoLive(ChannelList* tchanList, ULONG tstreamType, VChannelList*
   Colour transparent(0, 0, 0, 0);
   setBackgroundColour(transparent);
 
+  char* optionWSS = vdr->configLoad("General", "WSS");
+  if (strstr(optionWSS, "Yes")) dowss = true;
+  else dowss = false;
+  Log::getInstance()->log("VVideoLive", Log::DEBUG, "Do WSS: %u", dowss);
+  delete[] optionWSS;
+
   wss.setSurface(surface);
   wss.setWide(true);
 
@@ -276,18 +282,24 @@ void VVideoLive::processMessage(Message* m)
       }
       case Player::ASPECT43:
       {
-        Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 43");
-        wss.setWide(false);
-        wss.draw();
-        ViewMan::getInstance()->updateView(this, &wssRegion);
+        if (dowss)
+        {
+          Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 43");
+          wss.setWide(false);
+          wss.draw();
+          ViewMan::getInstance()->updateView(this, &wssRegion);
+        }
         break;
       }
       case Player::ASPECT169:
       {
-        Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 169");
-        wss.setWide(true);
-        wss.draw();
-        ViewMan::getInstance()->updateView(this, &wssRegion);
+        if (dowss)
+        {
+          Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 169");
+          wss.setWide(true);
+          wss.draw();
+          ViewMan::getInstance()->updateView(this, &wssRegion);
+        }
         break;
       }
     }
index da90bfda4c55985cc137f87bfbea94384aa778d5..efb4e94fc32b083c0b1e10502e37df9d1ddd5fb1 100644 (file)
@@ -97,6 +97,7 @@ class VVideoLive : public View
 
     Wwss wss;
     Region wssRegion;
+    bool dowss;
 };
 
 #endif
index d9b3b2326e09b583a021dfa5115f6499a3bcb39a..621163b7132ba22fbd681d3e1ab9b186f35a21e6 100644 (file)
@@ -84,6 +84,12 @@ VVideoRec::VVideoRec(Recording* rec)
   barShowing = false;
   stickyBar = false;
 
+  char* optionWSS = vdr->configLoad("General", "WSS");
+  if (strstr(optionWSS, "Yes")) dowss = true;
+  else dowss = false;
+  Log::getInstance()->log("VVideoRec", Log::DEBUG, "Do WSS: %u", dowss);
+  delete[] optionWSS;
+
   wss.setSurface(surface);
   wss.setWide(true);
 
@@ -127,8 +133,8 @@ void VVideoRec::go(bool resume)
   {
     doBar(0);
     player->setLengthBytes(lengthBytes);
-    player->setLengthFrames(lengthFrames);
-    player->setStartFrame(startFrameNum);
+    if (!isRadio) player->setLengthFrames(lengthFrames);
+    player->setStartFrame(startFrameNum); // means bytes if radio (FIXME not done yet!)
     player->play();
     playing = true;
   }
@@ -208,12 +214,14 @@ int VVideoRec::handleCommand(int command)
     }
     case Remote::FORWARD:
     {
+      if (isRadio) return 2;
       player->fastForward();
       doBar(0);
       return 2;
     }
     case Remote::REVERSE:
     {
+      if (isRadio) return 2;
       player->fastBackward();
       doBar(0);
       return 2;
@@ -233,6 +241,7 @@ int VVideoRec::handleCommand(int command)
     case Remote::FULL:
     case Remote::TV:
     {
+      if (isRadio) return 2;
       toggleChopSides();
       return 2;
     }
@@ -314,18 +323,24 @@ void VVideoRec::processMessage(Message* m)
     }
     case Player::ASPECT43:
     {
-      Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 43");
-      wss.setWide(false);
-      wss.draw();
-      ViewMan::getInstance()->updateView(this, &wssRegion);
+      if (dowss)
+      {
+        Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 43");
+        wss.setWide(false);
+        wss.draw();
+        ViewMan::getInstance()->updateView(this, &wssRegion);
+      }
       break;
     }
     case Player::ASPECT169:
     {
-      Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 169");
-      wss.setWide(true);
-      wss.draw();
-      ViewMan::getInstance()->updateView(this, &wssRegion);
+      if (dowss)
+      {
+        Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 169");
+        wss.setWide(true);
+        wss.draw();
+        ViewMan::getInstance()->updateView(this, &wssRegion);
+      }
       break;
     }
   }
@@ -546,7 +561,7 @@ void VVideoRec::drawBarClocks()
   rectangle(barRegion.x + progBarXbase + 2, barRegion.y + 14, 306, 20, barBlue);
 
   if (currentFrameNum > lengthFrames) return;
-
+  if (lengthFrames == 0) return;
 
   // Draw yellow portion
   int progressWidth = 302 * currentFrameNum / lengthFrames;
index 15f619c94ee34251071643f5d98ed046c1edb109..bebf4e9c83967e2b110acb8f65d49d5c8db9ddc3 100644 (file)
@@ -81,6 +81,7 @@ class VVideoRec : public View, public TimerReceiver
 
     Wwss wss;
     Region wssRegion;
+    bool dowss;
 };
 
 #endif