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
29 #include "messagequeue.h"
34 #include "wselectlist.h"
37 #include "wprogressbar.h"
38 #include "osdreceiver.h"
50 class VVideoLiveTV : public Boxx, public MessageReceiver, public TimerReceiver, public OSDReceiver
53 VVideoLiveTV(std::shared_ptr<ChannelList> chanList, u4 initialChannelNumber, VChannelList* vchannelList);
54 virtual ~VVideoLiveTV();
56 int handleCommand(int command);
57 void processMessage(Message* m);
61 bool channelChange(u1 changeType, u4 newData);
62 // changeType = INDEX = (newData is a channel index in the list)
63 // = NUMBER = (newData is a real channel number)
64 // = OFFSET = (newData is UP or DOWN)
66 const static u1 INDEX = 1;
67 const static u1 NUMBER = 2;
68 const static u1 OFFSET = 3;
69 const static u1 PREVIOUS = 4;
70 const static u1 UP = 1;
71 const static u1 DOWN = 2;
73 void timercall(int ref);
75 void drawOSDBitmap(u4 posX, u4 posY, const Bitmap&, const DisplayRegion& region);
77 void clearOSDArea(u4 posX, u4 posY, u4 width, u4 height, const DisplayRegion& region);
85 std::shared_ptr<ChannelList> chanList;
86 VChannelList* vchannelList;
93 u4 currentChannelIndex;
94 u4 previousChannelIndex;
100 void doLeftRight(bool right);
101 void doUpDown(bool down);
102 void doChanUpDown(int which); // UP or DOWN
103 void doKey(int command);
106 void doAudioSelector();
107 void doTeletext(bool subtitle=false);
109 u4 upChannel(u4 index);
110 u4 downChannel(u4 index);
111 void toggleChopSides();
113 void updatePosterBanner();
115 void displayOSD(bool newNowNextData);
119 void setNowNextData();
120 void setSummaryData();
121 void doAudioChannelSymbol();
122 void showUnavailable();
129 WTextbox osdChanName;
140 WProgressBar bufferBar;
141 WSymbol sAspectRatio;
142 WSymbol sAudioChannels;
145 WTextbox textUnavailable;
146 WTVMedia osdposterbanner;
147 WTVMedia radioChannelLogo;
148 WTVMedia osdChannelLogo;