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