]> git.vomp.tv Git - vompclient.git/commitdiff
A much cleaner patch for enabling MVP again
authorChris Tallon <chris@vomp.tv>
Tue, 17 Jan 2017 16:45:56 +0000 (16:45 +0000)
committerChris Tallon <chris@vomp.tv>
Tue, 17 Jan 2017 16:51:55 +0000 (16:51 +0000)
colour.cc
colour.h
command.cc
defines.h
objects.mk
vmedialist.cc
vmediaview.cc
vvideomedia.cc

index 5ee9baa3fd0711af4a4c406fcd37b3ed068de326..eff30ed1f087a8eb6691418d3c6b71dc58c7b1d4 100644 (file)
--- a/colour.cc
+++ b/colour.cc
@@ -28,6 +28,7 @@ DrawStyle DrawStyle::GREY(180, 180, 180);
 DrawStyle DrawStyle::DARKGREY(100, 100, 100);
 DrawStyle DrawStyle::BLUE(0, 0, 255);
 DrawStyle DrawStyle::YELLOW(255, 255, 0);
+DrawStyle DrawStyle::VIDEOBLUE(0, 0, 150);
 DrawStyle DrawStyle::VIEWBACKGROUND(0, 0, 100);
 DrawStyle DrawStyle::VIEWTRANSPARENTBACKGROUND(0, 0, 100, 128);
 DrawStyle DrawStyle::TABVIEWBACKGROUND(0, 0, 120);
index b99b5ebcf5abcbdc4a6c2fb8482f7f0d7b83ab1b..0224cd476922a0ea881fca56a37758238e518d3e 100644 (file)
--- a/colour.h
+++ b/colour.h
@@ -116,6 +116,7 @@ public:
     static DrawStyle BLUE;
     static DrawStyle GREY;
     static DrawStyle DARKGREY;
+    static DrawStyle VIDEOBLUE;
     static DrawStyle VIEWBACKGROUND;
     static DrawStyle VIEWTRANSPARENTBACKGROUND;
     static DrawStyle LIVETVSYMBOLS;
index 7a2b11f18ad5a6354884cceb70fb4a37de8e1c2f..8ad5c769229c94b6dd20a40196821e4857b255fb 100644 (file)
@@ -56,6 +56,8 @@
 #include "log.h"
 #include "vsleeptimer.h"
 #include "wjpeg.h"
+#include "osdvector.h"
+
 
 Command* Command::instance = NULL;
 
index 6d12315db9de0656fda6ccfd716ff6261ad2195c..eb507c6ca06073440dd30bbd2b761bfc4b0f6112 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -167,6 +167,9 @@ int getClockRealTime(struct timespec *tp);
 
   #define VOMP_MEDIAPLAYER
   #define VOMP_LINUX_CLOCK  CLOCK_REALTIME
+
+  #define VectorHandle void*
+
 #endif
 
 #ifdef VOMP_PLATTFORM_NMT // This was the attempt to port vomp to nmt, it failed but maybe the code is useful at some time
index e47642ab7d8e45352bb0eadf2753bc749b1498ec..30780645da7b1fa904664e6b86b01334e6dca1da 100644 (file)
@@ -13,7 +13,7 @@ OBJECTS1 = command.o  tcp.o dsock.o thread.o timers.o i18n.o       \
            vradiorec.o vaudioselector.o vscreensaver.o vopts.o                   \
            wselectlist.o wjpeg.o wsymbol.o wbutton.o wtextbox.o           \
            woptionpane.o woptionbox.o wremoteconfig.o wtabbar.o                  \
-           remote.o led.o mtd.o  osd.o surface.o                  \
+           remote.o led.o mtd.o  osd.o osdvector.o surface.o surfacevector.o     \
             vpicturebanner.o                                 \
             abstractoption.o                         \
            eventdispatcher.o vdrrequestpacket.o vdrresponsepacket.o              \
