From 8b84612aeb4c3ae03d5eb125bb7fc2c9a35dab7c Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sat, 3 May 2008 16:03:47 +0000 Subject: [PATCH] *** empty log message *** --- command.cc | 8 ++-- vvideolivetv.cc | 50 ++++++++++++++++++++++--- vvideolivetv.h | 2 + wsymbol.cc | 98 ++++++++++++++++++++++++++++++++++++++++++++++++- wsymbol.h | 2 + 5 files changed, 149 insertions(+), 11 deletions(-) diff --git a/command.cc b/command.cc index 6710e94..a23e1ce 100644 --- a/command.cc +++ b/command.cc @@ -886,10 +886,10 @@ void Command::doJustConnected(VConnect* vconnect) boxstack->update(vw); // Enter pre-keys here -// handleCommand(Remote::OK); -// handleCommand(Remote::ONE); -// handleCommand(Remote::ZERO); -// handleCommand(Remote::OK); + handleCommand(Remote::OK); + handleCommand(Remote::ONE); + handleCommand(Remote::SIX); + handleCommand(Remote::OK); // handleCommand(Remote::UP); // handleCommand(Remote::PLAY); // handleCommand(Remote::DOWN); diff --git a/vvideolivetv.cc b/vvideolivetv.cc index 97a47fe..30dcaf2 100644 --- a/vvideolivetv.cc +++ b/vvideolivetv.cc @@ -207,16 +207,21 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V summaryBlackLine.setSize(summary.getWidth(), 4); summary.add(&summaryBlackLine); - sAspectRatio.setPosition(osd.getWidth() - 90, clock.getY2()+4); - sAspectRatio.nextColour = Colour::YELLOW; + sAspectRatio.setPosition(osd.getWidth() - 90, 40); + sAspectRatio.nextColour = Colour::SELECTHIGHLIGHT; sAspectRatio.setVisible(false); osd.add(&sAspectRatio); - bufferBar.setPosition(osd.getWidth() - 94, 70); - bufferBar.setSize(50, 20); + bufferBar.setPosition(osd.getWidth() - 90, 70); + bufferBar.setSize(40, 20); bufferBar.setVisible(true); osd.add(&bufferBar); + sAudioChannels.setPosition(osd.getWidth() - 130, 40); + sAudioChannels.nextColour = Colour::SELECTHIGHLIGHT; + sAudioChannels.setVisible(false); + osd.add(&sAudioChannels); + // FIXME painful Region r1 = summary.getRegionR(); Region r2 = osd.getRegionR(); @@ -804,6 +809,7 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) // Blank out the symbols sAspectRatio.setVisible(false); bufferBar.setPercent(0); + sAudioChannels.setVisible(false); return true; } @@ -940,14 +946,48 @@ void VVideoLiveTV::processMessage(Message* m) bufferBar.setVisible(true); bufferBar.draw(); Region r; - bufferBar.getRootBoxRegion(&r); + bufferBar.getRootBoxRegion(&r); ///////// FIXME !!! BoxStack::getInstance()->update(this, &r); + + if (preBuffering == 100) + { + doAudioChannelSymbol(); + } } } } } } +void VVideoLiveTV::doAudioChannelSymbol() +{ + // get the doobery + Channel* currentChannel = (*chanList)[osdChannelIndex]; + + bool multiAudio = false; + #if WIN32 + if (currentChannel->numDPids > 1) multiAudio = true; + #endif + if (currentChannel->numAPids > 1) multiAudio = true; + + // draw the doobery + + if (multiAudio) sAudioChannels.nextSymbol = WSymbol::MULTIAUDIO; + else sAudioChannels.nextSymbol = WSymbol::SINGLEAUDIO; + sAudioChannels.setVisible(true); + + if (osd.getVisible()) + { + sAudioChannels.draw(); + Region r; + sAudioChannels.getRootBoxRegion(&r); ///////// FIXME !!! + // Fix this n'all. + r.w = 32; + r.h = 16; + BoxStack::getInstance()->update(this, &r); + } +} + UINT VVideoLiveTV::upChannel(UINT index) { if (index == (chanList->size() - 1)) // at the end diff --git a/vvideolivetv.h b/vvideolivetv.h index c009154..4c65dff 100644 --- a/vvideolivetv.h +++ b/vvideolivetv.h @@ -106,6 +106,7 @@ class VVideoLiveTV : public Boxx, public TimerReceiver void delData(); void setNowNextData(); void setSummaryData(); + void doAudioChannelSymbol(); VAudioSelector* vas; @@ -128,6 +129,7 @@ class VVideoLiveTV : public Boxx, public TimerReceiver WTextbox textBlue; WSymbol sAspectRatio; WProgressBar bufferBar; + WSymbol sAudioChannels; Boxx summary; WTextbox textSummary; diff --git a/wsymbol.cc b/wsymbol.cc index 6d12476..4f693e0 100644 --- a/wsymbol.cc +++ b/wsymbol.cc @@ -22,8 +22,8 @@ #include "colour.h" -UCHAR WSymbol::widths[] = { 2, 2, 4, 4, 1, 1, 3, 3, 3, 3, 3, 4, 4, 2, 2, 3, 5, 5, 4, 4, 2, 2, 5, 5}; -UCHAR WSymbol::heights[] = { 8, 8, 12, 12, 24, 4, 18, 18, 18, 18, 18, 30, 30, 16, 16, 18, 18, 18, 16, 16, 8, 8, 16, 16}; +UCHAR WSymbol::widths[] = { 2, 2, 4, 4, 1, 1, 3, 3, 3, 3, 3, 4, 4, 2, 2, 3, 5, 5, 4, 4, 2, 2, 5, 5, 4, 4}; +UCHAR WSymbol::heights[] = { 8, 8, 12, 12, 24, 4, 18, 18, 18, 18, 18, 30, 30, 16, 16, 18, 18, 18, 16, 16, 8, 8, 16, 16, 16, 16}; UCHAR WSymbol::symbols[] = { @@ -912,6 +912,100 @@ UCHAR WSymbol::symbols[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + + + + + + + + + + +/* +00000000 00001111 11110000 00000000 +00000000 00001111 11110000 00000000 +00000000 00000001 10000000 00000000 +00000000 00000001 10000000 00000000 +00000000 00000001 10000000 00000000 +00000000 00000001 10000000 00000000 +00000000 00000001 10000000 00000000 +00000000 00000001 10000000 00000000 + +00000000 00000001 10000000 00000000 +00000000 00000001 10000000 00000000 +00000000 00000001 10000000 00000000 +00000000 00000001 10000000 00000000 +00000000 00000001 10000000 00000000 +00000000 00000001 10000000 00000000 +00000000 00001111 11110000 00000000 +00000000 00001111 11110000 00000000 +*/ + +0x00, 0x0F, 0xF0, 0x00, +0x00, 0x0F, 0xF0, 0x00, +0x00, 0x01, 0x80, 0x00, +0x00, 0x01, 0x80, 0x00, +0x00, 0x01, 0x80, 0x00, +0x00, 0x01, 0x80, 0x00, +0x00, 0x01, 0x80, 0x00, +0x00, 0x01, 0x80, 0x00, + +0x00, 0x01, 0x80, 0x00, +0x00, 0x01, 0x80, 0x00, +0x00, 0x01, 0x80, 0x00, +0x00, 0x01, 0x80, 0x00, +0x00, 0x01, 0x80, 0x00, +0x00, 0x01, 0x80, 0x00, +0x00, 0x0F, 0xF0, 0x00, +0x00, 0x0F, 0xF0, 0x00, + + +/* +11111111 00000011 11111100 11111111 +11111111 00000011 11111100 11111111 +00011000 00000000 01100000 00011000 +00011000 00000000 01100000 00011000 +00011000 00000000 01100000 00011000 +00011000 00000000 01100000 00011000 +00011000 00000000 01100000 00011000 +00011000 11111100 01100000 00011000 + +00011000 11111100 01100000 00011000 +00011000 00000000 01100000 00011000 +00011000 00000000 01100000 00011000 +00011000 00000000 01100000 00011000 +00011000 00000000 01100000 00011000 +00011000 00000000 01100000 00011000 +11111111 00000011 11111100 11111111 +11111111 00000011 11111100 11111111 +*/ + +0xFF, 0x03, 0xFC, 0xFF, +0xFF, 0x03, 0xFC, 0xFF, +0x18, 0x00, 0x60, 0x18, +0x18, 0x00, 0x60, 0x18, +0x18, 0x00, 0x60, 0x18, +0x18, 0x00, 0x60, 0x18, +0x18, 0x00, 0x60, 0x18, +0x18, 0xFC, 0x60, 0x18, + +0x18, 0xFC, 0x60, 0x18, +0x18, 0x00, 0x60, 0x18, +0x18, 0x00, 0x60, 0x18, +0x18, 0x00, 0x60, 0x18, +0x18, 0x00, 0x60, 0x18, +0x18, 0x00, 0x60, 0x18, +0xFF, 0x03, 0xFC, 0xFF, +0xFF, 0x03, 0xFC, 0xFF, + + + + + + + + }; WSymbol::WSymbol() diff --git a/wsymbol.h b/wsymbol.h index d110802..2a6c940 100644 --- a/wsymbol.h +++ b/wsymbol.h @@ -59,6 +59,8 @@ class WSymbol : public Boxx const static UCHAR SMALLDOWN = 21; const static UCHAR VIDEOASPECT43 = 22; const static UCHAR VIDEOASPECT169 = 23; + const static UCHAR SINGLEAUDIO = 24; + const static UCHAR MULTIAUDIO = 25; private: static UCHAR symbols[]; -- 2.39.5