From a6d2e66a59cc40521d1aca4c17f5f91ad954a233 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Tue, 17 Jan 2017 16:45:56 +0000 Subject: [PATCH] A much cleaner patch for enabling MVP again --- colour.cc | 1 + colour.h | 1 + command.cc | 2 ++ defines.h | 3 +++ objects.mk | 2 +- vmedialist.cc | 14 +++++++------- vmediaview.cc | 12 ++++++------ vvideomedia.cc | 12 ++++++------ 8 files changed, 27 insertions(+), 20 deletions(-) diff --git a/colour.cc b/colour.cc index 5ee9baa..eff30ed 100644 --- 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); diff --git a/colour.h b/colour.h index b99b5eb..0224cd4 100644 --- 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; diff --git a/command.cc b/command.cc index 7a2b11f..8ad5c76 100644 --- a/command.cc +++ b/command.cc @@ -56,6 +56,8 @@ #include "log.h" #include "vsleeptimer.h" #include "wjpeg.h" +#include "osdvector.h" + Command* Command::instance = NULL; diff --git a/defines.h b/defines.h index 6d12315..eb507c6 100644 --- 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 diff --git a/objects.mk b/objects.mk index e47642a..3078064 100644 --- a/objects.mk +++ b/objects.mk @@ -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 \ diff --git a/vmedialist.cc b/vmedialist.cc index d454612..a104e3a 100644 --- a/vmedialist.cc +++ b/vmedialist.cc @@ -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); } } diff --git a/vmediaview.cc b/vmediaview.cc index 3745f7f..ef380ae 100644 --- a/vmediaview.cc +++ b/vmediaview.cc @@ -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); } diff --git a/vvideomedia.cc b/vvideomedia.cc index 02a1485..5ec7882 100644 --- a/vvideomedia.cc +++ b/vvideomedia.cc @@ -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); } -- 2.39.5