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);
36 class CreateBD_Thread : public BC_DialogThread
38 static const int64_t BD_SIZE;
39 static const int BD_STREAMS, BD_WIDTH, BD_HEIGHT;
40 static const double BD_ASPECT_WIDTH, BD_ASPECT_HEIGHT;
41 static const double BD_WIDE_ASPECT_WIDTH, BD_WIDE_ASPECT_HEIGHT;
42 static const int BD_MAX_BITRATE, BD_CHANNELS, BD_WIDE_CHANNELS;
43 static const double BD_FRAMERATE, BD_SAMPLERATE, BD_KAUDIO_RATE;
44 static const int BD_INTERLACE_MODE;
46 CreateBD_Thread(MWindow *mwindow);
48 void handle_close_event(int result);
51 int create_bd_script(const char *path, EDL *edl);
52 int create_bd_jobs(ArrayList<BatchRenderJob*> *jobs, const char *asset_dir);
53 int insert_video_plugin(const char *title, KeyFrame *default_keyframe);
58 char asset_title[BCTEXTLEN];
59 char tmp_path[BCTEXTLEN];
60 int use_deinterlace, use_inverse_telecine;
61 int use_scale, use_resize_tracks;
62 int use_wide_audio, use_farmed;
63 int use_histogram, use_labeled;
69 double bd_aspect_width;
70 double bd_aspect_height;
74 double bd_kaudio_rate;
75 int bd_interlace_mode;
79 class CreateBD_OK : public BC_OKButton
82 CreateBD_OK(CreateBD_GUI *gui, int x, int y);
84 int button_press_event();
90 class CreateBD_Cancel : public BC_CancelButton
93 CreateBD_Cancel(CreateBD_GUI *gui, int x, int y);
95 int button_press_event();
101 class CreateBD_DiskSpace : public BC_Title
104 CreateBD_DiskSpace(CreateBD_GUI *gui, int x, int y);
105 ~CreateBD_DiskSpace();
106 int64_t tmp_path_space();
112 class CreateBD_TmpPath : public BC_TextBox
115 CreateBD_TmpPath(CreateBD_GUI *gui, int x, int y, int w);
123 class CreateBD_AssetTitle : public BC_TextBox
126 CreateBD_AssetTitle(CreateBD_GUI *gui, int x, int y, int w);
127 ~CreateBD_AssetTitle();
133 class CreateBD_Deinterlace : public BC_CheckBox
136 CreateBD_Deinterlace(CreateBD_GUI *gui, int x, int y);
137 ~CreateBD_Deinterlace();
143 class CreateBD_InverseTelecine : public BC_CheckBox
146 CreateBD_InverseTelecine(CreateBD_GUI *gui, int x, int y);
147 ~CreateBD_InverseTelecine();
153 class CreateBD_ResizeTracks : public BC_CheckBox
156 CreateBD_ResizeTracks(CreateBD_GUI *gui, int x, int y);
157 ~CreateBD_ResizeTracks();
162 class CreateBD_Histogram : public BC_CheckBox
165 CreateBD_Histogram(CreateBD_GUI *gui, int x, int y);
166 ~CreateBD_Histogram();
171 class CreateBD_LabelChapters : public BC_CheckBox
174 CreateBD_LabelChapters(CreateBD_GUI *gui, int x, int y);
175 ~CreateBD_LabelChapters();
180 class CreateBD_UseRenderFarm : public BC_CheckBox
183 CreateBD_UseRenderFarm(CreateBD_GUI *gui, int x, int y);
184 ~CreateBD_UseRenderFarm();
190 class CreateBD_WideAudio : public BC_CheckBox
193 CreateBD_WideAudio(CreateBD_GUI *gui, int x, int y);
194 ~CreateBD_WideAudio();
199 class CreateBD_GUI : public BC_Window
202 CreateBD_GUI(CreateBD_Thread *thread,
203 int x, int y, int w, int h);
206 void create_objects();
207 int resize_event(int w, int h);
208 int translation_event();
212 CreateBD_Thread *thread;
214 CreateBD_AssetTitle *asset_title;
216 CreateBD_TmpPath *tmp_path;
217 BrowseButton *btmp_path;
218 CreateBD_DiskSpace *disk_space;
219 CreateBD_Format *standard;
220 CreateBD_Scale *scale;
221 ArrayList<BC_ListBoxItem *> media_sizes;
222 CreateBD_MediaSize *media_size;
223 CreateBD_Deinterlace *need_deinterlace;
224 CreateBD_InverseTelecine *need_inverse_telecine;
225 CreateBD_ResizeTracks *need_resize_tracks;
226 CreateBD_Histogram *need_histogram;
227 BC_Title *non_standard;
228 CreateBD_WideAudio *need_wide_audio;
229 CreateBD_LabelChapters *need_labeled;
230 CreateBD_UseRenderFarm *need_farmed;
231 int ok_x, ok_y, ok_w, ok_h;
233 int cancel_x, cancel_y, cancel_w, cancel_h;
234 CreateBD_Cancel *cancel;
237 class CreateBD_FormatItem : public BC_MenuItem
241 CreateBD_FormatItem(CreateBD_Format *popup, int standard, const char *name);
242 ~CreateBD_FormatItem();
244 CreateBD_Format *popup;
248 class CreateBD_Format : public BC_PopupMenu
251 void create_objects();
253 CreateBD_Format(CreateBD_GUI *gui, int x, int y);
255 void set_value(int v) { set_text(get_item(v)->get_text()); }
260 class CreateBD_ScaleItem : public BC_MenuItem
264 CreateBD_ScaleItem(CreateBD_Scale *popup, int scale, const char *text);
265 ~CreateBD_ScaleItem();
267 CreateBD_Scale *popup;
271 class CreateBD_Scale : public BC_PopupMenu
274 void create_objects();
276 CreateBD_Scale(CreateBD_GUI *gui, int x, int y);
280 void set_value(int v) { set_text(Rescale::scale_types[v]); }
283 class CreateBD_MediaSize : public BC_PopupTextBox
286 CreateBD_MediaSize(CreateBD_GUI *gui, int x, int y);
287 ~CreateBD_MediaSize();