]> git.vomp.tv Git - vompclient.git/blob - vvideolive.h
Add -s option to select server
[vompclient.git] / vvideolive.h
1 /*
2     Copyright 2004-2005 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #ifndef VVIDEOLIVE_H
22 #define VVIDEOLIVE_H
23
24 #include <stdio.h>
25 #include <vector>
26
27 #include "boxx.h"
28 #include "region.h"
29 #include "wwss.h"
30 #include "vdr.h"
31
32 class VEpg;
33 class VChannelList;
34 class VLiveBanner;
35 class VInfo;
36 class Video;
37 class VChannelList;
38 class BoxStack;
39
40 class VVideoLive : public Boxx
41 {
42   public:
43     VVideoLive(ChannelList* chanList, ULONG streamType, VChannelList* vchannelList);
44     ~VVideoLive();
45     static VVideoLive* getInstance();
46     int handleCommand(int command);
47     void processMessage(Message* m);
48     void streamEnd(); // from command
49
50     void channelChange(UCHAR changeType, UINT newData);
51     // changeType = INDEX = (newData is a channel index in the list)
52     //            = NUMBER = (newData is a real channel number)
53     //            = OFFSET = (newData is UP or DOWN)
54
55     void play(int noShowVLB = 0);
56     void stop(int noRemoveVLB = 0);
57
58     const static UCHAR INDEX = 1;
59     const static UCHAR NUMBER = 2;
60     const static UCHAR OFFSET = 3;
61     const static UCHAR PREVIOUS = 4;
62     const static UCHAR UP = 1;
63     const static UCHAR DOWN = 2;
64
65   private:
66     static VVideoLive* instance;
67     BoxStack* boxstack;
68     VDR* vdr;
69     Video* video;
70     void* player; // HA HA FIXME
71     ChannelList* chanList;
72     VChannelList* vchannelList;
73     UINT currentChannel;       // index in list
74     UINT previousChannel;      // index in list
75     int unavailable;
76     VInfo* unavailableView;
77     ULONG streamType;
78
79     UINT upChannel();
80     UINT downChannel();
81     void doBanner(bool takesCommands);
82     void showUnavailable(int active);
83     int xpos;
84     void showEPG();
85     void doNoSuchChannel();
86     void toggleChopSides();
87     int videoMode;
88     int saveUnavailable;
89
90     Wwss wss;
91     Region wssRegion;
92     bool dowss;
93 };
94
95 #endif