]> git.vomp.tv Git - vompclient.git/blob - vvideomedia.h
Windows fixes
[vompclient.git] / vvideomedia.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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19 */
20
21 #ifndef VVIDEOMEDIA_H
22 #define VVIDEOMEDIA_H
23
24 #include <stdio.h>
25
26 #include "boxx.h"
27 #include "timers.h"
28 #include "wwss.h"
29 #include "region.h"
30 #include "colour.h"
31 #include "recinfo.h"
32
33 class PlayerMedia;
34 class Recording;
35 class VAudioSelector;
36 class Message;
37 class BoxStack;
38 class VInfo;
39 class Media;
40 class VMediaList;
41
42
43 class VVideoMedia : public Boxx, public TimerReceiver
44 {
45   public:
46     VVideoMedia(Media* myMedia,VMediaList *lparent);  //media has to contain URI
47     virtual ~VVideoMedia();
48     int handleCommand(int command);
49     void go(bool resume);
50
51     void timercall(int clientReference);
52     void processMessage(Message* m);
53
54
55
56   private:
57     BoxStack* boxstack;
58     Video* video;
59     Timers* timers;
60     PlayerMedia* player;
61     Media* myMedia;
62
63     VAudioSelector* vas;
64
65     DrawStyle transparent;
66     DrawStyle barBlue;
67
68     UCHAR videoMode;
69     void toggleChopSides();
70
71     bool playing;
72
73     bool barShowing;
74     bool barGenHold;
75     bool barScanHold;
76     bool barVasHold;
77
78     void doAudioSelector();
79     void doBar(int action);
80     void drawBarClocks();
81     void stopPlay();
82     void removeBar();
83     void doSummary();
84     void removeSummary();
85     //create an abbreviated text
86     //buffer must be len(title,intext)+3
87     //returns buffer
88     char * shortendedText(const char *title,const char *title2,const char *intext,char *buffer,UINT width);
89     hmsf ptsToHMS(ULLONG pts);
90     Region barRegion;
91     Region clocksRegion;
92
93
94     Wwss wss;
95     Region wssRegion;
96     bool dowss;
97     
98     VInfo* vsummary;
99     VMediaList *lparent;
100     ULLONG lengthBytes;
101 };
102
103 #endif