2 Copyright 2007 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 #ifndef VVIDEOLIVETV_H
22 #define VVIDEOLIVETV_H
28 #include "messagequeue.h"
33 #include "wselectlist.h"
36 #include "wprogressbar.h"
37 #include "osdreceiver.h"
49 class VVideoLiveTV : public Boxx, public MessageReceiver, public TimerReceiver, public OSDReceiver
52 VVideoLiveTV(ChannelList* chanList, ULONG initialChannelNumber, VChannelList* vchannelList);
53 virtual ~VVideoLiveTV();
55 int handleCommand(int command);
56 void processMessage(Message* m);
60 bool channelChange(UCHAR changeType, UINT newData);
61 // changeType = INDEX = (newData is a channel index in the list)
62 // = NUMBER = (newData is a real channel number)
63 // = OFFSET = (newData is UP or DOWN)
65 const static UCHAR INDEX = 1;
66 const static UCHAR NUMBER = 2;
67 const static UCHAR OFFSET = 3;
68 const static UCHAR PREVIOUS = 4;
69 const static UCHAR UP = 1;
70 const static UCHAR DOWN = 2;
72 void timercall(int ref);
74 void drawOSDBitmap(UINT posX, UINT posY, const Bitmap&, const DisplayRegion& region);
76 void clearOSDArea(UINT posX, UINT posY, UINT width, UINT height, const DisplayRegion& region);
84 ChannelList* chanList;
85 VChannelList* vchannelList;
92 UINT currentChannelIndex;
93 UINT previousChannelIndex;
99 void doLeftRight(bool right);
100 void doUpDown(bool down);
101 void doChanUpDown(int which); // UP or DOWN
102 void doKey(int command);
105 void doAudioSelector();
106 void doTeletext(bool subtitle=false);
108 UINT upChannel(UINT index);
109 UINT downChannel(UINT index);
110 void toggleChopSides();
112 void updatePosterBanner();
114 void displayOSD(bool newNowNextData);
118 void setNowNextData();
119 void setSummaryData();
120 void doAudioChannelSymbol();
121 void showUnavailable();
128 WTextbox osdChanName;
139 WProgressBar bufferBar;
140 WSymbol sAspectRatio;
141 WSymbol sAudioChannels;
144 WTextbox textUnavailable;
145 WTVMedia osdposterbanner;
146 WTVMedia radioChannelLogo;
147 WTVMedia osdChannelLogo;