r802: Remove renderframfsclient and renderfarmfsserver .h and .C from Makefile.am...
[cinelerra_cv/mob.git] / cinelerra / batchrender.h
blob8ff214295bce65876fffef8ccb953614a37de45e
1 #ifndef BATCHRENDER_H
2 #define BATCHRENDER_H
4 #include "arraylist.h"
5 #include "asset.inc"
6 #include "batchrender.inc"
7 #include "bcdialog.h"
8 #include "browsebutton.inc"
9 #include "filexml.inc"
10 #include "formattools.h"
11 #include "mwindow.inc"
12 #include "preferences.inc"
13 #include "timeentry.h"
15 #define BATCHRENDER_COLUMNS 4
20 class BatchRenderMenuItem : public BC_MenuItem
22 public:
23 BatchRenderMenuItem(MWindow *mwindow);
24 int handle_event();
25 MWindow *mwindow;
30 class BatchRenderJob
32 public:
33 BatchRenderJob(Preferences *preferences);
34 ~BatchRenderJob();
36 void copy_from(BatchRenderJob *src);
37 void load(FileXML *file);
38 void save(FileXML *file);
39 void fix_strategy();
41 // Source EDL to render
42 char edl_path[BCTEXTLEN];
43 // Destination file for output
44 Asset *asset;
45 int strategy;
46 int enabled;
47 // Amount of time elapsed in last render operation
48 double elapsed;
49 Preferences *preferences;
59 class BatchRenderThread : public BC_DialogThread
61 public:
62 BatchRenderThread(MWindow *mwindow);
63 BatchRenderThread();
64 void handle_close_event(int result);
65 BC_Window* new_gui();
67 int test_edl_files();
68 void calculate_dest_paths(ArrayList<char*> *paths,
69 Preferences *preferences,
70 ArrayList<PluginServer*> *plugindb);
72 // Load batch rendering jobs
73 void load_jobs(char *path, Preferences *preferences);
74 // Not applicable to western civilizations
75 void save_jobs(char *path);
76 void load_defaults(Defaults *defaults);
77 void save_defaults(Defaults *defaults);
78 // Create path for persistent storage functions
79 char* create_path(char *string);
80 void new_job();
81 void delete_job();
82 // Conditionally returns the job or the default job based on current_job
83 BatchRenderJob* get_current_job();
84 Asset* get_current_asset();
85 char* get_current_edl();
86 // For command line usage
87 void start_rendering(char *config_path, char *batch_path);
88 // For GUI usage
89 void start_rendering();
90 void stop_rendering();
91 // Highlight the currently rendering job.
92 void update_active(int number);
93 void update_done(int number, int create_list, double elapsed_time);
94 void move_batch(int src, int dst);
96 MWindow *mwindow;
97 double current_start;
98 double current_end;
99 BatchRenderJob *default_job;
100 ArrayList<BatchRenderJob*> jobs;
101 BatchRenderGUI *gui;
102 int column_width[BATCHRENDER_COLUMNS];
103 // job being edited
104 int current_job;
105 // job being rendered
106 int rendering_job;
107 int is_rendering;
119 class BatchRenderEDLPath : public BC_TextBox
121 public:
122 BatchRenderEDLPath(BatchRenderThread *thread,
123 int x,
124 int y,
125 int w,
126 char *text);
127 int handle_event();
128 BatchRenderThread *thread;
132 class BatchRenderNew : public BC_GenericButton
134 public:
135 BatchRenderNew(BatchRenderThread *thread,
136 int x,
137 int y);
138 int handle_event();
139 BatchRenderThread *thread;
142 class BatchRenderDelete : public BC_GenericButton
144 public:
145 BatchRenderDelete(BatchRenderThread *thread,
146 int x,
147 int y);
148 int handle_event();
149 BatchRenderThread *thread;
152 class BatchRenderList : public BC_ListBox
154 public:
155 BatchRenderList(BatchRenderThread *thread,
156 int x,
157 int y,
158 int w,
159 int h);
160 int handle_event();
161 int selection_changed();
162 int column_resize_event();
163 int drag_start_event();
164 int drag_motion_event();
165 int drag_stop_event();
166 int dragging_item;
167 BatchRenderThread *thread;
169 class BatchRenderStart : public BC_GenericButton
171 public:
172 BatchRenderStart(BatchRenderThread *thread,
173 int x,
174 int y);
175 int handle_event();
176 BatchRenderThread *thread;
179 class BatchRenderStop : public BC_GenericButton
181 public:
182 BatchRenderStop(BatchRenderThread *thread,
183 int x,
184 int y);
185 int handle_event();
186 BatchRenderThread *thread;
189 class BatchRenderCancel : public BC_GenericButton
191 public:
192 BatchRenderCancel(BatchRenderThread *thread,
193 int x,
194 int y);
195 int handle_event();
196 int keypress_event();
197 BatchRenderThread *thread;
201 class BatchFormat : public FormatTools
203 public:
204 BatchFormat(MWindow *mwindow,
205 BatchRenderGUI *gui,
206 Asset *asset);
207 ~BatchFormat();
209 int handle_event();
211 BatchRenderGUI *gui;
212 MWindow *mwindow;
216 class BatchRenderGUI : public BC_Window
218 public:
219 BatchRenderGUI(MWindow *mwindow,
220 BatchRenderThread *thread,
221 int x,
222 int y,
223 int w,
224 int h);
225 ~BatchRenderGUI();
227 void create_objects();
228 int resize_event(int w, int h);
229 int translation_event();
230 int close_event();
231 void create_list(int update_widget);
232 void change_job();
234 ArrayList<BC_ListBoxItem*> list_columns[BATCHRENDER_COLUMNS];
236 MWindow *mwindow;
237 BatchRenderThread *thread;
238 BC_Title *output_path_title;
239 BatchFormat *format_tools;
240 BrowseButton *edl_path_browse;
241 BatchRenderEDLPath *edl_path_text;
242 BC_Title *edl_path_title;
243 // BC_Title *status_title;
244 // BC_Title *status_text;
245 // BC_ProgressBar *progress_bar;
246 BC_Title *list_title;
247 BatchRenderNew *new_batch;
248 BatchRenderDelete *delete_batch;
249 BatchRenderList *batch_list;
250 BatchRenderStart *start_button;
251 BatchRenderStop *stop_button;
252 BatchRenderCancel *cancel_button;
259 #endif