index d454612eedf0253e59a9ec9c43c63a2edf5611a8..a104e3a3d8ee613aaca1ace52c92f344f7d2846a 100644 (file)
@@ -1068,7 +1068,7 @@ void VMediaList::processMessage(Message* m)
 {
   if (m->message == Message::MOUSE_MOVE)
   {
-    if (sl.mouseMove((m->parameter>>16)-getScreenX(),(m->parameter&0xFFFF)-getScreenY()))
+    if (sl.mouseMove((m->parameter.num>>16)-getScreenX(),(m->parameter.num&0xFFFF)-getScreenY()))
     {
       sl.draw();
       doShowingBar();
@@ -1078,15 +1078,15 @@ void VMediaList::processMessage(Message* m)
   }
   else if (m->message == Message::MOUSE_LBDOWN)
   {
-    if (sl.mouseLBDOWN((m->parameter>>16)-getScreenX(),(m->parameter&0xFFFF)-getScreenY()))
+    if (sl.mouseLBDOWN((m->parameter.num>>16)-getScreenX(),(m->parameter.num&0xFFFF)-getScreenY()))
     {
       updateSelection();
       boxstack->handleCommand(Remote::OK); //simulate OK press
     }
     else
     { //check if press is outside this view! then simulate cancel
-      int x=(m->parameter>>16)-getScreenX();
-      int y=(m->parameter&0xFFFF)-getScreenY();
+      int x=(m->parameter.num>>16)-getScreenX();
+      int y=(m->parameter.num&0xFFFF)-getScreenY();
       if (x<0 || y <0 || x>(int)getWidth() || y>(int)getHeight())
       {
         boxstack->handleCommand(Remote::BACK); //simulate cancel press
@@ -1094,7 +1094,7 @@ void VMediaList::processMessage(Message* m)
     }
   }
   else if (m->message == Message::PLAYER_EVENT) {
-    switch (m->parameter) {
+    switch (m->parameter.num) {
       case 1:
         directoryDone();
         break;
@@ -1186,7 +1186,7 @@ int VMediaList::load() {
     Message* m = new Message();
     m->message = Message::ADD_VIEW;
     m->to = boxstack;
-    m->parameter = (ULONG)vi;
+    m->parameter.num = (ULONG)vi;
     Command::getInstance()->postMessageNoLock(m);
   }
   return 1;
@@ -1205,7 +1205,7 @@ void VMediaList::timercall(int ref) {
     Message* m = new Message();
     m->message = Message::PLAYER_EVENT;
     m->to = this;
-    m->parameter = ref;
+    m->parameter.num = ref;
     Command::getInstance()->postMessageFromOuterSpace(m);
   }
 }
index 3745f7fa9c526b2047b0e492683d8754389a3b3a..ef380ae346f2800178177b7ea0d09eb12f40718d 100644 (file)
@@ -221,7 +221,7 @@ class DrawingThread : public Thread_TYPE {
         m->message = Message::PLAYER_EVENT;
         m->to = _parent;
         m->from = _parent;
-        m->parameter= rt?VMediaView::EVENT_DRAWINGDONE:VMediaView::EVENT_DRAWINGERROR;
+        m->parameter.num = rt?VMediaView::EVENT_DRAWINGDONE:VMediaView::EVENT_DRAWINGERROR;
         Command::getInstance()->postMessageFromOuterSpace(m);
       }
       Log::getInstance()->log("DrawingThread",Log::DEBUG,"finishing interrupt=%d",(int)_interrupted);
@@ -711,15 +711,15 @@ void VMediaView::processMessage(Message* m)
   {
     
     //check if press is outside this view! then simulate cancel
-    int x=(m->parameter>>16)-getScreenX();
-    int y=(m->parameter&0xFFFF)-getScreenY();
+    int x=(m->parameter.num>>16)-getScreenX();
+    int y=(m->parameter.num&0xFFFF)-getScreenY();
     if (x<0 || y <0 || x>(int)getWidth() || y>(int)getHeight())
     {
       BoxStack::getInstance()->handleCommand(Remote::BACK); //simulate cancel press
     }
   }
   else if (m->message = Message::PLAYER_EVENT) {
-    switch (m->parameter) {
+    switch (m->parameter.num) {
       case EVENT_SLIDESHOW:
         if (! pictureEnabled) break; //old timer msg...
         //if (! audioEnabled) {
@@ -1084,7 +1084,7 @@ void VMediaView::sendViewMsg(Boxx *v) {
   m->message = Message::CLOSE_ME;
   m->to = BoxStack::getInstance();
   m->from = v;
-  m->parameter=(ULONG)v;
+  m->parameter.num=(ULONG)v;
   Command::getInstance()->postMessageFromOuterSpace(m);
 }
 void VMediaView::sendCommandMsg(int command) {
@@ -1093,7 +1093,7 @@ void VMediaView::sendCommandMsg(int command) {
   m->message = Message::PLAYER_EVENT;
   m->to = this;
   m->from = this;
-  m->parameter= command;
+  m->parameter.num = command;
   Command::getInstance()->postMessageFromOuterSpace(m);
 }
 
index 02a14858c5dd5dc468486b2c62281a54300b845c..5ec78829dbaee49b1808f7e25ddc3d1d4dd3055f 100644 (file)
@@ -193,7 +193,7 @@ void VVideoMedia::go(bool resume)
     m = new Message();
     m->message = Message::ADD_VIEW;
     m->to = boxstack;
-    m->parameter = (ULONG)vi;
+    m->parameter.num = (ULONG)vi;
     Command::getInstance()->postMessageNoLock(m);
   }
 }
@@ -335,8 +335,8 @@ void VVideoMedia::processMessage(Message* m)
 
   if (m->message == Message::MOUSE_LBDOWN)
   {
-    UINT x = (m->parameter>>16) - getScreenX();
-    UINT y = (m->parameter&0xFFFF) - getScreenY();
+    UINT x = (m->parameter.num>>16) - getScreenX();
+    UINT y = (m->parameter.num&0xFFFF) - getScreenY();
 
     if (!barShowing)
     {
@@ -366,7 +366,7 @@ void VVideoMedia::processMessage(Message* m)
   }
   else if (m->message == Message::PLAYER_EVENT)
   {
-    switch(m->parameter)
+    switch(m->parameter.num)
     {
       case PlayerMedia::CONNECTION_LOST: // connection lost detected
       {
@@ -429,7 +429,7 @@ void VVideoMedia::processMessage(Message* m)
   else if (m->message == Message::AUDIO_CHANGE_CHANNEL)
   {
     Log::getInstance()->log("VVideoMedia", Log::DEBUG, "Received change audio channel to %i", m->parameter);
-    player->setAudioChannel(m->parameter);
+    player->setAudioChannel(m->parameter.num);
   }
   else if (m->message == Message::CHILD_CLOSE)
   {
@@ -584,7 +584,7 @@ void VVideoMedia::timercall(int clientReference)
   m->message=Message::PLAYER_EVENT;
   m->to=this;
   m->from=this;
-  m->parameter=PLAYER_TIMER_BASE+clientReference;
+  m->parameter.num=PLAYER_TIMER_BASE+clientReference;
   Command::getInstance()->postMessageFromOuterSpace(m);
 }