remove whitespace at eol
[goodguy/history.git] / cinelerra-5.1 / cinelerra / playbackprefs.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 PLAYBACKPREFS_H
23 #define PLAYBACKPREFS_H
24
25
26 class PlaybackPrefs;
27 class PlaybackModuleFragment;
28 class PlaybackAudioOffset;
29 class PlaybackViewFollows;
30 class PlaybackSoftwareTimer;
31 class PlaybackRealTime;
32 class PlaybackMap51_2;
33 class TimecodeOffset;
34 class VideoAsynchronous;
35 class VideoEveryFrame;
36 class PlaybackDeblock;
37 class PlaybackPreload;
38 class PlaybackInterpolateRaw;
39 class PlaybackWhiteBalanceRaw;
40 class PlaybackSubtitle;
41 class PlaybackSubtitleNumber;
42 class PlaybackLabelCells;
43 class PlaybackProgramNumber;
44 class PlaybackGain;
45
46 #include "adeviceprefs.h"
47 #include "guicast.h"
48 #include "mwindow.inc"
49 #include "preferencesthread.h"
50 #include "vdeviceprefs.h"
51
52 class PlaybackPrefs : public PreferencesDialog
53 {
54 public:
55         PlaybackPrefs(MWindow *mwindow, PreferencesWindow *pwindow, int config_number);
56         ~PlaybackPrefs();
57
58         void create_objects();
59 //      int set_strategy(int strategy);
60
61         static char* strategy_to_string(int strategy);
62         void delete_strategy();
63
64         int draw_framerate(int flush /* = 1 */);
65
66         int config_number;
67         ADevicePrefs *audio_device;
68         VDevicePrefs *video_device;
69         ArrayList<BC_ListBoxItem*> strategies;
70
71         PlaybackConfig *playback_config;
72         BC_Title *framerate_title;
73         PlaybackDeblock *mpeg4_deblock;
74         PlaybackInterpolateRaw *interpolate_raw;
75         PlaybackWhiteBalanceRaw *white_balance_raw;
76         VideoAsynchronous *asynchronous;
77
78         BC_Title *vdevice_title;
79         PlaybackAudioOffset *audio_offset;
80         PlaybackGain *play_gain;
81 };
82
83 class PlaybackModuleFragment : public BC_PopupMenu
84 {
85 public:
86         PlaybackModuleFragment(int x,
87                 int y,
88                 PreferencesWindow *pwindow,
89                 PlaybackPrefs *playback,
90                 char *text);
91         int handle_event();
92         PreferencesWindow *pwindow;
93         PlaybackPrefs *playback;
94 };
95
96 class PlaybackAudioOffset : public BC_TumbleTextBox
97 {
98 public:
99         PlaybackAudioOffset(PreferencesWindow *pwindow,
100                 PlaybackPrefs *subwindow,
101                 int x,
102                 int y);
103         int handle_event();
104         PreferencesWindow *pwindow;
105         PlaybackPrefs *playback;
106 };
107
108
109 class PlaybackViewFollows : public BC_CheckBox
110 {
111 public:
112         PlaybackViewFollows(PreferencesWindow *pwindow, int value, int y);
113         int handle_event();
114         PreferencesWindow *pwindow;
115 };
116
117 class PlaybackSoftwareTimer : public BC_CheckBox
118 {
119 public:
120         PlaybackSoftwareTimer(PreferencesWindow *pwindow, int value, int y);
121         int handle_event();
122         PreferencesWindow *pwindow;
123 };
124
125 class PlaybackRealTime : public BC_CheckBox
126 {
127 public:
128         PlaybackRealTime(PreferencesWindow *pwindow, int value, int y);
129         int handle_event();
130         PreferencesWindow *pwindow;
131 };
132
133 class PlaybackMap51_2 : public BC_CheckBox
134 {
135 public:
136         PlaybackMap51_2(PreferencesWindow *pwindow,
137                 PlaybackPrefs *playback_prefs, int x, int y);
138         int handle_event();
139         PreferencesWindow *pwindow;
140         PlaybackPrefs *playback_prefs;
141 };
142
143 class VideoAsynchronous : public BC_CheckBox
144 {
145 public:
146         VideoAsynchronous(PreferencesWindow *pwindow, int x, int y);
147         int handle_event();
148         PreferencesWindow *pwindow;
149 };
150
151 class VideoEveryFrame : public BC_CheckBox
152 {
153 public:
154         VideoEveryFrame(PreferencesWindow *pwindow,
155                 PlaybackPrefs *playback_prefs, int x, int y);
156         int handle_event();
157         PreferencesWindow *pwindow;
158         PlaybackPrefs *playback_prefs;
159 };
160
161 class PlaybackDeblock : public BC_CheckBox
162 {
163 public:
164         PlaybackDeblock(PreferencesWindow *pwindow, int x, int y);
165         int handle_event();
166         PreferencesWindow *pwindow;
167 };
168
169 class PlaybackPreload : public BC_TextBox
170 {
171 public:
172         PlaybackPreload(int x,
173                 int y,
174                 PreferencesWindow *pwindow,
175                 PlaybackPrefs *playback,
176                 char *text);
177         int handle_event();
178         PreferencesWindow *pwindow;
179         PlaybackPrefs *playback;
180 };
181
182 class PlaybackInterpolateRaw : public BC_CheckBox
183 {
184 public:
185         PlaybackInterpolateRaw(int x,
186                 int y,
187                 PreferencesWindow *pwindow,
188                 PlaybackPrefs *playback);
189         int handle_event();
190         PreferencesWindow *pwindow;
191         PlaybackPrefs *playback;
192 };
193
194 class PlaybackWhiteBalanceRaw : public BC_CheckBox
195 {
196 public:
197         PlaybackWhiteBalanceRaw(int x,
198                 int y,
199                 PreferencesWindow *pwindow,
200                 PlaybackPrefs *playback);
201         int handle_event();
202         PreferencesWindow *pwindow;
203         PlaybackPrefs *playback;
204 };
205
206 class TimecodeOffset : public BC_TextBox
207 {
208         public:
209                 TimecodeOffset(int x, int y, PreferencesWindow *pwindow,
210                                PlaybackPrefs *playback, char *text, int unit);
211                 int handle_event();
212                 int unit;
213                 PlaybackPrefs *playback;
214                 PreferencesWindow *pwindow;
215 };
216
217 class PlaybackSubtitle : public BC_CheckBox
218 {
219 public:
220         PlaybackSubtitle(int x,
221                 int y,
222                 PreferencesWindow *pwindow,
223                 PlaybackPrefs *playback);
224         int handle_event();
225         PreferencesWindow *pwindow;
226         PlaybackPrefs *playback;
227 };
228
229 class PlaybackSubtitleNumber : public BC_TumbleTextBox
230 {
231 public:
232         PlaybackSubtitleNumber(int x, int y,
233                 PreferencesWindow *pwindow,
234                 PlaybackPrefs *playback);
235         int handle_event();
236         PreferencesWindow *pwindow;
237         PlaybackPrefs *playback;
238 };
239
240 class PlaybackLabelCells : public BC_CheckBox
241 {
242 public:
243         PlaybackLabelCells(int x, int y,
244                 PreferencesWindow *pwindow,
245                 PlaybackPrefs *playback);
246         int handle_event();
247         PreferencesWindow *pwindow;
248         PlaybackPrefs *playback;
249 };
250
251 class PlaybackProgramNumber : public BC_TumbleTextBox
252 {
253 public:
254         PlaybackProgramNumber(int x, int y,
255                 PreferencesWindow *pwindow,
256                 PlaybackPrefs *playback);
257         int handle_event();
258         PreferencesWindow *pwindow;
259         PlaybackPrefs *playback;
260 };
261
262 class PlaybackGain : public BC_TumbleTextBox
263 {
264 public:
265         PlaybackGain(int x, int y,
266                 PreferencesWindow *pwindow,
267                 PlaybackPrefs *gui);
268         int handle_event();
269         PreferencesWindow *pwindow;
270 };
271
272 #endif