2 Copyright 2007-2008 Chris Tallon
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include "vvideolivetv.h"
23 #include "vchannellist.h"
25 #include "playerlive.h"
26 #include "playerlivetv.h"
27 #include "playerliveradio.h"
36 #include "vaudioselector.h"
43 VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, VChannelList* tvchannelList)
45 vdr = VDR::getInstance();
46 boxstack = BoxStack::getInstance();
47 video = Video::getInstance();
52 vchannelList = tvchannelList;
53 numberWidth = (int)VDR::getInstance()->getChannelNumberWidth();
55 currentChannelIndex = 0;
56 previousChannelIndex = 0;
63 // Convert channel number to index
65 for(i = 0; i < chanList->size(); i++)
67 if ((*chanList)[i]->number == (UINT)initialChannelNumber)
69 currentChannelIndex = i;
77 videoMode = video->getMode();
79 if ((*chanList)[currentChannelIndex]->type == VDR::VIDEO)
81 streamType = VDR::VIDEO;
82 player = new PlayerLiveTV(Command::getInstance(), this, this, chanList);
86 streamType = VDR::RADIO;
87 player = new PlayerLiveRadio(Command::getInstance(), this, chanList);
91 setSize(video->getScreenWidth(), video->getScreenHeight());
93 Colour transparent(0, 0, 0, 0);
94 setBackgroundColour(transparent);
97 char* optionWSS = vdr->configLoad("General", "WSS");
100 if (strstr(optionWSS, "Yes")) dowss = true;
103 Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Do WSS: %u", dowss);
107 wss.setFormat(video->getFormat());
113 wssRegion.w = video->getScreenWidth();
117 // This variable is set to true if the user pressed OK to bring the OSD on screen
118 // This is only used on old remotes to stop up/down buttons being used for osd-epg scrolling
119 okTriggeredOSD = false;
121 Colour osdBack = Colour(0, 0, 0, 128);
123 osd.setBackgroundColour(osdBack);
124 osd.setPosition(0, video->getScreenHeight() - 150);
125 osd.setSize(video->getScreenWidth(), 150);
126 osd.setVisible(false);
129 clock.setBackgroundColour(osdBack);
130 clock.setPosition(osd.getWidth() - 100, 4);
131 clock.setSize(90, 30);
134 osdChanNum.setBackgroundColour(osdBack);
135 osdChanNum.setPosition(50, 4);
136 osdChanNum.setSize((numberWidth*10) + 22, 30); // 10 px = width of number chars in font
137 osd.add(&osdChanNum);
139 osdChanName.setBackgroundColour(osdBack);
140 osdChanName.setPosition(osdChanNum.getX2() + 10, 4);
141 osdChanName.setSize(300, 30);
142 osd.add(&osdChanName);
144 boxRed.setBackgroundColour(Colour::RED);
145 boxRed.setPosition(54, 104);
146 boxRed.setSize(18, 16);
149 boxGreen.setBackgroundColour(Colour::GREEN);
150 boxGreen.setPosition(220, 104);
151 boxGreen.setSize(18, 16);
154 boxYellow.setBackgroundColour(Colour::YELLOW);
155 boxYellow.setPosition(390, 104);
156 boxYellow.setSize(18, 16);
159 boxBlue.setBackgroundColour(Colour::BLUE);
160 boxBlue.setPosition(560, 104);
161 boxBlue.setSize(18, 16);
164 textRed.setBackgroundColour(osdBack);
165 textRed.setPosition(boxRed.getX2(), 98);
166 textRed.setSize(boxGreen.getX() - boxRed.getX2(), 30);
167 textRed.setText(tr("Summary"));
170 if (streamType == VDR::VIDEO)
172 textGreen.setBackgroundColour(osdBack);
173 textGreen.setPosition(boxGreen.getX2(), 98);
174 textGreen.setSize(boxYellow.getX() - boxGreen.getX2(), 30);
175 textGreen.setText(tr("Audio"));
179 textYellow.setBackgroundColour(osdBack);
180 textYellow.setPosition(boxYellow.getX2(), 98);
181 textYellow.setSize(boxBlue.getX() - boxYellow.getX2(), 30);
182 textYellow.setText("");
183 osd.add(&textYellow);
185 textBlue.setBackgroundColour(osdBack);
186 textBlue.setPosition(boxBlue.getX2(), 98);
187 textBlue.setSize(osd.getX2() - boxBlue.getX2(), 30);
188 textBlue.setText(tr("EPG"));
191 sl.setBackgroundColour(osdBack);
192 sl.setPosition(70, 36);
198 summary.setBackgroundColour(osdBack);
199 summary.setPosition(0, video->getScreenHeight() - 300);
200 summary.setSize(video->getScreenWidth(), 150);
201 summary.setVisible(false);
204 textSummary.setBackgroundColour(osdBack);
205 textSummary.setPosition(40, 10);
206 textSummary.setSize(video->getScreenWidth() - 80, 130);
207 textSummary.setParaMode(true);
208 summary.add(&textSummary);
210 summaryBlackLine.setBackgroundColour(Colour::BLACK);
211 summaryBlackLine.setPosition(0, summary.getHeight() - 4);
212 summaryBlackLine.setSize(summary.getWidth(), 4);
213 summary.add(&summaryBlackLine);
215 sAspectRatio.setPosition(osd.getWidth() - 90, 40);
216 sAspectRatio.nextColour = Colour::SELECTHIGHLIGHT;
217 sAspectRatio.setVisible(false);
218 osd.add(&sAspectRatio);
220 bufferBar.setPosition(osd.getWidth() - 90, 70);
221 bufferBar.setSize(40, 20);
222 bufferBar.setVisible(true);
225 sAudioChannels.setPosition(osd.getWidth() - 130, 40);
226 sAudioChannels.nextColour = Colour::SELECTHIGHLIGHT;
227 sAudioChannels.setVisible(false);
228 osd.add(&sAudioChannels);
230 textUnavailable.setBackgroundColour(osdBack);
231 textUnavailable.setPosition(60, 30);
232 textUnavailable.setSize(osd.getWidth() - 120, 30);
233 textUnavailable.setText(tr("Channel Unavailable"));
234 textUnavailable.setVisible(false);
235 add(&textUnavailable);
238 Region r1 = summary.getRegionR();
239 Region r2 = osd.getRegionR();
240 osdSummaryRegion = r1 + r2;
243 void VVideoLiveTV::preDelete()
248 VVideoLiveTV::~VVideoLiveTV()
251 video->setDefaultAspect();
255 void VVideoLiveTV::delData()
259 int eventListSize = eventList->size();
260 for(int i = 0; i < eventListSize; i++)
262 delete (*eventList)[i];
271 int VVideoLiveTV::handleCommand(int command)
277 if (osd.getVisible() && !textUnavailable.getVisible())
282 // else drop through to stop
287 vchannelList->highlightChannel((*chanList)[currentChannelIndex]);
291 // NEW REMOTE ONLY - navigate EPG, bring it onscreen if it's not there
312 // Continue new remote only...
313 case Remote::CHANNELUP:
318 case Remote::CHANNELDOWN:
324 // END NEW REMOTE ONLY, START OLD REMOTE ONLY
326 // DF_LEFT and DF_RIGHT never get here because they are stolen
327 // by command as vol- and vol+
329 // Old remote. Decide what to do based on whether
330 // OK was pressed - osd shown manually, use up/down for epg nav
331 // UP/DOWN was pressed to change channel, osd was shown auto, use up/down for ch+/ch-
335 // Old remote, decide what to do based on okTriggeredOSD
336 if (okTriggeredOSD) doUpDown(false);
337 else doChanUpDown(UP);
340 case Remote::DF_DOWN:
342 // Old remote, decide what to do based on okTriggeredOSD
343 if (okTriggeredOSD) doUpDown(true);
344 else doChanUpDown(DOWN);
348 // END NEW/OLD REMOTE STUFF
350 case Remote::PREVCHANNEL:
352 channelChange(PREVIOUS, 0);
353 osdChannelIndex = currentChannelIndex;
386 // key in channel number
393 if (streamType == VDR::VIDEO) doAudioSelector();
407 if (streamType = VDR::VIDEO)
408 (static_cast<PlayerLiveTV*>(player))->toggleSubtitles();
415 void VVideoLiveTV::go()
419 boxstack->update(this);
424 player->go(currentChannelIndex);
427 void VVideoLiveTV::stop()
429 Timers::getInstance()->cancelTimer(this, 1);
430 Timers::getInstance()->cancelTimer(this, 2);
435 void VVideoLiveTV::doLeftRight(bool right)
437 if (osd.getVisible())
439 if (right) osdChannelIndex = upChannel(osdChannelIndex);
440 else osdChannelIndex = downChannel(osdChannelIndex);
444 osdChannelIndex = currentChannelIndex;
449 void VVideoLiveTV::doUpDown(bool down)
451 if (osd.getVisible())
465 void VVideoLiveTV::doChanUpDown(int which)
467 channelChange(OFFSET, which);
468 osdChannelIndex = currentChannelIndex;
472 void VVideoLiveTV::doOK()
474 if (osd.getVisible())
479 for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10., i);
481 channelChange(NUMBER, newChannel);
482 osdChannelIndex = currentChannelIndex;
485 else if (osdChannelIndex == currentChannelIndex)
491 channelChange(INDEX, osdChannelIndex);
497 osdChannelIndex = currentChannelIndex;
499 okTriggeredOSD = true;
503 void VVideoLiveTV::doSummary()
505 if (summary.getVisible())
507 summary.setVisible(false);
509 boxstack->update(this, summary.getRegion());
510 Timers::getInstance()->setTimerD(this, 1, 8); // Restart a timer to get rid of osd
514 summary.setVisible(true);
516 if (osd.getVisible())
518 Timers::getInstance()->cancelTimer(this, 1);
527 void VVideoLiveTV::doKey(int command)
529 if (!osd.getVisible()) // First key. prep the data
536 for (i = keying - 1; i >= 0; i--) keyingInput[i+1] = keyingInput[i];
537 keyingInput[0] = command;
540 char* keyingString = new char[numberWidth + 1];
541 for (i = 0; i < numberWidth; i++) keyingString[i] = '_';
542 keyingString[numberWidth] = '\0';
544 for (i = 0; i < keying; i++) keyingString[i] = keyingInput[keying - 1 - i] + 48;
546 if (keying == numberWidth)
549 for(i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10., i);
551 channelChange(NUMBER, newChannel);
552 osdChannelIndex = currentChannelIndex;
553 Timers::getInstance()->cancelTimer(this, 1); // cancel the timer to react to keying input,
554 displayOSD(true); // this will put one back if required
558 osdChanNum.setText(keyingString);
560 if (!osd.getVisible())
562 osd.setVisible(true);
569 boxstack->update(this, osd.getRegion());
570 Timers::getInstance()->setTimerD(this, 1, 3); // 3s for keying input
572 delete[] keyingString;
575 void VVideoLiveTV::doAudioSelector()
577 // If the osd is already visisble there might be a timer for it
578 Timers::getInstance()->cancelTimer(this, 1);
584 // and reset the display - this is a copy from setNowNextData
585 char formatChanNum[20];
586 SNPRINTF(formatChanNum, 19, "%0*lu", numberWidth, (*chanList)[osdChannelIndex]->number);
587 osdChanNum.setText(formatChanNum);
588 osdChanName.setText((*chanList)[osdChannelIndex]->name);
592 vas = new VAudioSelector(this, (*chanList)[currentChannelIndex], ((PlayerLiveTV*)player)->getCurrentAudioChannel());
593 Colour osdBack = Colour(0, 0, 0, 128);
594 vas->setBackgroundColour(osdBack);
595 vas->setPosition(0, osd.getScreenY() - vas->getHeight());
598 // make vas != null and displayOSD will not set a timer or do any boxstack update
599 summary.setVisible(false);
600 if (osd.getVisible()) displayOSD(false);
601 else displayOSD(true);
604 BoxStack::getInstance()->add(vas);
605 BoxStack::getInstance()->update(this);
606 BoxStack::getInstance()->update(vas);
609 void VVideoLiveTV::doEPG()
611 if (osd.getVisible()) clearScreen();
613 video->setMode(Video::QUARTER);
614 video->setPosition(170, 5); //TODO need to deal with 4:3 switching
616 VEpg* vepg = new VEpg(this, currentChannelIndex, streamType);
619 boxstack->update(vepg);
622 void VVideoLiveTV::setNowNextData()
626 Channel* currentChannel = (*chanList)[osdChannelIndex];
628 char formatChanNum[20];
629 SNPRINTF(formatChanNum, 19, "%0*lu", numberWidth, currentChannel->number);
630 osdChanNum.setText(formatChanNum);
631 osdChanName.setText(currentChannel->name);
633 eventList = VDR::getInstance()->getChannelSchedule(currentChannel->number);
637 sl.addOption(tr("No channel data available"), 0, 1);
641 sort(eventList->begin(), eventList->end(), EventSorter());
643 char tempString[300];
644 char tempString2[300];
647 int eventListSize = eventList->size();
648 for(int i = 0; i < eventListSize; i++)
650 event = (*eventList)[i];
652 //btime = localtime((time_t*)&event->time);
653 time_t etime = event->time;
654 btime = localtime(&etime);
656 strftime(tempString2, 299, "%0H:%0M ", btime);
658 strftime(tempString2, 299, "%H:%M ", btime);
660 SNPRINTF(tempString, 299, "%s %s", tempString2, event->title);
662 sl.addOption(tempString, (ULONG)event, (i==0));
667 void VVideoLiveTV::setSummaryData()
669 // If osd is not being displayed, sl will be filled with now, current channel
670 // If the display was already on, sl will have programme to show summary for, not necessarily current channel and now
671 Event* selectedEvent = (Event*)sl.getCurrentOptionData();
675 Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "No summary");
676 textSummary.setText(tr("No summary available"));
680 Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Summary: %s", selectedEvent->description);
681 textSummary.setText(selectedEvent->description);
685 void VVideoLiveTV::displayOSD(bool newNowNextData)
687 osd.setVisible(true);
695 if (summary.getVisible())
699 boxstack->update(this, &osdSummaryRegion);
703 boxstack->update(this, osd.getRegion());
706 bool setTimer = true;
707 if (vas) setTimer = false;
708 if (summary.getVisible()) setTimer = false;
709 if (textUnavailable.getVisible()) setTimer = false;
711 if (setTimer) Timers::getInstance()->setTimerD(this, 1, 4);
714 void VVideoLiveTV::clearScreen()
716 if (!summary.getVisible()) Timers::getInstance()->cancelTimer(this, 1);
718 textUnavailable.setVisible(false);
719 osd.setVisible(false);
720 summary.setVisible(false);
722 okTriggeredOSD = false;
725 boxstack->update(this);
728 void VVideoLiveTV::showUnavailable()
730 Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Show unavailable called");
731 textUnavailable.setVisible(true);
732 textUnavailable.draw();
734 if (!osd.getVisible()) displayOSD(true);
736 boxstack->update(this, textUnavailable.getRegion());
739 void VVideoLiveTV::setClock()
744 struct tm* tms = localtime(&t);
745 strftime(timeString, 19, "%H:%M", tms);
746 clock.setText(timeString);
748 time_t dt = 60 - (t % 60); // seconds to the next minute
749 if (dt == 0) dt = 60; // advance a whole minute if necessary
750 dt += t; // get a time_t value for it rather than using duration
751 // (so it will occur at the actual second and not second and a half)
753 Timers::getInstance()->setTimerT(this, 2, dt);
756 void VVideoLiveTV::timercall(int ref)
763 for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10., i);
765 Message* m = new Message();
766 m->message = Message::CHANNEL_CHANGE;
768 m->parameter = newChannel;
769 m->tag = 1; // signal to call displayOSD();
770 Command::getInstance()->postMessageFromOuterSpace(m);
774 // We have received a timer, we are not keying. If still prebuffering, don't remove the bar
775 if (preBuffering < 100)
777 Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Still prebuffering, not removing osd...");
778 Timers::getInstance()->setTimerD(this, 1, 2); // reset timer for another 2s
782 osd.setVisible(false);
783 okTriggeredOSD = false;
785 boxstack->update(this, osd.getRegion());
791 if (osd.getVisible())
794 boxstack->update(this, osd.getRegion());
799 bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData)
803 if (changeType == INDEX)
805 newChannel = newData;
807 else if (changeType == NUMBER)
810 for(i = 0; i < chanList->size(); i++)
812 if ((*chanList)[i]->number == (UINT)newData)
819 if (i == chanList->size())
825 else if (changeType == OFFSET)
827 if (newData == UP) newChannel = upChannel(currentChannelIndex);
828 else newChannel = downChannel(currentChannelIndex);
830 else if (changeType == PREVIOUS)
832 newChannel = previousChannelIndex;
836 return false; // bad input
839 if (newChannel == currentChannelIndex) return true;
841 previousChannelIndex = currentChannelIndex;
842 currentChannelIndex = newChannel;
846 Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Set player to channel %u", currentChannelIndex);
847 player->setChannel(currentChannelIndex);
848 Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Done Set player to channel %u", currentChannelIndex);
850 // Blank out the symbols
851 sAspectRatio.setVisible(false);
852 bufferBar.setPercent(0);
853 sAudioChannels.setVisible(false);
855 // Remove other stuff
856 if (textUnavailable.getVisible())
858 textUnavailable.setVisible(false);
860 BoxStack::getInstance()->update(this);
866 void VVideoLiveTV::processMessage(Message* m)
868 if (m->message == Message::MOUSE_LBDOWN)
870 //check if press is outside this view! then simulate cancel
871 int x=(m->parameter>>16)-osd.getScreenX();
872 int y=(m->parameter&0xFFFF)-osd.getScreenY();
873 if (osd.getVisible()) {
875 if ((boxRed.getX()<=x) && (boxRed.getX()+(int)boxRed.getWidth()>=x ) &&
876 (boxRed.getY()<=y) && (boxRed.getY()+(int)boxRed.getHeight()>=y )) {
877 BoxStack::getInstance()->handleCommand(Remote::RED);
878 } else if ((boxGreen.getX()<=x) && (boxGreen.getX()+(int)boxGreen.getWidth()>=x ) &&
879 (boxGreen.getY()<=y) && (boxGreen.getY()+(int)boxGreen.getHeight()>=y)){
880 BoxStack::getInstance()->handleCommand(Remote::GREEN);
881 } else if ((boxYellow.getX()<=x) && (boxYellow.getX()+(int)boxYellow.getWidth()>=x ) &&
882 (boxYellow.getY()<=y) && (boxYellow.getY()+(int)boxYellow.getHeight()>=y )){
883 BoxStack::getInstance()->handleCommand(Remote::YELLOW);
884 } else if ((boxBlue.getX()<=x) && (boxBlue.getX()+(int)boxBlue.getWidth()>=x ) &&
885 (boxBlue.getY()<=y) && (boxBlue.getY()+(int)boxBlue.getHeight()>=y )){
886 BoxStack::getInstance()->handleCommand(Remote::BLUE);
888 BoxStack::getInstance()->handleCommand(Remote::OK); //simulate rok press
892 BoxStack::getInstance()->handleCommand(Remote::OK); //simulate rok press
895 else if (m->message == Message::CHANNEL_CHANGE)
897 channelChange(NUMBER, m->parameter);
898 osdChannelIndex = currentChannelIndex;
899 if (m->tag == 1) displayOSD(true);
901 else if (m->message == Message::EPG_CLOSE)
903 video->setMode(videoMode);
905 else if (m->message == Message::CHILD_CLOSE)
913 else if (m->message == Message::AUDIO_CHANGE_CHANNEL)
915 Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Received change audio channel to %i", m->parameter);
916 player->setAudioChannel((m->parameter & 0xFFFF),(m->parameter & 0xFF0000)>>16);
918 else if (m->message == Message::PLAYER_EVENT)
922 case PlayerLiveTV::CONNECTION_LOST: // connection lost detected
924 Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Received connection lost from player");
925 Command::getInstance()->connectionLost();
929 case PlayerLiveTV::STREAM_END:
931 // Message comes from playerlivetv through master mutex, so can do anything here
936 case PlayerLiveTV::ASPECT43:
938 if ((video->getTVsize() == Video::ASPECT16X9) && dowss)
940 Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 43");
943 BoxStack::getInstance()->update(this, &wssRegion);
946 sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT43;
947 sAspectRatio.setVisible(true);
949 if (osd.getVisible()) // don't wake up the whole osd just for a aspect change
952 BoxStack::getInstance()->update(this, osd.getRegion());
957 case PlayerLiveTV::ASPECT169:
959 if ((video->getTVsize() == Video::ASPECT16X9) && dowss)
961 Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 169");
964 BoxStack::getInstance()->update(this, &wssRegion);
967 sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT169;
968 sAspectRatio.setVisible(true);
970 if (osd.getVisible()) // don't wake up the whole osd just for a aspect change
973 BoxStack::getInstance()->update(this, osd.getRegion());
978 case PlayerLiveTV::PREBUFFERING:
980 preBuffering = m->tag;
981 Log::getInstance()->log("VVideoRec", Log::DEBUG, "Prebuffering - %u", preBuffering);
982 bufferBar.setPercent(preBuffering);
984 if (osd.getVisible())
986 bufferBar.setVisible(true);
989 bufferBar.getRootBoxRegion(&r); ///////// FIXME !!!
990 BoxStack::getInstance()->update(this, &r);
992 if (preBuffering == 100)
994 doAudioChannelSymbol();
1002 void VVideoLiveTV::doAudioChannelSymbol()
1005 Channel* currentChannel = (*chanList)[osdChannelIndex];
1007 bool multiAudio = false;
1009 if (currentChannel->numDPids > 1) multiAudio = true;
1011 if (currentChannel->numAPids > 1) multiAudio = true;
1015 if (multiAudio) sAudioChannels.nextSymbol = WSymbol::MULTIAUDIO;
1016 else sAudioChannels.nextSymbol = WSymbol::SINGLEAUDIO;
1017 sAudioChannels.setVisible(true);
1019 if (osd.getVisible())
1021 sAudioChannels.draw();
1023 sAudioChannels.getRootBoxRegion(&r); ///////// FIXME !!!
1027 BoxStack::getInstance()->update(this, &r);
1031 UINT VVideoLiveTV::upChannel(UINT index)
1033 if (index == (chanList->size() - 1)) // at the end
1034 return 0; // so go to start
1039 UINT VVideoLiveTV::downChannel(UINT index)
1041 if (index == 0) // at the start
1042 return chanList->size() - 1; // so go to end
1047 void VVideoLiveTV::toggleChopSides()
1049 if (video->getTVsize() == Video::ASPECT16X9) return; // Means nothing for 16:9 TVs
1051 if (videoMode == Video::NORMAL)
1053 videoMode = Video::LETTERBOX;
1054 video->setMode(Video::LETTERBOX);
1058 videoMode = Video::NORMAL;
1059 video->setMode(Video::NORMAL);
1063 void VVideoLiveTV::drawOSDBitmap(UINT posX, UINT posY, const Bitmap& bm)
1065 drawBitmap(posX, posY, bm);
1067 r.x = posX; r.y = posY; r.w = bm.getWidth(); r.h = bm.getHeight();
1068 boxstack->update(this, &r);
1071 void VVideoLiveTV::clearOSD()
1073 rectangle(area, Colour(0,0,0,0));
1074 boxstack->update(this, &area);
1077 void VVideoLiveTV::clearOSDArea(UINT posX, UINT posY, UINT width, UINT height)
1080 r.x = posX; r.y = posY; r.w = width; r.h = height;
1081 rectangle(r, Colour(0,0,0,0));
1082 boxstack->update(this, &r);