From ffbacdb62b253c8d3a1199bdd4cdc5a92ddd63fa Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 12 Nov 2006 23:16:40 +0000 Subject: [PATCH] *** empty log message *** --- voptionsmenu.cc | 10 ++++++---- vvideolive.cc | 28 ++++++++++++++++++++-------- vvideolive.h | 1 + vvideorec.cc | 37 ++++++++++++++++++++++++++----------- vvideorec.h | 1 + 5 files changed, 54 insertions(+), 23 deletions(-) diff --git a/voptionsmenu.cc b/voptionsmenu.cc index 0639347..0b8f040 100644 --- a/voptionsmenu.cc +++ b/voptionsmenu.cc @@ -143,7 +143,7 @@ void VOptionsMenu::processMessage(Message* m) if (m->message == Message::CHANGED_OPTIONS) { doApplyChanges((map*)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 diff --git a/vvideolive.cc b/vvideolive.cc index e515664..8bd9fdd 100644 --- a/vvideolive.cc +++ b/vvideolive.cc @@ -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; } } diff --git a/vvideolive.h b/vvideolive.h index da90bfd..efb4e94 100644 --- a/vvideolive.h +++ b/vvideolive.h @@ -97,6 +97,7 @@ class VVideoLive : public View Wwss wss; Region wssRegion; + bool dowss; }; #endif diff --git a/vvideorec.cc b/vvideorec.cc index d9b3b23..621163b 100644 --- a/vvideorec.cc +++ b/vvideorec.cc @@ -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; diff --git a/vvideorec.h b/vvideorec.h index 15f619c..bebf4e9 100644 --- a/vvideorec.h +++ b/vvideorec.h @@ -81,6 +81,7 @@ class VVideoRec : public View, public TimerReceiver Wwss wss; Region wssRegion; + bool dowss; }; #endif -- 2.39.5