From e1b1b6068a066263bb593162d84e57e8e5abbfb2 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 25 Sep 2016 20:48:43 +0100 Subject: [PATCH] Some nasty hacks to support MVP --- boxx.cc | 50 ++++++++++++++++++------------ colour.cc | 1 + colour.h | 1 + command.cc | 23 +++++++++----- defines.h | 5 +++ vchannellist.cc | 9 ++++++ vdr.cc | 9 ++++-- vepgsummary.cc | 9 ++++++ vmedialist.cc | 14 ++++----- vmediaview.cc | 12 ++++---- vrecording.cc | 14 +++++++-- vvideolivetv.cc | 81 ++++++++++++++++++++++++++++++++++++++++++------- vvideomedia.cc | 12 ++++---- vvideorec.cc | 6 ++++ 14 files changed, 184 insertions(+), 62 deletions(-) diff --git a/boxx.cc b/boxx.cc index e775ea8..4e13be8 100644 --- a/boxx.cc +++ b/boxx.cc @@ -307,10 +307,12 @@ int Boxx::drawPara(const char* text, int x, int y, const DrawStyle& colour,unsig bool mchar=false; Osd *osd=Osd::getInstance(); if (osd->charSet()!=1) mchar=true; - OsdVector *osdv=dynamic_cast(osd); float *charwidtharray=NULL; +#ifndef VOMP_PLATTFORM_MVP +// OSDV + OsdVector *osdv=dynamic_cast(osd); if (osdv) charwidtharray=osdv->getCharWidthArray(); - +#endif mbstate_t state; memset((void*)&state,0,sizeof(state)); @@ -349,14 +351,16 @@ int Boxx::drawPara(const char* text, int x, int y, const DrawStyle& colour,unsig printLine = 1; break; } + +#ifndef VOMP_PLATTFORM_MVP +// OSDV if (charwidtharray) { thisCharWidth=charwidtharray[cur_char & 0xFF]; if (cur_char && 0xFFFFFF00) thisCharWidth=osdv->getCharWidth(cur_char); } else thisCharWidth = charWidth(cur_char); - - - - +#else + thisCharWidth = charWidth(cur_char); +#endif if ((lineWidth + thisCharWidth + x) > tester.w) { @@ -509,23 +513,31 @@ void Boxx::drawMonoBitmap(UCHAR*base, int dx, int dy, unsigned int height,unsign void Boxx::drawTVMedia(TVMediaInfo & tvmedia,float x, float y, float width, float height, Corner corner) { - if (parent) parent->drawTVMedia(tvmedia,area.x + x,area.y + y,width, height, corner); - else if (surface) { - SurfaceVector * surfacevector=dynamic_cast(surface); - if (surfacevector) surfacevector->drawTVMedia(tvmedia,x, y,width, height, corner); - else surface->fillblt(x, y, width, height, DrawStyle::RED); // Signal that something went wrong - } - + if (parent) parent->drawTVMedia(tvmedia,area.x + x,area.y + y,width, height, corner); + else if (surface) + { +#ifndef VOMP_PLATTFORM_MVP +// OSDV + SurfaceVector * surfacevector=dynamic_cast(surface); + if (surfacevector) surfacevector->drawTVMedia(tvmedia,x, y,width, height, corner); + else surface->fillblt(x, y, width, height, DrawStyle::RED); // Signal that something went wrong +#else + surface->fillblt(x, y, width, height, DrawStyle::RED); // Signal that something went wrong +#endif + } } void Boxx::drawClippingRectangle(float x, float y, float w, float h) { - if (parent) parent->drawClippingRectangle(area.x + x, area.y + y, w, h); - else if (surface) { - SurfaceVector * surfacevector=dynamic_cast(surface); - if (surfacevector) surfacevector->drawClippingRectangle(x, y, w, h); - - } + if (parent) parent->drawClippingRectangle(area.x + x, area.y + y, w, h); + else if (surface) + { +#ifndef VOMP_PLATTFORM_MVP +// OSDV + SurfaceVector * surfacevector=dynamic_cast(surface); + if (surfacevector) surfacevector->drawClippingRectangle(x, y, w, h); +#endif + } } int Boxx::getFontHeight() 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..fcf3f08 100644 --- a/command.cc +++ b/command.cc @@ -56,6 +56,7 @@ #include "log.h" #include "vsleeptimer.h" #include "wjpeg.h" +#include "osdvector.h" Command* Command::instance = NULL; @@ -181,13 +182,15 @@ void Command::doWallpaper() boxstack->add(wallpaper); boxstack->update(wallpaper); - OsdVector* osdv=dynamic_cast(Osd::getInstance()); - if (osdv) - { - osdv->updateBackgroundColor(DrawStyle::WALLPAPER); - } - +#ifndef VOMP_PLATTFORM_MVP +// OSDV + OsdVector* osdv=dynamic_cast(Osd::getInstance()); + if (osdv) + { + osdv->updateBackgroundColor(DrawStyle::WALLPAPER); + } +#endif } @@ -521,21 +524,25 @@ void Command::processMessage(Message* m) } case Message::NEW_PICTURE: { +#ifndef VOMP_PLATTFORM_MVP +// OSDV //Log::getInstance()->log("Command", Log::DEBUG, "TVMedia NEW_PICTURE"); OsdVector *osdv=dynamic_cast(Osd::getInstance()); if (osdv) { osdv->informPicture(m->tag,m->parameter.handle); } - +#endif } break; case Message::NEW_PICTURE_STATIC: { +#ifndef VOMP_PLATTFORM_MVP +// OSDV //Log::getInstance()->log("Command", Log::DEBUG, "TVMedia NEW_PICTURE %x %x",m->tag,m->parameter.num); OsdVector *osdv=dynamic_cast(Osd::getInstance()); if (osdv) { osdv->informPicture(((unsigned long long)m->tag)<<32LL,m->parameter.handle); } - +#endif } break; } } diff --git a/defines.h b/defines.h index 6d12315..54d0f12 100644 --- a/defines.h +++ b/defines.h @@ -167,6 +167,11 @@ int getClockRealTime(struct timespec *tp); #define VOMP_MEDIAPLAYER #define VOMP_LINUX_CLOCK CLOCK_REALTIME + + + // ? Assume not used for MVP. + #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/vchannellist.cc b/vchannellist.cc index d16d7cf..e99bdd5 100644 --- a/vchannellist.cc +++ b/vchannellist.cc @@ -89,10 +89,16 @@ VChannelList::~VChannelList() void VChannelList::setList(ChannelList* tlist) { char str[500]; +#ifndef VOMP_PLATTFORM_MVP +// OSDV OsdVector *osdv=dynamic_cast(Osd::getInstance()); +#endif sl.addColumn(0); +#ifndef VOMP_PLATTFORM_MVP +// OSDV if (osdv) sl.addColumn(20); +#endif sl.addColumn(60); chanList = tlist; @@ -107,12 +113,15 @@ void VChannelList::setList(ChannelList* tlist) chan = (*chanList)[i]; sprintf(str, "%lu\t%s", chan->number, chan->name); TVMediaInfo *info=NULL; +#ifndef VOMP_PLATTFORM_MVP +// OSDV if (osdv) { info= new TVMediaInfo(); info->setChannelLogo((*chanList)[i]->number); if (type == VDR::VIDEO) info->setStaticFallback(sa_tv); else info->setStaticFallback(sa_radio); } +#endif chan->index = sl.addOption(str, (ULONG)chan, first, info); first = 0; } diff --git a/vdr.cc b/vdr.cc index ee19f82..1e5451d 100644 --- a/vdr.cc +++ b/vdr.cc @@ -623,9 +623,12 @@ bool VDR_PacketReceiver::call(void* userTag, bool & deleteme) // It's TVMedia VDR_ResponsePacket* vresp = (VDR_ResponsePacket*)userTag; Log::getInstance()->log("VDR", Log::DEBUG, "TVMedia Pictures arrived VDR %x",vresp->getStreamID()); - OsdVector *osd=dynamic_cast(Osd::getInstance()); - if (osd) osd->getPictReader()->receivePicture(vresp); - else delete vresp; //nonsense +#ifndef VOMP_PLATTFORM_MVP +// OSDV + OsdVector *osd=dynamic_cast(Osd::getInstance()); + if (osd) osd->getPictReader()->receivePicture(vresp); +#endif + delete vresp; deleteme=false; return true; } diff --git a/vepgsummary.cc b/vepgsummary.cc index b60aa32..b2206ad 100644 --- a/vepgsummary.cc +++ b/vepgsummary.cc @@ -85,7 +85,10 @@ VEpgSummary::VEpgSummary(Event *tevent, Channel* tchannel) std::string summary_text = std::string(event->subtitle)+ "\n" +std::string(event->description); summary->setText(summary_text.c_str()); +#ifndef VOMP_PLATTFORM_MVP +// OSDV OsdVector *osdv=dynamic_cast(Osd::getInstance()); +#endif summary->setBackgroundColour(DrawStyle::VIEWTRANSPARENTBACKGROUND); tabbar.addTab(tr("EPG"), summary); @@ -97,6 +100,8 @@ VEpgSummary::VEpgSummary(Event *tevent, Channel* tchannel) movieview->setParaMode(true); movieview->setBackgroundColour(DrawStyle::VIEWTRANSPARENTBACKGROUND); tabbar.addTab(tr("TheTVDB Info"), movieview); +#ifndef VOMP_PLATTFORM_MVP +// OSDV if (osdv) { if (event->movieInfo->actors.size() > 0 && osdv) { @@ -108,11 +113,14 @@ VEpgSummary::VEpgSummary(Event *tevent, Channel* tchannel) artgallery->setBackgroundColour(DrawStyle::VIEWTRANSPARENTBACKGROUND); tabbar.addTab(tr("Gallery"),artgallery); } +#endif } else if (event->seriesInfo) { seriesview = new WSeriesView(event->seriesInfo); seriesview->setParaMode(true); seriesview->setBackgroundColour(DrawStyle::VIEWTRANSPARENTBACKGROUND); tabbar.addTab(tr("TheTVDB Info"), seriesview); +#ifndef VOMP_PLATTFORM_MVP +// OSDV if (osdv) { if (event->seriesInfo->actors.size() > 0 && osdv) { @@ -124,6 +132,7 @@ VEpgSummary::VEpgSummary(Event *tevent, Channel* tchannel) artgallery->setBackgroundColour(DrawStyle::VIEWTRANSPARENTBACKGROUND); tabbar.addTab(tr("Gallery"),artgallery); } +#endif } 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/vrecording.cc b/vrecording.cc index 5f99d8a..558953e 100644 --- a/vrecording.cc +++ b/vrecording.cc @@ -87,13 +87,18 @@ VRecording::VRecording(RecMan* trecman, Recording* trec) else summary->setText(tr("Summary unavailable")); +#ifndef VOMP_PLATTFORM_MVP +// OSDV OsdVector *osdv=dynamic_cast(Osd::getInstance()); +#endif tabbar.addTab(tr("EPG"), summary); if (rec->movieInfo) { WMovieView *movieview = new WMovieView(rec->movieInfo); movieview->setParaMode(true); tabbar.addTab(tr("TheTVDB Info"), movieview); +#ifndef VOMP_PLATTFORM_MVP +// OSDV if (osdv) { if (rec->movieInfo->actors.size() > 0 && osdv) { @@ -103,10 +108,13 @@ VRecording::VRecording(RecMan* trecman, Recording* trec) WArtworkGallery *artgallery= new WArtworkGallery(*rec->movieInfo); tabbar.addTab(tr("Gallery"),artgallery); } +#endif } else if (rec->seriesInfo) { WSeriesView *seriesview = new WSeriesView(rec->seriesInfo); seriesview->setParaMode(true); tabbar.addTab(tr("TheTVDB Info"), seriesview); +#ifndef VOMP_PLATTFORM_MVP +// OSDV if (osdv) { if (rec->seriesInfo->actors.size() > 0 && osdv) { @@ -116,7 +124,7 @@ VRecording::VRecording(RecMan* trecman, Recording* trec) WArtworkGallery *artgallery= new WArtworkGallery(*rec->seriesInfo); tabbar.addTab(tr("Gallery"),artgallery); } - +#endif } @@ -156,6 +164,8 @@ void VRecording::setParent(VRecordingList* tvRecList) void VRecording::draw() { TBBoxx::draw(); +#ifndef VOMP_PLATTFORM_MVP +// OSDV OsdVector *osdv=dynamic_cast(Osd::getInstance()); if (osdv) { TVMedia poster; @@ -178,7 +188,7 @@ void VRecording::draw() buttonRegion.w,/*buttonRegion.w*aspect*/0.f,BottomLeft); } } - +#endif } int VRecording::handleCommand(int command) diff --git a/vvideolivetv.cc b/vvideolivetv.cc index 0901d0d..b211afe 100644 --- a/vvideolivetv.cc +++ b/vvideolivetv.cc @@ -129,6 +129,9 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V TVMediaInfo info; info.setChannelLogo(initialChannelNumber); + +#ifndef VOMP_PLATTFORM_MVP +// OSDV OsdVector *osdv=dynamic_cast(Osd::getInstance()); if (osdv && streamType == VDR::RADIO) { @@ -138,6 +141,7 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V radioChannelLogo.setTVMedia(info, WTVMedia::ZoomVertical); add(&radioChannelLogo); } +#endif osdposterbanner.setPosition(20,20); //osdposterbanner.setBackgroundColour(DrawStyle::OSDBACKGROUND); @@ -155,6 +159,9 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V int channellogomove=0; int boxdiff=166; + +#ifndef VOMP_PLATTFORM_MVP +// OSDV if (osdv) { //osdChannelLogo.setBackgroundColour(DrawStyle::OSDBACKGROUND); osdChannelLogo.setPosition(30,5); @@ -164,7 +171,7 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V channellogomove=30-5; boxdiff=145; } - +#endif //clock.setBackgroundColour(DrawStyle::OSDBACKGROUND); clock.setPosition(osd.getWidth() - 100, 4); @@ -240,6 +247,9 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V bufferBar.setVisible(true); osd.add(&bufferBar); +#ifndef VOMP_PLATTFORM_MVP +// OSDV + if (!osdv) { sAspectRatio.setPosition(osd.getWidth() - 90, 40); sAspectRatio.nextColour = DrawStyle::LIVETVSYMBOLS; @@ -276,6 +286,17 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V dolbylogo.setVisible(false); txtlogo.setVisible(false); } +#else + sAspectRatio.setPosition(osd.getWidth() - 90, 40); + sAspectRatio.nextColour = DrawStyle::LIVETVSYMBOLS; + sAspectRatio.setVisible(false); + osd.add(&sAspectRatio); + + sAudioChannels.setPosition(osd.getWidth() - 130, 40); + sAudioChannels.nextColour = DrawStyle::LIVETVSYMBOLS; + sAudioChannels.setVisible(false); + osd.add(&sAudioChannels); +#endif //textUnavailable.setBackgroundColour(DrawStyle::OSDBACKGROUND); @@ -305,11 +326,18 @@ VVideoLiveTV::~VVideoLiveTV() delete player; video->setDefaultAspect(); delData(); + + +#ifndef VOMP_PLATTFORM_MVP +// OSDV + OsdVector* osdv=dynamic_cast(Osd::getInstance()); if (osdv) { osdv->updateBackgroundColor(DrawStyle::WALLPAPER); } +#endif + } void VVideoLiveTV::delData() @@ -988,11 +1016,15 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) player->setChannel(currentChannelIndex); Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Done Set player to channel %u", currentChannelIndex); + bufferBar.setPercent(0); + +#ifndef VOMP_PLATTFORM_MVP +// OSDV + // Blank out the symbols OsdVector *osdv=dynamic_cast(Osd::getInstance()); - bufferBar.setPercent(0); - + if (!osdv) { sAudioChannels.setVisible(false); sAspectRatio.setVisible(false); @@ -1002,6 +1034,13 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) txtlogo.setVisible(false); } +#else + sAudioChannels.setVisible(false); + sAspectRatio.setVisible(false); +#endif + + + // Remove other stuff if (textUnavailable.getVisible()) { @@ -1009,6 +1048,9 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) } +#ifndef VOMP_PLATTFORM_MVP +// OSDV + if (osdv) { TVMediaInfo info; Channel* currentChannel = (*chanList)[currentChannelIndex]; @@ -1022,6 +1064,7 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) } } +#endif draw(); BoxStack::getInstance()->update(this); @@ -1145,12 +1188,15 @@ void VVideoLiveTV::processMessage(Message* m) BoxStack::getInstance()->update(this, &wssRegion); } #endif - + +#ifndef VOMP_PLATTFORM_MVP +// OSDV OsdVector* osdv=dynamic_cast(Osd::getInstance()); if (osdv) { osdv->updateBackgroundColor(DrawStyle::BLACK); } +#endif sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT43; sAspectRatio.setVisible(true); @@ -1178,12 +1224,14 @@ void VVideoLiveTV::processMessage(Message* m) sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT169; sAspectRatio.setVisible(true); +#ifndef VOMP_PLATTFORM_MVP +// OSDV OsdVector* osdv=dynamic_cast(Osd::getInstance()); if (osdv) { osdv->updateBackgroundColor(DrawStyle::WALLPAPER); } - +#endif if (osd.getVisible()) // don't wake up the whole osd just for a aspect change { @@ -1219,16 +1267,19 @@ void VVideoLiveTV::processMessage(Message* m) void VVideoLiveTV::doAudioChannelSymbol() { - OsdVector *osdv=dynamic_cast(Osd::getInstance()); // get the doobery Channel* currentChannel = (*chanList)[osdChannelIndex]; - + bool multiAudio = false; if (Audio::getInstance()->supportsAc3()) { if ((currentChannel->numDPids+currentChannel->numAPids) > 1) multiAudio = true; } if (currentChannel->numAPids > 1) multiAudio = true; - + +#ifndef VOMP_PLATTFORM_MVP +// OSDV + + OsdVector *osdv=dynamic_cast(Osd::getInstance()); // draw the doobery if (!osdv) { if (multiAudio) sAudioChannels.nextSymbol = WSymbol::MULTIAUDIO; @@ -1272,10 +1323,13 @@ void VVideoLiveTV::doAudioChannelSymbol() } else { reslogo.setVisible(false); } - - } - +#else + if (multiAudio) sAudioChannels.nextSymbol = WSymbol::MULTIAUDIO; + else sAudioChannels.nextSymbol = WSymbol::SINGLEAUDIO; + sAudioChannels.setVisible(true); +#endif + if (osd.getVisible()) { sAudioChannels.draw(); @@ -1322,11 +1376,16 @@ void VVideoLiveTV::toggleChopSides() void VVideoLiveTV::updatePosterBanner() { +#ifndef VOMP_PLATTFORM_MVP +// OSDV OsdVector *osdv=dynamic_cast(Osd::getInstance()); if (!osdv) { osdposterbanner.setVisible(false); return; } +#endif + + Event* toShow = NULL; if (eventList && eventList->size()) { toShow = (*eventList)[0]; 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); } diff --git a/vvideorec.cc b/vvideorec.cc index 7156053..1838caf 100644 --- a/vvideorec.cc +++ b/vvideorec.cc @@ -93,11 +93,14 @@ VVideoRec::VVideoRec(Recording* rec, bool ish264) transparent.set(0, 0, 0, 0); setBackgroundColour(transparent); +#ifndef VOMP_PLATTFORM_MVP +// OSDV OsdVector* osdv=dynamic_cast(Osd::getInstance()); if (osdv) { osdv->updateBackgroundColor(DrawStyle::BLACK); } +#endif barRegion.x = 0; barRegion.y = video->getScreenHeight() - 58; // FIXME, need to be - 1? and below? @@ -174,11 +177,14 @@ VVideoRec::~VVideoRec() // FIXME - do this properly - save the resume point back to the server manually and update // rec->recInfo->resumePoint - this will fix the ~10s offset problem as well +#ifndef VOMP_PLATTFORM_MVP +// OSDV OsdVector* osdv=dynamic_cast(Osd::getInstance()); if (osdv) { osdv->updateBackgroundColor(DrawStyle::WALLPAPER); } +#endif } void VVideoRec::go(bool resume) -- 2.39.2