5 #include "batchrender.h"
6 #include "bcwindowbase.h"
9 #include "bclistboxitem.inc"
10 #include "bcmenuitem.h"
11 #include "bctextbox.h"
12 #include "browsebutton.h"
15 #include "bdcreate.inc"
18 class CreateBD_MenuItem : public BC_MenuItem
21 CreateBD_MenuItem(MWindow *mwindow);
27 class CreateBD_Thread : public BC_DialogThread
29 static const int64_t BD_SIZE;
30 static const int BD_STREAMS, BD_WIDTH, BD_HEIGHT;
31 static const double BD_ASPECT_WIDTH, BD_ASPECT_HEIGHT;
32 static const double BD_WIDE_ASPECT_WIDTH, BD_WIDE_ASPECT_HEIGHT;
33 static const int BD_MAX_BITRATE, BD_CHANNELS, BD_WIDE_CHANNELS;
34 static const double BD_FRAMERATE, BD_SAMPLERATE, BD_KAUDIO_RATE;
36 CreateBD_Thread(MWindow *mwindow);
38 void handle_close_event(int result);
41 int create_bd_jobs(ArrayList<BatchRenderJob*> *jobs,
42 const char *tmp_path, const char *asset_title);
43 int insert_video_plugin(const char *title, KeyFrame *default_keyframe);
48 char asset_title[BCTEXTLEN];
49 char tmp_path[BCTEXTLEN];
50 int use_deinterlace, use_inverse_telecine;
51 int use_scale, use_resize_tracks;
52 int use_wide_audio, use_wide_aspect;
53 int use_histogram, use_label_chapters;
59 double bd_aspect_width;
60 double bd_aspect_height;
64 double bd_kaudio_rate;
68 class CreateBD_OK : public BC_OKButton
71 CreateBD_OK(CreateBD_GUI *gui, int x, int y);
73 int button_press_event();
79 class CreateBD_Cancel : public BC_CancelButton
82 CreateBD_Cancel(CreateBD_GUI *gui, int x, int y);
84 int button_press_event();
90 class CreateBD_DiskSpace : public BC_Title
93 CreateBD_DiskSpace(CreateBD_GUI *gui, int x, int y);
94 ~CreateBD_DiskSpace();
95 int64_t tmp_path_space();
101 class CreateBD_TmpPath : public BC_TextBox
104 CreateBD_TmpPath(CreateBD_GUI *gui, int x, int y, int w);
112 class CreateBD_AssetTitle : public BC_TextBox
115 CreateBD_AssetTitle(CreateBD_GUI *gui, int x, int y, int w);
116 ~CreateBD_AssetTitle();
121 class CreateBD_Deinterlace : public BC_CheckBox
124 CreateBD_Deinterlace(CreateBD_GUI *gui, int x, int y);
125 ~CreateBD_Deinterlace();
131 class CreateBD_InverseTelecine : public BC_CheckBox
134 CreateBD_InverseTelecine(CreateBD_GUI *gui, int x, int y);
135 ~CreateBD_InverseTelecine();
141 class CreateBD_Scale : public BC_CheckBox
144 CreateBD_Scale(CreateBD_GUI *gui, int x, int y);
150 class CreateBD_ResizeTracks : public BC_CheckBox
153 CreateBD_ResizeTracks(CreateBD_GUI *gui, int x, int y);
154 ~CreateBD_ResizeTracks();
159 class CreateBD_Histogram : public BC_CheckBox
162 CreateBD_Histogram(CreateBD_GUI *gui, int x, int y);
163 ~CreateBD_Histogram();
168 class CreateBD_LabelChapters : public BC_CheckBox
171 CreateBD_LabelChapters(CreateBD_GUI *gui, int x, int y);
172 ~CreateBD_LabelChapters();
177 class CreateBD_WideAudio : public BC_CheckBox
180 CreateBD_WideAudio(CreateBD_GUI *gui, int x, int y);
181 ~CreateBD_WideAudio();
186 class CreateBD_WideAspect : public BC_CheckBox
189 CreateBD_WideAspect(CreateBD_GUI *gui, int x, int y);
190 ~CreateBD_WideAspect();
195 class CreateBD_GUI : public BC_Window
198 CreateBD_GUI(CreateBD_Thread *thread,
199 int x, int y, int w, int h);
202 void create_objects();
203 int resize_event(int w, int h);
204 int translation_event();
208 CreateBD_Thread *thread;
210 CreateBD_AssetTitle *asset_title;
212 CreateBD_TmpPath *tmp_path;
213 BrowseButton *btmp_path;
214 CreateBD_DiskSpace *disk_space;
215 CreateBD_Format *standard;
216 ArrayList<BC_ListBoxItem *> media_sizes;
217 CreateBD_MediaSize *media_size;
218 CreateBD_Deinterlace *need_deinterlace;
219 CreateBD_InverseTelecine *need_inverse_telecine;
220 CreateBD_Scale *need_scale;
221 CreateBD_ResizeTracks *need_resize_tracks;
222 CreateBD_Histogram *need_histogram;
223 CreateBD_WideAudio *need_wide_audio;
224 CreateBD_WideAspect *need_wide_aspect;
225 CreateBD_LabelChapters *need_label_chapters;
226 int ok_x, ok_y, ok_w, ok_h;
228 int cancel_x, cancel_y, cancel_w, cancel_h;
229 CreateBD_Cancel *cancel;
232 class CreateBD_FormatItem : public BC_MenuItem
236 CreateBD_FormatItem(CreateBD_Format *popup, int standard, const char *name);
237 ~CreateBD_FormatItem();
239 CreateBD_Format *popup;
243 class CreateBD_Format : public BC_PopupMenu
246 void create_objects();
248 CreateBD_Format(CreateBD_GUI *gui, int x, int y);
254 class CreateBD_MediaSize : public BC_PopupTextBox
257 CreateBD_MediaSize(CreateBD_GUI *gui, int x, int y);
258 ~CreateBD_MediaSize();