]> git.vomp.tv Git - vompclient.git/blob - vvideolivetv.h
Windows AC3, live tv banner icon w/s
[vompclient.git] / vvideolivetv.h
1 /*
2     Copyright 2007 Chris Tallon
3
4     This file is part of VOMP.
5
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.
10
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.
15
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.
19 */
20
21 #ifndef VVIDEOLIVETV_H
22 #define VVIDEOLIVETV_H
23
24 #include <stdio.h>
25 #include <vector>
26 #include <math.h>
27
28 #include "boxx.h"
29 #include "region.h"
30 #include "wwss.h"
31 #include "vdr.h"
32 #include "wtextbox.h"
33 #include "wselectlist.h"
34 #include "timerreceiver.h"
35 #include "wsymbol.h"
36
37 class VChannelList;
38 class Video;
39 class VChannelList;
40 class BoxStack;
41 class WTextbox;
42 class PlayerLive;
43 class VAudioSelector;
44
45 class VVideoLiveTV : public Boxx, public TimerReceiver
46 {
47   public:
48     VVideoLiveTV(ChannelList* chanList, ULONG initialChannelNumber, VChannelList* vchannelList);
49     ~VVideoLiveTV();
50     int handleCommand(int command);
51     void processMessage(Message* m);
52
53     void go();
54
55     bool channelChange(UCHAR changeType, UINT newData);
56     // changeType = INDEX = (newData is a channel index in the list)
57     //            = NUMBER = (newData is a real channel number)
58     //            = OFFSET = (newData is UP or DOWN)
59
60     const static UCHAR INDEX = 1;
61     const static UCHAR NUMBER = 2;
62     const static UCHAR OFFSET = 3;
63     const static UCHAR PREVIOUS = 4;
64     const static UCHAR UP = 1;
65     const static UCHAR DOWN = 2;
66
67     void timercall(int ref);
68
69   private:
70     BoxStack* boxstack;
71     VDR* vdr;
72     Video* video;
73     PlayerLive* player;
74     bool playing;
75     ChannelList* chanList;
76     VChannelList* vchannelList;
77     EventList* eventList;
78     int numberWidth;
79     int videoMode;
80     ULONG streamType;
81
82     UINT currentChannelIndex;
83     UINT previousChannelIndex;
84     UINT osdChannelIndex;
85     int keying;
86     int keyingInput[10];
87
88     void doOK();
89     void doLeftRight(bool right);
90     void doUpDown(bool down);
91     void doChanUpDown(int which); // UP or DOWN
92     void doKey(int command);
93     void doEPG();
94     void doSummary();
95     void doAudioSelector();
96     void stop();
97     UINT upChannel(UINT index);
98     UINT downChannel(UINT index);
99     void toggleChopSides();
100
101     void displayOSD(bool newNowNextData);
102     void clearScreen();
103     void setClock();
104     void delData();
105     void setNowNextData();
106     void setSummaryData();
107     
108     VAudioSelector* vas;
109     
110     Wwss wss;
111     Region wssRegion;
112     bool dowss;
113     
114     Boxx osd;
115     WTextbox clock;
116     WTextbox osdChanNum;
117     WTextbox osdChanName;
118     WSelectList sl;
119     Boxx boxRed;
120     Boxx boxGreen;
121     Boxx boxYellow;
122     Boxx boxBlue;
123     WTextbox textRed;
124     WTextbox textGreen;
125     WTextbox textYellow;
126     WTextbox textBlue;
127     WSymbol sAspectRatio;
128     
129     Boxx summary;
130     WTextbox textSummary;
131     Boxx summaryBlackLine;
132     
133     Region osdSummaryRegion;
134
135 };
136
137 #endif