5 #include "batchrender.h"
6 #include "bcwindowbase.h"
9 #include "bclistboxitem.inc"
10 #include "bcmenuitem.h"
11 #include "bctextbox.h"
12 #include "browsebutton.h"
16 #include "bdcreate.inc"
19 class CreateBD_MenuItem : public BC_MenuItem
22 CreateBD_MenuItem(MWindow *mwindow);
27 class BD_BatchRenderJob : public BatchRenderJob
30 static int get_udfs_mount(char *udfs, char *mopts, char *mntpt);
31 BD_BatchRenderJob(Preferences *preferences, int labeled, int farmed);
32 char *create_script(EDL *edl, ArrayList<Indexable *> *idxbls);
37 class CreateBD_Thread : public BC_DialogThread
39 static const int64_t BD_SIZE;
40 static const int BD_STREAMS, BD_WIDTH, BD_HEIGHT;
41 static const double BD_ASPECT_WIDTH, BD_ASPECT_HEIGHT;
42 static const double BD_WIDE_ASPECT_WIDTH, BD_WIDE_ASPECT_HEIGHT;
43 static const int BD_MAX_BITRATE, BD_CHANNELS, BD_WIDE_CHANNELS;
44 static const double BD_FRAMERATE, BD_SAMPLERATE, BD_KAUDIO_RATE;
45 static const int BD_INTERLACE_MODE;
47 CreateBD_Thread(MWindow *mwindow);
49 void handle_close_event(int result);
52 int create_bd_script(const char *path, EDL *edl);
53 int create_bd_jobs(ArrayList<BatchRenderJob*> *jobs, const char *asset_dir);
54 int insert_video_plugin(const char *title, KeyFrame *default_keyframe);
59 char asset_title[BCTEXTLEN];
60 char tmp_path[BCTEXTLEN];
61 char use_profile[BCTEXTLEN];
62 int use_deinterlace, use_inverse_telecine;
63 int use_scale, use_resize_tracks;
64 int use_wide_audio, use_farmed;
65 int use_histogram, use_labeled;
72 double bd_aspect_width;
73 double bd_aspect_height;
77 double bd_kaudio_rate;
78 int bd_interlace_mode;
81 BD_BatchRenderJob *batchrender;
84 class CreateBD_OK : public BC_OKButton
87 CreateBD_OK(CreateBD_GUI *gui, int x, int y);
89 int button_press_event();
95 class CreateBD_Cancel : public BC_CancelButton
98 CreateBD_Cancel(CreateBD_GUI *gui, int x, int y);
100 int button_press_event();
106 class CreateBD_DiskSpace : public BC_Title
109 CreateBD_DiskSpace(CreateBD_GUI *gui, int x, int y);
110 ~CreateBD_DiskSpace();
111 int64_t tmp_path_space();
117 class CreateBD_TmpPath : public BC_TextBox
120 CreateBD_TmpPath(CreateBD_GUI *gui, int x, int y, int w);
128 class CreateBD_AssetTitle : public BC_TextBox
131 CreateBD_AssetTitle(CreateBD_GUI *gui, int x, int y, int w);
132 ~CreateBD_AssetTitle();
138 class CreateBD_Deinterlace : public BC_CheckBox
141 CreateBD_Deinterlace(CreateBD_GUI *gui, int x, int y);
142 ~CreateBD_Deinterlace();
148 class CreateBD_InverseTelecine : public BC_CheckBox
151 CreateBD_InverseTelecine(CreateBD_GUI *gui, int x, int y);
152 ~CreateBD_InverseTelecine();
158 class CreateBD_ResizeTracks : public BC_CheckBox
161 CreateBD_ResizeTracks(CreateBD_GUI *gui, int x, int y);
162 ~CreateBD_ResizeTracks();
167 class CreateBD_Histogram : public BC_CheckBox
170 CreateBD_Histogram(CreateBD_GUI *gui, int x, int y);
171 ~CreateBD_Histogram();
176 class CreateBD_LabelChapters : public BC_CheckBox
179 CreateBD_LabelChapters(CreateBD_GUI *gui, int x, int y);
180 ~CreateBD_LabelChapters();
185 class CreateBD_UseRenderFarm : public BC_CheckBox
188 CreateBD_UseRenderFarm(CreateBD_GUI *gui, int x, int y);
189 ~CreateBD_UseRenderFarm();
195 class CreateBD_WideAudio : public BC_CheckBox
198 CreateBD_WideAudio(CreateBD_GUI *gui, int x, int y);
199 ~CreateBD_WideAudio();
205 class CreateBD_UseTsmuxer : public BC_CheckBox
208 CreateBD_UseTsmuxer(CreateBD_GUI *gui, int x, int y);
209 ~CreateBD_UseTsmuxer();
215 class CreateBD_GUI : public BC_Window
218 CreateBD_GUI(CreateBD_Thread *thread,
219 int x, int y, int w, int h);
222 void create_objects();
223 int resize_event(int w, int h);
224 int translation_event();
228 CreateBD_Thread *thread;
230 CreateBD_AssetTitle *asset_title;
232 CreateBD_TmpPath *tmp_path;
233 BrowseButton *btmp_path;
234 CreateBD_DiskSpace *disk_space;
235 CreateBD_Format *standard;
236 CreateBD_Scale *scale;
237 ArrayList<BC_ListBoxItem *> media_sizes;
238 CreateBD_MediaSize *media_size;
239 CreateBD_Deinterlace *need_deinterlace;
240 CreateBD_InverseTelecine *need_inverse_telecine;
241 CreateBD_ResizeTracks *need_resize_tracks;
242 CreateBD_Histogram *need_histogram;
243 CreateBD_UseTsmuxer *need_tsmuxer;
244 BC_Title *non_standard;
245 CreateBD_WideAudio *need_wide_audio;
246 CreateBD_LabelChapters *need_labeled;
247 CreateBD_UseRenderFarm *need_farmed;
248 int ok_x, ok_y, ok_w, ok_h;
250 int cancel_x, cancel_y, cancel_w, cancel_h;
251 CreateBD_Cancel *cancel;
252 ArrayList<BC_ListBoxItem *> profiles;
253 CreateBD_Profile *profile;
256 class CreateBD_FormatItem : public BC_MenuItem
260 CreateBD_FormatItem(CreateBD_Format *popup, int standard, const char *name);
261 ~CreateBD_FormatItem();
263 CreateBD_Format *popup;
267 class CreateBD_Format : public BC_PopupMenu
270 void create_objects();
272 CreateBD_Format(CreateBD_GUI *gui, int x, int y);
274 void set_value(int v) { set_text(get_item(v)->get_text()); }
279 class CreateBD_ScaleItem : public BC_MenuItem
283 CreateBD_ScaleItem(CreateBD_Scale *popup, int scale, const char *text);
284 ~CreateBD_ScaleItem();
286 CreateBD_Scale *popup;
290 class CreateBD_Scale : public BC_PopupMenu
293 void create_objects();
295 CreateBD_Scale(CreateBD_GUI *gui, int x, int y);
299 void set_value(int v) { set_text(Rescale::scale_types[v]); }
302 class CreateBD_MediaSize : public BC_PopupTextBox
305 CreateBD_MediaSize(CreateBD_GUI *gui, int x, int y);
306 ~CreateBD_MediaSize();
312 class CreateBD_Profile : public BC_PopupTextBox
315 CreateBD_Profile(CreateBD_GUI *gui, int x, int y);