bool mchar=false;
Osd *osd=Osd::getInstance();
if (osd->charSet()!=1) mchar=true;
- OsdVector *osdv=dynamic_cast<OsdVector*>(osd);
float *charwidtharray=NULL;
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
+ OsdVector *osdv=dynamic_cast<OsdVector*>(osd);
if (osdv) charwidtharray=osdv->getCharWidthArray();
-
+#endif
mbstate_t state;
memset((void*)&state,0,sizeof(state));
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)
{
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<SurfaceVector*>(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<SurfaceVector*>(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<SurfaceVector*>(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<SurfaceVector*>(surface);
+ if (surfacevector) surfacevector->drawClippingRectangle(x, y, w, h);
+#endif
+ }
}
int Boxx::getFontHeight()
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);
static DrawStyle BLUE;
static DrawStyle GREY;
static DrawStyle DARKGREY;
+ static DrawStyle VIDEOBLUE;
static DrawStyle VIEWBACKGROUND;
static DrawStyle VIEWTRANSPARENTBACKGROUND;
static DrawStyle LIVETVSYMBOLS;
#include "log.h"
#include "vsleeptimer.h"
#include "wjpeg.h"
+#include "osdvector.h"
Command* Command::instance = NULL;
boxstack->add(wallpaper);
boxstack->update(wallpaper);
- OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
- if (osdv)
- {
- osdv->updateBackgroundColor(DrawStyle::WALLPAPER);
- }
-
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
+ OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
+ if (osdv)
+ {
+ osdv->updateBackgroundColor(DrawStyle::WALLPAPER);
+ }
+#endif
}
}
case Message::NEW_PICTURE:
{
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
//Log::getInstance()->log("Command", Log::DEBUG, "TVMedia NEW_PICTURE");
OsdVector *osdv=dynamic_cast<OsdVector*>(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<OsdVector*>(Osd::getInstance());
if (osdv) {
osdv->informPicture(((unsigned long long)m->tag)<<32LL,m->parameter.handle);
}
-
+#endif
} break;
}
}
#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
void VChannelList::setList(ChannelList* tlist)
{
char str[500];
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
+#endif
sl.addColumn(0);
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
if (osdv) sl.addColumn(20);
+#endif
sl.addColumn(60);
chanList = 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;
}
// 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<OsdVector*>(Osd::getInstance());
- if (osd) osd->getPictReader()->receivePicture(vresp);
- else delete vresp; //nonsense
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
+ OsdVector *osd=dynamic_cast<OsdVector*>(Osd::getInstance());
+ if (osd) osd->getPictReader()->receivePicture(vresp);
+#endif
+ delete vresp;
deleteme=false;
return true;
}
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<OsdVector*>(Osd::getInstance());
+#endif
summary->setBackgroundColour(DrawStyle::VIEWTRANSPARENTBACKGROUND);
tabbar.addTab(tr("EPG"), summary);
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)
{
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)
{
artgallery->setBackgroundColour(DrawStyle::VIEWTRANSPARENTBACKGROUND);
tabbar.addTab(tr("Gallery"),artgallery);
}
+#endif
}
{
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();
}
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
}
}
else if (m->message == Message::PLAYER_EVENT) {
- switch (m->parameter) {
+ switch (m->parameter.num) {
case 1:
directoryDone();
break;
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;
Message* m = new Message();
m->message = Message::PLAYER_EVENT;
m->to = this;
- m->parameter = ref;
+ m->parameter.num = ref;
Command::getInstance()->postMessageFromOuterSpace(m);
}
}
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);
{
//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) {
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) {
m->message = Message::PLAYER_EVENT;
m->to = this;
m->from = this;
- m->parameter= command;
+ m->parameter.num = command;
Command::getInstance()->postMessageFromOuterSpace(m);
}
else
summary->setText(tr("Summary unavailable"));
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
OsdVector *osdv=dynamic_cast<OsdVector*>(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)
{
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)
{
WArtworkGallery *artgallery= new WArtworkGallery(*rec->seriesInfo);
tabbar.addTab(tr("Gallery"),artgallery);
}
-
+#endif
}
void VRecording::draw()
{
TBBoxx::draw();
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
if (osdv) {
TVMedia poster;
buttonRegion.w,/*buttonRegion.w*aspect*/0.f,BottomLeft);
}
}
-
+#endif
}
int VRecording::handleCommand(int command)
TVMediaInfo info;
info.setChannelLogo(initialChannelNumber);
+
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
if (osdv && streamType == VDR::RADIO) {
radioChannelLogo.setTVMedia(info, WTVMedia::ZoomVertical);
add(&radioChannelLogo);
}
+#endif
osdposterbanner.setPosition(20,20);
//osdposterbanner.setBackgroundColour(DrawStyle::OSDBACKGROUND);
int channellogomove=0;
int boxdiff=166;
+
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
if (osdv) {
//osdChannelLogo.setBackgroundColour(DrawStyle::OSDBACKGROUND);
osdChannelLogo.setPosition(30,5);
channellogomove=30-5;
boxdiff=145;
}
-
+#endif
//clock.setBackgroundColour(DrawStyle::OSDBACKGROUND);
clock.setPosition(osd.getWidth() - 100, 4);
bufferBar.setVisible(true);
osd.add(&bufferBar);
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
+
if (!osdv) {
sAspectRatio.setPosition(osd.getWidth() - 90, 40);
sAspectRatio.nextColour = DrawStyle::LIVETVSYMBOLS;
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);
delete player;
video->setDefaultAspect();
delData();
+
+
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
+
OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
if (osdv)
{
osdv->updateBackgroundColor(DrawStyle::WALLPAPER);
}
+#endif
+
}
void VVideoLiveTV::delData()
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<OsdVector*>(Osd::getInstance());
- bufferBar.setPercent(0);
-
+
if (!osdv) {
sAudioChannels.setVisible(false);
sAspectRatio.setVisible(false);
txtlogo.setVisible(false);
}
+#else
+ sAudioChannels.setVisible(false);
+ sAspectRatio.setVisible(false);
+#endif
+
+
+
// Remove other stuff
if (textUnavailable.getVisible())
{
}
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
+
if (osdv) {
TVMediaInfo info;
Channel* currentChannel = (*chanList)[currentChannelIndex];
}
}
+#endif
draw();
BoxStack::getInstance()->update(this);
BoxStack::getInstance()->update(this, &wssRegion);
}
#endif
-
+
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
if (osdv)
{
osdv->updateBackgroundColor(DrawStyle::BLACK);
}
+#endif
sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT43;
sAspectRatio.setVisible(true);
sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT169;
sAspectRatio.setVisible(true);
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
if (osdv)
{
osdv->updateBackgroundColor(DrawStyle::WALLPAPER);
}
-
+#endif
if (osd.getVisible()) // don't wake up the whole osd just for a aspect change
{
void VVideoLiveTV::doAudioChannelSymbol()
{
- OsdVector *osdv=dynamic_cast<OsdVector*>(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<OsdVector*>(Osd::getInstance());
// draw the doobery
if (!osdv) {
if (multiAudio) sAudioChannels.nextSymbol = WSymbol::MULTIAUDIO;
} 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();
void VVideoLiveTV::updatePosterBanner()
{
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
if (!osdv) {
osdposterbanner.setVisible(false);
return;
}
+#endif
+
+
Event* toShow = NULL;
if (eventList && eventList->size()) {
toShow = (*eventList)[0];
m = new Message();
m->message = Message::ADD_VIEW;
m->to = boxstack;
- m->parameter = (ULONG)vi;
+ m->parameter.num = (ULONG)vi;
Command::getInstance()->postMessageNoLock(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)
{
}
else if (m->message == Message::PLAYER_EVENT)
{
- switch(m->parameter)
+ switch(m->parameter.num)
{
case PlayerMedia::CONNECTION_LOST: // connection lost detected
{
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)
{
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);
}
transparent.set(0, 0, 0, 0);
setBackgroundColour(transparent);
+#ifndef VOMP_PLATTFORM_MVP
+// OSDV
OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
if (osdv)
{
osdv->updateBackgroundColor(DrawStyle::BLACK);
}
+#endif
barRegion.x = 0;
barRegion.y = video->getScreenHeight() - 58; // FIXME, need to be - 1? and below?
// 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<OsdVector*>(Osd::getInstance());
if (osdv)
{
osdv->updateBackgroundColor(DrawStyle::WALLPAPER);
}
+#endif
}
void VVideoRec::go(bool resume)