]> git.vomp.tv Git - vompclient.git/commitdiff
Hack/fix video mode switching on MVP
authorChris Tallon <chris@vomp.tv>
Thu, 9 Feb 2017 21:39:15 +0000 (21:39 +0000)
committerChris Tallon <chris@vomp.tv>
Thu, 9 Feb 2017 21:39:15 +0000 (21:39 +0000)
GNUmakefile
message.h
vepg.cc
video.cc
videomvp.cc
vvideolivetv.cc

index 7251d23c1cc8f8717de97dbac90c3a8211842abe..55d7829900836f8208094cd0b67adc49ea04bd70 100644 (file)
@@ -142,10 +142,10 @@ install-dev:
        cp vompclient target-mvp-dev/vompclient
 
 debug:
-       ../../gdb/gdb-6.7/gdb/gdb target-mvp/vompclient target-mvp/core.*
+       ../../gdb/gdb-7.12.1/gdb/gdb target-mvp/vompclient target-mvp/core.*
 
 debug2:
-       ../../gdb/gdb-6.7/gdb/gdb target-mvp-dev/vompclient target-mvp-dev/core.*
+       ../../gdb/gdb-7.12.1/gdb/gdb target-mvp-dev/vompclient target-mvp-dev/core.*
 
 dev: CXXFLAGS := $(CXXFLAGS_DEV)
 dev: vompclient
index 799e50597d589223c5a66e9fdd54fbf149b92bed..ccddee02c994d3d3f521c5cad44a07e31de48b9b 100644 (file)
--- a/message.h
+++ b/message.h
@@ -82,6 +82,8 @@ class Message
     const static ULONG MOUSE_SCROLL = 35;
     const static ULONG NEW_PICTURE = 36;
     const static ULONG NEW_PICTURE_STATIC = 37;
+
+    const static ULONG HACK_MVP_RETURN_FROM_QUARTER = 999;
 };
 
 #endif
diff --git a/vepg.cc b/vepg.cc
index dac571d27a6471dfdda2221c3395058bf8cd2657..bd5e4e7040cc6646eb5b6b2160a8404bf5497488 100644 (file)
--- a/vepg.cc
+++ b/vepg.cc
@@ -465,6 +465,34 @@ int VEpg::handleCommand(int command)
     case Remote::BACK:
     case Remote::GUIDE:
     {
+
+#ifdef VOMP_PLATTFORM_MVP
+/*
+new video modes system doesn't work properly on MVP
+It seems to always set wanted mode to 1 which is "full screen"
+but translates to Video::LETERBOX on MVP
+
+Mode 0 in new system is "None", but is Video::NORMAL for MVP
+
+VideoMVP::setMode(LETTERBOX) while in 16x9 mode is invalid
+
+Anyway, bool Video::setVideoDisplay(VideoDisplay display) calls with Video::mode
+not applyMode, so wouldn't work for two reasons
+
+VVideoLiveTV has the memory of what mode, NORMAL / LETTERBOX we were in before
+we went to QUARTER. Hack this in to get a message there.
+*/
+
+      if (parent) // ptr check done in case being tested from videorec
+      {
+        Message* m = new Message(); // Must be done after this view deleted
+        m->from = this;
+        m->to = parent;
+        m->message = Message::HACK_MVP_RETURN_FROM_QUARTER;
+        Command::getInstance()->postMessageNoLock(m);
+      }
+#endif
+
       return 4;
     }
     case Remote::CHANNELUP:
index 5ab633081302d8dece58598ecc1ef6dda519f1db..8f8d5f61a8ea8b6db42e8bc68170a5060833c508 100644 (file)
--- a/video.cc
+++ b/video.cc
@@ -63,7 +63,10 @@ bool Video::setVideoDisplay(VideoDisplay display)
        }
        switch (applyMode) {
        case Fullscreen: {
+#ifndef VOMP_PLATTFORM_MVP
+          // Can't run this on a MVP. See vepg.cc ~ line 480
                setMode(mode);
+#endif
        } break;
        case Quarter: {
                setMode(QUARTER);
index 460fe4630c366f656ca61f42fdcfdd94d8859df1..0eead37e2177bf51829295f4ec41565e1dea2f57 100644 (file)
@@ -170,8 +170,7 @@ int VideoMVP::setMode(UCHAR tmode)
 
   if ((tmode != NORMAL) && (tmode != LETTERBOX) && (tmode != UNKNOWN2) && (tmode != QUARTER) && (tmode != EIGHTH)
       && (tmode != ZOOM) && (tmode != UNKNOWN6)) return 0;
-  if (tmode==NORMAL || tmode == LETTERBOX) mode = tmode;
-
+  if (tmode==NORMAL || tmode == LETTERBOX || tmode == QUARTER) mode = tmode;
   if (ioctl(fdVideo, AV_SET_VID_MODE, mode) != 0) return 0;
   return 1;
 }
index 32dda9b0e0b8b9975c9098a818508ef331d899cb..3055f6849fb9135e362a1afa908892e194b6644c 100644 (file)
@@ -1215,6 +1215,13 @@ void VVideoLiveTV::processMessage(Message* m)
       }
     }
   }
+#ifdef VOMP_PLATTFORM_MVP
+// See vepg.cc ~ line 480
+  else if (m->message == Message::HACK_MVP_RETURN_FROM_QUARTER)
+  {
+    video->setMode(videoMode);
+  }
+#endif
 }
 
 void VVideoLiveTV::doAudioChannelSymbol()