initial commit
[goodguy/history.git] / cinelerra-5.0 / cinelerra / performanceprefs.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 PERFORMANCEPREFS_H
23 #define PERFORMANCEPREFS_H
24
25
26 #include "formattools.inc"
27 #include "mwindow.inc"
28 #include "performanceprefs.inc"
29 #include "preferencesthread.h"
30
31
32 class PerformancePrefs : public PreferencesDialog
33 {
34 public:
35         PerformancePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
36         ~PerformancePrefs();
37
38         void create_objects();
39
40         void generate_node_list();
41         void update_node_list();
42         void update_rates();
43
44         int hot_node;
45
46         CICacheSize *cache_size;
47
48         enum
49         {
50                 ENABLED_COLUMN,
51                 HOSTNAME_COLUMN,
52                 PORT_COLUMN,
53                 RATE_COLUMN,
54                 TOTAL_COLUMNS
55         };
56
57         ArrayList<BC_ListBoxItem*> nodes[4];
58         PrefsRenderFarmEditNode *edit_node;
59         PrefsRenderFarmPort *edit_port;
60         PrefsRenderFarmNodes *node_list;
61         FormatTools *brender_tools;
62         BC_Title *master_rate;
63         PrefsFileForking *file_forking;
64         PrefsFFMPEGEarlyProbe *ffmpeg_early_probe;
65 };
66
67
68
69 class PrefsUseBRender : public BC_CheckBox
70 {
71 public:
72         PrefsUseBRender(PreferencesWindow *pwindow, 
73                 int x,
74                 int y);
75         int handle_event();
76         PreferencesWindow *pwindow;
77 };
78
79 class PrefsBRenderFragment : public BC_TumbleTextBox
80 {
81 public:
82         PrefsBRenderFragment(PreferencesWindow *pwindow, 
83                 PerformancePrefs *subwindow, 
84                 int x, 
85                 int y);
86         int handle_event();
87         PreferencesWindow *pwindow;
88 };
89
90
91
92 class PrefsRenderPreroll : public BC_TumbleTextBox
93 {
94 public:
95         PrefsRenderPreroll(PreferencesWindow *pwindow, 
96                 PerformancePrefs *subwindow, 
97                 int x, 
98                 int y);
99         ~PrefsRenderPreroll();
100         
101         int handle_event();
102         
103         PreferencesWindow *pwindow;
104 };
105
106 class PrefsBRenderPreroll : public BC_TumbleTextBox
107 {
108 public:
109         PrefsBRenderPreroll(PreferencesWindow *pwindow, 
110                 PerformancePrefs *subwindow, 
111                 int x, 
112                 int y);
113         int handle_event();
114         PreferencesWindow *pwindow;
115 };
116
117 class PrefsForceUniprocessor : public BC_CheckBox
118 {
119 public:
120         PrefsForceUniprocessor(PreferencesWindow *pwindow, int x, int y);
121         ~PrefsForceUniprocessor();
122         int handle_event();
123         
124         PreferencesWindow *pwindow;
125 };
126
127 class PrefsTrapSigSEGV : public BC_CheckBox
128 {
129 public:
130         PrefsTrapSigSEGV(PerformancePrefs *perf_prefs, int x, int y);
131         ~PrefsTrapSigSEGV();
132         int handle_event();
133         
134         PerformancePrefs *perf_prefs;
135 };
136
137 class PrefsTrapSigINTR : public BC_CheckBox
138 {
139 public:
140         PrefsTrapSigINTR(PerformancePrefs *perf_prefs, int x, int y);
141         ~PrefsTrapSigINTR();
142         int handle_event();
143         
144         PerformancePrefs *perf_prefs;
145 };
146
147 class PrefsFileForking : public BC_CheckBox
148 {
149 public:
150         PrefsFileForking(PerformancePrefs *perf_prefs, int x, int y);
151         ~PrefsFileForking();
152         
153         int handle_event();
154         void check_enable();
155
156         PerformancePrefs *perf_prefs;
157 };
158
159 class PrefsFFMPEGEarlyProbe : public BC_CheckBox
160 {
161 public:
162         PrefsFFMPEGEarlyProbe(PerformancePrefs *perf_prefs, int x, int y);
163         ~PrefsFFMPEGEarlyProbe();
164         
165         int handle_event();
166
167         PerformancePrefs *perf_prefs;
168 };
169
170
171
172
173 class PrefsRenderFarm : public BC_CheckBox
174 {
175 public:
176         PrefsRenderFarm(PreferencesWindow *pwindow, int x, int y);
177         ~PrefsRenderFarm();
178         
179         int handle_event();
180         
181         
182         PreferencesWindow *pwindow;
183 };
184
185 class PrefsRenderFarmConsolidate : public BC_CheckBox
186 {
187 public:
188         PrefsRenderFarmConsolidate(PreferencesWindow *pwindow, int x, int y);
189         ~PrefsRenderFarmConsolidate();
190         
191         int handle_event();
192         
193         
194         PreferencesWindow *pwindow;
195 };
196
197
198 class PrefsRenderFarmPort : public BC_TumbleTextBox
199 {
200 public:
201         PrefsRenderFarmPort(PreferencesWindow *pwindow, 
202                 PerformancePrefs *subwindow, 
203                 int x, 
204                 int y);
205         ~PrefsRenderFarmPort();
206         
207         int handle_event();
208         
209         PreferencesWindow *pwindow;
210 };
211
212 class PrefsRenderFarmJobs : public BC_TumbleTextBox
213 {
214 public:
215         PrefsRenderFarmJobs(PreferencesWindow *pwindow, 
216                 PerformancePrefs *subwindow, 
217                 int x, 
218                 int y);
219         ~PrefsRenderFarmJobs();
220         
221         int handle_event();
222         
223         PreferencesWindow *pwindow;
224 };
225
226 class PrefsRenderFarmMountpoint : public BC_TextBox
227 {
228 public:
229         PrefsRenderFarmMountpoint(PreferencesWindow *pwindow, 
230                 PerformancePrefs *subwindow, 
231                 int x, 
232                 int y);
233         ~PrefsRenderFarmMountpoint();
234         
235         int handle_event();
236         
237         PreferencesWindow *pwindow;
238         PerformancePrefs *subwindow;
239 };
240
241 class PrefsRenderFarmVFS : public BC_CheckBox
242 {
243 public:
244         PrefsRenderFarmVFS(PreferencesWindow *pwindow,
245                 PerformancePrefs *subwindow,
246                 int x,
247                 int y);
248         int handle_event();
249         PreferencesWindow *pwindow;
250         PerformancePrefs *subwindow;
251 };
252
253 class PrefsRenderFarmNodes : public BC_ListBox
254 {
255 public:
256         PrefsRenderFarmNodes(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
257         ~PrefsRenderFarmNodes();
258         
259         int handle_event();
260         int selection_changed();
261         int column_resize_event();
262         
263         PreferencesWindow *pwindow;
264         PerformancePrefs *subwindow;
265 };
266
267 class PrefsRenderFarmEditNode : public BC_TextBox
268 {
269 public:
270         PrefsRenderFarmEditNode(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
271         ~PrefsRenderFarmEditNode();
272         
273         int handle_event();
274         
275         PerformancePrefs *subwindow;
276         PreferencesWindow *pwindow;
277 };
278
279 class PrefsRenderFarmNewNode : public BC_GenericButton
280 {
281 public:
282         PrefsRenderFarmNewNode(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
283         ~PrefsRenderFarmNewNode();
284         
285         int handle_event();
286         
287         
288         PerformancePrefs *subwindow;
289         PreferencesWindow *pwindow;
290 };
291
292 class PrefsRenderFarmReplaceNode : public BC_GenericButton
293 {
294 public:
295         PrefsRenderFarmReplaceNode(PreferencesWindow *pwindow, 
296                 PerformancePrefs *subwindow, 
297                 int x, 
298                 int y);
299         ~PrefsRenderFarmReplaceNode();
300         
301         int handle_event();
302         
303         
304         PerformancePrefs *subwindow;
305         PreferencesWindow *pwindow;
306 };
307
308 class PrefsRenderFarmDelNode : public BC_GenericButton
309 {
310 public:
311         PrefsRenderFarmDelNode(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
312         ~PrefsRenderFarmDelNode();
313         
314         int handle_event();
315         
316         PerformancePrefs *subwindow;
317         
318         PreferencesWindow *pwindow;
319 };
320
321 class PrefsRenderFarmSortNodes : public BC_GenericButton
322 {
323 public:
324         PrefsRenderFarmSortNodes(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
325         ~PrefsRenderFarmSortNodes();
326         
327         int handle_event();
328         
329         PerformancePrefs *subwindow;
330         PreferencesWindow *pwindow;
331 };
332
333
334 class PrefsRenderFarmReset : public BC_GenericButton
335 {
336 public:
337         PrefsRenderFarmReset(PreferencesWindow *pwindow, 
338                 PerformancePrefs *subwindow, 
339                 int x, 
340                 int y);
341         
342         int handle_event();
343         
344         PerformancePrefs *subwindow;
345         PreferencesWindow *pwindow;
346 };
347
348
349
350 class CICacheSize : public BC_TumbleTextBox
351 {
352 public:
353         CICacheSize(int x, 
354                 int y, 
355                 PreferencesWindow *pwindow, 
356                 PerformancePrefs *subwindow);
357         int handle_event();
358         PreferencesWindow *pwindow;
359 };
360
361
362
363
364
365 #endif