initial commit
[goodguy/history.git] / cinelerra-5.0 / cinelerra / avc1394transport.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * 
6  * This program 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  * This program 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 this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * 
20  */
21
22 #ifndef AVC1394TRANSPORT_H
23 #define AVC1394TRANSPORT_H
24
25 #include "avc1394control.h"
26 #include "mwindow.h"
27 #include "theme.h"
28
29 class AVC1394TransportThread;
30 class AVC1394Transport;
31 class AVC1394GUIRewind;
32 class AVC1394GUIReverse;
33 class AVC1394GUIStop;
34 class AVC1394GUIPause;
35 class AVC1394GUIPlay;
36 class AVC1394GUIFForward;
37 class AVC1394GUISeekStart;
38 class AVC1394GUISeekEnd;
39
40
41 class AVC1394TransportThread : public Thread
42 {
43 public:
44         AVC1394TransportThread(BC_Title *label, AVC1394Control *avc);
45         ~AVC1394TransportThread();
46
47         void run();
48
49         BC_Title *label;
50         AVC1394Control *avc;
51
52         int tid;
53         int done;
54 };
55
56 class AVC1394Transport
57 {
58 public:
59         AVC1394Transport(MWindow *mwindow, AVC1394Control *avc, BC_WindowBase *window, int x, int y);
60         ~AVC1394Transport();
61
62         void create_objects();
63         void reposition_window(int x, int y);
64         int keypress_event(int keypress);
65         
66         MWindow *mwindow;
67         AVC1394Control *avc;
68         BC_WindowBase *window;
69         int x;
70         int y;
71         int x_end;
72
73 // Buttons
74    AVC1394GUIRewind *rewind_button;
75    AVC1394GUIReverse *reverse_button;
76    AVC1394GUIStop *stop_button;
77    AVC1394GUIPause *pause_button;
78    AVC1394GUIPlay *play_button;
79    AVC1394GUIFForward *fforward_button;
80         AVC1394GUISeekStart *start_button;
81         AVC1394GUISeekEnd *end_button;
82 };
83
84 class AVC1394GUISeekStart : public BC_Button
85 {
86 public:
87    AVC1394GUISeekStart(MWindow *mwindow, AVC1394Control *avc, int x, int y);
88    ~AVC1394GUISeekStart();
89
90    int handle_event();
91    int keypress_event();
92    MWindow *mwindow;
93    AVC1394Control *avc;
94 };
95
96 class AVC1394GUIRewind : public BC_Button
97 {
98 public:
99    AVC1394GUIRewind(MWindow *mwindow, AVC1394Control *avc, int x, int y);
100    ~AVC1394GUIRewind();
101
102    int handle_event();
103    int keypress_event();
104    MWindow *mwindow;
105    AVC1394Control *avc;
106 };
107
108 class AVC1394GUIReverse : public BC_Button
109 {
110 public:
111    AVC1394GUIReverse(MWindow *mwindow, AVC1394Control *avc, int x, int y);
112    ~AVC1394GUIReverse();
113
114    int handle_event();
115    int keypress_event();
116    MWindow *mwindow;
117    AVC1394Control *avc;
118 };
119
120 class AVC1394GUIStop : public BC_Button
121 {
122 public:
123    AVC1394GUIStop(MWindow *mwindow, AVC1394Control *avc, int x, int y);
124    ~AVC1394GUIStop();
125
126    int handle_event();
127    int keypress_event();
128    MWindow *mwindow;
129    AVC1394Control *avc;
130 };
131
132 class AVC1394GUIPause : public BC_Button
133 {
134 public:
135    AVC1394GUIPause(MWindow *mwindow, AVC1394Control *avc, int x, int y);
136    ~AVC1394GUIPause();
137
138    int handle_event();
139    int keypress_event();
140    MWindow *mwindow;
141    AVC1394Control *avc;
142 };
143
144 class AVC1394GUIPlay : public BC_Button
145 {
146 public:
147    AVC1394GUIPlay(MWindow *mwindow, AVC1394Control *avc, int x, int y);
148    ~AVC1394GUIPlay();
149
150    int handle_event();
151    int keypress_event();
152    MWindow *mwindow;
153    AVC1394Control *avc;
154         int mode;
155 };
156
157 class AVC1394GUIFForward : public BC_Button
158 {
159 public:
160    AVC1394GUIFForward(MWindow *mwindow, AVC1394Control *avc, int x, int y);
161    ~AVC1394GUIFForward();
162
163    int handle_event();
164    int keypress_event();
165    MWindow *mwindow;
166    AVC1394Control *avc;
167 };
168
169 class AVC1394GUISeekEnd : public BC_Button
170 {
171 public:
172    AVC1394GUISeekEnd(MWindow *mwindow, AVC1394Control *avc, int x, int y);
173    ~AVC1394GUISeekEnd();
174
175    int handle_event();
176    int keypress_event();
177    MWindow *mwindow;
178    AVC1394Control *avc;
179 };
180
181 #endif