merge hv v6, rework trace methods
[goodguy/history.git] / cinelerra-5.1 / 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         PrefsFFMPEGEarlyProbe *ffmpeg_early_probe;
64         PrefsYUV420P_DVDlace *yuv420p_dvdlace;
65         PrefsFFMPEGMarkerIndecies *ffmpeg_marker_indexes;
66 };
67
68
69
70 class PrefsUseBRender : public BC_CheckBox
71 {
72 public:
73         PrefsUseBRender(PreferencesWindow *pwindow, 
74                 int x,
75                 int y);
76         int handle_event();
77         PreferencesWindow *pwindow;
78 };
79
80 class PrefsBRenderFragment : public BC_TumbleTextBox
81 {
82 public:
83         PrefsBRenderFragment(PreferencesWindow *pwindow, 
84                 PerformancePrefs *subwindow, 
85                 int x, 
86                 int y);
87         int handle_event();
88         PreferencesWindow *pwindow;
89 };
90
91
92
93 class PrefsRenderPreroll : public BC_TumbleTextBox
94 {
95 public:
96         PrefsRenderPreroll(PreferencesWindow *pwindow, 
97                 PerformancePrefs *subwindow, 
98                 int x, 
99                 int y);
100         ~PrefsRenderPreroll();
101         
102         int handle_event();
103         
104         PreferencesWindow *pwindow;
105 };
106
107 class PrefsBRenderPreroll : public BC_TumbleTextBox
108 {
109 public:
110         PrefsBRenderPreroll(PreferencesWindow *pwindow, 
111                 PerformancePrefs *subwindow, 
112                 int x, 
113                 int y);
114         int handle_event();
115         PreferencesWindow *pwindow;
116 };
117
118 class PrefsForceUniprocessor : public BC_CheckBox
119 {
120 public:
121         PrefsForceUniprocessor(PreferencesWindow *pwindow, int x, int y);
122         ~PrefsForceUniprocessor();
123         int handle_event();
124         
125         PreferencesWindow *pwindow;
126 };
127
128 class PrefsTrapSigSEGV : public BC_CheckBox
129 {
130 public:
131         PrefsTrapSigSEGV(PerformancePrefs *perf_prefs, int x, int y);
132         ~PrefsTrapSigSEGV();
133         int handle_event();
134         
135         PerformancePrefs *perf_prefs;
136 };
137
138 class PrefsTrapSigINTR : public BC_CheckBox
139 {
140 public:
141         PrefsTrapSigINTR(PerformancePrefs *perf_prefs, int x, int y);
142         ~PrefsTrapSigINTR();
143         int handle_event();
144         
145         PerformancePrefs *perf_prefs;
146 };
147
148 class PrefsFFMPEGEarlyProbe : public BC_CheckBox
149 {
150 public:
151         PrefsFFMPEGEarlyProbe(PerformancePrefs *perf_prefs, int x, int y);
152         ~PrefsFFMPEGEarlyProbe();
153         
154         int handle_event();
155
156         PerformancePrefs *perf_prefs;
157 };
158
159 class PrefsFFMPEGMarkerIndecies : public BC_CheckBox
160 {
161 public:
162         PrefsFFMPEGMarkerIndecies(PerformancePrefs *perf_prefs, int x, int y);
163         ~PrefsFFMPEGMarkerIndecies();
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 PrefsProjectSMP : public BC_TumbleTextBox
213 {
214 public:
215         PrefsProjectSMP(PreferencesWindow *pwindow, 
216                 PerformancePrefs *subwindow, int x, int y);
217         ~PrefsProjectSMP();
218         
219         int handle_event();
220         PreferencesWindow *pwindow;
221 };
222
223 class PrefsRenderFarmJobs : public BC_TumbleTextBox
224 {
225 public:
226         PrefsRenderFarmJobs(PreferencesWindow *pwindow, 
227                 PerformancePrefs *subwindow, 
228                 int x, 
229                 int y);
230         ~PrefsRenderFarmJobs();
231         
232         int handle_event();
233         
234         PreferencesWindow *pwindow;
235 };
236
237 class PrefsRenderFarmMountpoint : public BC_TextBox
238 {
239 public:
240         PrefsRenderFarmMountpoint(PreferencesWindow *pwindow, 
241                 PerformancePrefs *subwindow, 
242                 int x, 
243                 int y);
244         ~PrefsRenderFarmMountpoint();
245         
246         int handle_event();
247         
248         PreferencesWindow *pwindow;
249         PerformancePrefs *subwindow;
250 };
251
252 class PrefsRenderFarmVFS : public BC_CheckBox
253 {
254 public:
255         PrefsRenderFarmVFS(PreferencesWindow *pwindow,
256                 PerformancePrefs *subwindow,
257                 int x,
258                 int y);
259         int handle_event();
260         PreferencesWindow *pwindow;
261         PerformancePrefs *subwindow;
262 };
263
264 class PrefsRenderFarmNodes : public BC_ListBox
265 {
266 public:
267         PrefsRenderFarmNodes(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
268         ~PrefsRenderFarmNodes();
269         
270         int handle_event();
271         int selection_changed();
272         int column_resize_event();
273         
274         PreferencesWindow *pwindow;
275         PerformancePrefs *subwindow;
276 };
277
278 class PrefsRenderFarmEditNode : public BC_TextBox
279 {
280 public:
281         PrefsRenderFarmEditNode(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
282         ~PrefsRenderFarmEditNode();
283         
284         int handle_event();
285         
286         PerformancePrefs *subwindow;
287         PreferencesWindow *pwindow;
288 };
289
290 class PrefsRenderFarmNewNode : public BC_GenericButton
291 {
292 public:
293         PrefsRenderFarmNewNode(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
294         ~PrefsRenderFarmNewNode();
295         
296         int handle_event();
297         
298         
299         PerformancePrefs *subwindow;
300         PreferencesWindow *pwindow;
301 };
302
303 class PrefsRenderFarmReplaceNode : public BC_GenericButton
304 {
305 public:
306         PrefsRenderFarmReplaceNode(PreferencesWindow *pwindow, 
307                 PerformancePrefs *subwindow, 
308                 int x, 
309                 int y);
310         ~PrefsRenderFarmReplaceNode();
311         
312         int handle_event();
313         
314         
315         PerformancePrefs *subwindow;
316         PreferencesWindow *pwindow;
317 };
318
319 class PrefsRenderFarmDelNode : public BC_GenericButton
320 {
321 public:
322         PrefsRenderFarmDelNode(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
323         ~PrefsRenderFarmDelNode();
324         
325         int handle_event();
326         
327         PerformancePrefs *subwindow;
328         
329         PreferencesWindow *pwindow;
330 };
331
332 class PrefsRenderFarmSortNodes : public BC_GenericButton
333 {
334 public:
335         PrefsRenderFarmSortNodes(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
336         ~PrefsRenderFarmSortNodes();
337         
338         int handle_event();
339         
340         PerformancePrefs *subwindow;
341         PreferencesWindow *pwindow;
342 };
343
344
345 class PrefsRenderFarmReset : public BC_GenericButton
346 {
347 public:
348         PrefsRenderFarmReset(PreferencesWindow *pwindow, 
349                 PerformancePrefs *subwindow, 
350                 int x, int y);
351         
352         int handle_event();
353         
354         PerformancePrefs *subwindow;
355         PreferencesWindow *pwindow;
356 };
357
358
359 class PrefsYUV420P_DVDlace : public BC_CheckBox
360 {
361 public:
362         PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
363                 PerformancePrefs *subwindow,
364                 int x, int y);
365
366         int handle_event();
367
368         PerformancePrefs *subwindow;
369         PreferencesWindow *pwindow;
370 };
371
372
373
374 class CICacheSize : public BC_TumbleTextBox
375 {
376 public:
377         CICacheSize(int x, 
378                 int y, 
379                 PreferencesWindow *pwindow, 
380                 PerformancePrefs *subwindow);
381         int handle_event();
382         PreferencesWindow *pwindow;
383 };
384
385 #endif