From a19cdf6ec953324c05f9f852e3551eaf3127176d Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Tue, 17 Jan 2017 16:48:55 +0000 Subject: [PATCH] Revert "Some nasty hacks to support MVP" This reverts commit e1b1b6068a066263bb593162d84e57e8e5abbfb2. --- 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, 62 insertions(+), 184 deletions(-) diff --git a/boxx.cc b/boxx.cc index 4e13be8..e775ea8 100644 --- a/boxx.cc +++ b/boxx.cc @@ -307,12 +307,10 @@ 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; - float *charwidtharray=NULL; -#ifndef VOMP_PLATTFORM_MVP -// OSDV OsdVector *osdv=dynamic_cast(osd); + float *charwidtharray=NULL; if (osdv) charwidtharray=osdv->getCharWidthArray(); -#endif + mbstate_t state; memset((void*)&state,0,sizeof(state)); @@ -351,16 +349,14 @@ 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) { @@ -513,31 +509,23 @@ 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) - { -#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 - } + 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 + } + } 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) - { -#ifndef VOMP_PLATTFORM_MVP -// OSDV - SurfaceVector * surfacevector=dynamic_cast(surface); - if (surfacevector) surfacevector->drawClippingRectangle(x, y, w, h); -#endif - } + 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); + + } } int Boxx::getFontHeight() diff --git a/colour.cc b/colour.cc index eff30ed..5ee9baa 100644 --- a/colour.cc +++ b/colour.cc @@ -28,7 +28,6 @@ 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 0224cd4..b99b5eb 100644 --- a/colour.h +++ b/colour.h @@ -116,7 +116,6 @@ 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 fcf3f08..7a2b11f 100644 --- a/command.cc +++ b/command.cc @@ -56,7 +56,6 @@ #include "log.h" #include "vsleeptimer.h" #include "wjpeg.h" -#include "osdvector.h" Command* Command::instance = NULL; @@ -182,15 +181,13 @@ void Command::doWallpaper() boxstack->add(wallpaper); boxstack->update(wallpaper); -#ifndef VOMP_PLATTFORM_MVP -// OSDV - OsdVector* osdv=dynamic_cast(Osd::getInstance()); - if (osdv) - { - osdv->updateBackgroundColor(DrawStyle::WALLPAPER); - } + OsdVector* osdv=dynamic_cast(Osd::getInstance()); + if (osdv) + { + osdv->updateBackgroundColor(DrawStyle::WALLPAPER); + } + -#endif } @@ -524,25 +521,21 @@ 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 54d0f12..6d12315 100644 --- a/defines.h +++ b/defines.h @@ -167,11 +167,6 @@ 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 e99bdd5..d16d7cf 100644 --- a/vchannellist.cc +++ b/vchannellist.cc @@ -89,16 +89,10 @@ 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; @@ -113,15 +107,12 @@ 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 1e5451d..ee19f82 100644 --- a/vdr.cc +++ b/vdr.cc @@ -623,12 +623,9 @@ 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()); -#ifndef VOMP_PLATTFORM_MVP -// OSDV - OsdVector *osd=dynamic_cast(Osd::getInstance()); - if (osd) osd->getPictReader()->receivePicture(vresp); -#endif - delete vresp; + OsdVector *osd=dynamic_cast(Osd::getInstance()); + if (osd) osd->getPictReader()->receivePicture(vresp); + else delete vresp; //nonsense deleteme=false; return true; } diff --git a/vepgsummary.cc b/vepgsummary.cc index b2206ad..b60aa32 100644 --- a/vepgsummary.cc +++ b/vepgsummary.cc @@ -85,10 +85,7 @@ 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); @@ -100,8 +97,6 @@ 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) { @@ -113,14 +108,11 @@ 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) { @@ -132,7 +124,6 @@ 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 a104e3a..d454612 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.num>>16)-getScreenX(),(m->parameter.num&0xFFFF)-getScreenY())) + if (sl.mouseMove((m->parameter>>16)-getScreenX(),(m->parameter&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.num>>16)-getScreenX(),(m->parameter.num&0xFFFF)-getScreenY())) + if (sl.mouseLBDOWN((m->parameter>>16)-getScreenX(),(m->parameter&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.num>>16)-getScreenX(); - int y=(m->parameter.num&0xFFFF)-getScreenY(); + int x=(m->parameter>>16)-getScreenX(); + int y=(m->parameter&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.num) { + switch (m->parameter) { 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.num = (ULONG)vi; + m->parameter = (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.num = ref; + m->parameter = ref; Command::getInstance()->postMessageFromOuterSpace(m); } } diff --git a/vmediaview.cc b/vmediaview.cc index ef380ae..3745f7f 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.num = rt?VMediaView::EVENT_DRAWINGDONE:VMediaView::EVENT_DRAWINGERROR; + m->parameter= 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.num>>16)-getScreenX(); - int y=(m->parameter.num&0xFFFF)-getScreenY(); + int x=(m->parameter>>16)-getScreenX(); + int y=(m->parameter&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.num) { + switch (m->parameter) { 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.num=(ULONG)v; + m->parameter=(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.num = command; + m->parameter= command; Command::getInstance()->postMessageFromOuterSpace(m); } diff --git a/vrecording.cc b/vrecording.cc index 558953e..5f99d8a 100644 --- a/vrecording.cc +++ b/vrecording.cc @@ -87,18 +87,13 @@ 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) { @@ -108,13 +103,10 @@ 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) { @@ -124,7 +116,7 @@ VRecording::VRecording(RecMan* trecman, Recording* trec) WArtworkGallery *artgallery= new WArtworkGallery(*rec->seriesInfo); tabbar.addTab(tr("Gallery"),artgallery); } -#endif + } @@ -164,8 +156,6 @@ 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; @@ -188,7 +178,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 b211afe..0901d0d 100644 --- a/vvideolivetv.cc +++ b/vvideolivetv.cc @@ -129,9 +129,6 @@ 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) { @@ -141,7 +138,6 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V radioChannelLogo.setTVMedia(info, WTVMedia::ZoomVertical); add(&radioChannelLogo); } -#endif osdposterbanner.setPosition(20,20); //osdposterbanner.setBackgroundColour(DrawStyle::OSDBACKGROUND); @@ -159,9 +155,6 @@ 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); @@ -171,7 +164,7 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V channellogomove=30-5; boxdiff=145; } -#endif + //clock.setBackgroundColour(DrawStyle::OSDBACKGROUND); clock.setPosition(osd.getWidth() - 100, 4); @@ -247,9 +240,6 @@ 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; @@ -286,17 +276,6 @@ 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); @@ -326,18 +305,11 @@ 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() @@ -1016,15 +988,11 @@ 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); @@ -1034,13 +1002,6 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) txtlogo.setVisible(false); } -#else - sAudioChannels.setVisible(false); - sAspectRatio.setVisible(false); -#endif - - - // Remove other stuff if (textUnavailable.getVisible()) { @@ -1048,9 +1009,6 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) } -#ifndef VOMP_PLATTFORM_MVP -// OSDV - if (osdv) { TVMediaInfo info; Channel* currentChannel = (*chanList)[currentChannelIndex]; @@ -1064,7 +1022,6 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) } } -#endif draw(); BoxStack::getInstance()->update(this); @@ -1188,15 +1145,12 @@ 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); @@ -1224,14 +1178,12 @@ 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 { @@ -1267,19 +1219,16 @@ 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; @@ -1323,13 +1272,10 @@ 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(); @@ -1376,16 +1322,11 @@ 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 5ec7882..02a1485 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.num = (ULONG)vi; + m->parameter = (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.num>>16) - getScreenX(); - UINT y = (m->parameter.num&0xFFFF) - getScreenY(); + UINT x = (m->parameter>>16) - getScreenX(); + UINT y = (m->parameter&0xFFFF) - getScreenY(); if (!barShowing) { @@ -366,7 +366,7 @@ void VVideoMedia::processMessage(Message* m) } else if (m->message == Message::PLAYER_EVENT) { - switch(m->parameter.num) + switch(m->parameter) { 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.num); + player->setAudioChannel(m->parameter); } 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.num=PLAYER_TIMER_BASE+clientReference; + m->parameter=PLAYER_TIMER_BASE+clientReference; Command::getInstance()->postMessageFromOuterSpace(m); } diff --git a/vvideorec.cc b/vvideorec.cc index 1838caf..7156053 100644 --- a/vvideorec.cc +++ b/vvideorec.cc @@ -93,14 +93,11 @@ 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? @@ -177,14 +174,11 @@ 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.5