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);
28 class CreateBD_Thread : public BC_DialogThread
30 static const int64_t BD_SIZE;
31 static const int BD_STREAMS, BD_WIDTH, BD_HEIGHT;
32 static const double BD_ASPECT_WIDTH, BD_ASPECT_HEIGHT;
33 static const double BD_WIDE_ASPECT_WIDTH, BD_WIDE_ASPECT_HEIGHT;
34 static const int BD_MAX_BITRATE, BD_CHANNELS, BD_WIDE_CHANNELS;
35 static const double BD_FRAMERATE, BD_SAMPLERATE, BD_KAUDIO_RATE;
36 static const int BD_INTERLACE_MODE;
37 static void get_udfs_mount(char *udfs, char *mopts, char *mntpt);
39 CreateBD_Thread(MWindow *mwindow);
41 void handle_close_event(int result);
44 int create_bd_jobs(ArrayList<BatchRenderJob*> *jobs, const char *asset_dir);
45 int insert_video_plugin(const char *title, KeyFrame *default_keyframe);
50 char asset_title[BCTEXTLEN];
51 char tmp_path[BCTEXTLEN];
52 int use_deinterlace, use_inverse_telecine;
53 int use_scale, use_resize_tracks;
55 int use_histogram, use_label_chapters;
61 double bd_aspect_width;
62 double bd_aspect_height;
66 double bd_kaudio_rate;
67 int bd_interlace_mode;
71 class CreateBD_OK : public BC_OKButton
74 CreateBD_OK(CreateBD_GUI *gui, int x, int y);
76 int button_press_event();
82 class CreateBD_Cancel : public BC_CancelButton
85 CreateBD_Cancel(CreateBD_GUI *gui, int x, int y);
87 int button_press_event();
93 class CreateBD_DiskSpace : public BC_Title
96 CreateBD_DiskSpace(CreateBD_GUI *gui, int x, int y);
97 ~CreateBD_DiskSpace();
98 int64_t tmp_path_space();
104 class CreateBD_TmpPath : public BC_TextBox
107 CreateBD_TmpPath(CreateBD_GUI *gui, int x, int y, int w);
115 class CreateBD_AssetTitle : public BC_TextBox
118 CreateBD_AssetTitle(CreateBD_GUI *gui, int x, int y, int w);
119 ~CreateBD_AssetTitle();
125 class CreateBD_Deinterlace : public BC_CheckBox
128 CreateBD_Deinterlace(CreateBD_GUI *gui, int x, int y);
129 ~CreateBD_Deinterlace();
135 class CreateBD_InverseTelecine : public BC_CheckBox
138 CreateBD_InverseTelecine(CreateBD_GUI *gui, int x, int y);
139 ~CreateBD_InverseTelecine();
145 class CreateBD_ResizeTracks : public BC_CheckBox
148 CreateBD_ResizeTracks(CreateBD_GUI *gui, int x, int y);
149 ~CreateBD_ResizeTracks();
154 class CreateBD_Histogram : public BC_CheckBox
157 CreateBD_Histogram(CreateBD_GUI *gui, int x, int y);
158 ~CreateBD_Histogram();
163 class CreateBD_LabelChapters : public BC_CheckBox
166 CreateBD_LabelChapters(CreateBD_GUI *gui, int x, int y);
167 ~CreateBD_LabelChapters();
172 class CreateBD_WideAudio : public BC_CheckBox
175 CreateBD_WideAudio(CreateBD_GUI *gui, int x, int y);
176 ~CreateBD_WideAudio();
181 class CreateBD_GUI : public BC_Window
184 CreateBD_GUI(CreateBD_Thread *thread,
185 int x, int y, int w, int h);
188 void create_objects();
189 int resize_event(int w, int h);
190 int translation_event();
194 CreateBD_Thread *thread;
196 CreateBD_AssetTitle *asset_title;
198 CreateBD_TmpPath *tmp_path;
199 BrowseButton *btmp_path;
200 CreateBD_DiskSpace *disk_space;
201 CreateBD_Format *standard;
202 CreateBD_Scale *scale;
203 ArrayList<BC_ListBoxItem *> media_sizes;
204 CreateBD_MediaSize *media_size;
205 CreateBD_Deinterlace *need_deinterlace;
206 CreateBD_InverseTelecine *need_inverse_telecine;
207 CreateBD_ResizeTracks *need_resize_tracks;
208 CreateBD_Histogram *need_histogram;
209 BC_Title *non_standard;
210 CreateBD_WideAudio *need_wide_audio;
211 CreateBD_LabelChapters *need_label_chapters;
212 int ok_x, ok_y, ok_w, ok_h;
214 int cancel_x, cancel_y, cancel_w, cancel_h;
215 CreateBD_Cancel *cancel;
218 class CreateBD_FormatItem : public BC_MenuItem
222 CreateBD_FormatItem(CreateBD_Format *popup, int standard, const char *name);
223 ~CreateBD_FormatItem();
225 CreateBD_Format *popup;
229 class CreateBD_Format : public BC_PopupMenu
232 void create_objects();
234 CreateBD_Format(CreateBD_GUI *gui, int x, int y);
236 void set_value(int v) { set_text(get_item(v)->get_text()); }
241 class CreateBD_ScaleItem : public BC_MenuItem
245 CreateBD_ScaleItem(CreateBD_Scale *popup, int scale, const char *text);
246 ~CreateBD_ScaleItem();
248 CreateBD_Scale *popup;
252 class CreateBD_Scale : public BC_PopupMenu
255 void create_objects();
257 CreateBD_Scale(CreateBD_GUI *gui, int x, int y);
261 void set_value(int v) { set_text(Rescale::scale_types[v]); }
264 class CreateBD_MediaSize : public BC_PopupTextBox
267 CreateBD_MediaSize(CreateBD_GUI *gui, int x, int y);
268 ~CreateBD_MediaSize();