1 #ifndef __DVDCREATE_H__
2 #define __DVDCREATE_H__
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 "dvdcreate.inc"
18 class CreateDVD_MenuItem : public BC_MenuItem
21 CreateDVD_MenuItem(MWindow *mwindow);
26 class DVD_BatchRenderJob : public BatchRenderJob
32 DVD_BatchRenderJob(Preferences *preferences,
33 int labeled, int farmed, int standard, int muxed);
34 void copy_from(DVD_BatchRenderJob *src);
35 DVD_BatchRenderJob *copy();
36 void load(FileXML *file);
37 void save(FileXML *file);
38 char *create_script(EDL *edl, ArrayList<Indexable *> *idxbls);
39 void create_chapter(double pos);
45 class CreateDVD_Thread : public BC_DialogThread
47 static const int64_t DVD_SIZE;
48 static const int DVD_STREAMS, DVD_WIDTH, DVD_HEIGHT;
49 static const double DVD_ASPECT_WIDTH, DVD_ASPECT_HEIGHT;
50 static const double DVD_WIDE_ASPECT_WIDTH, DVD_WIDE_ASPECT_HEIGHT;
51 static const int DVD_MAX_BITRATE, DVD_CHANNELS, DVD_WIDE_CHANNELS;
52 static const double DVD_FRAMERATE, DVD_SAMPLERATE, DVD_KAUDIO_RATE;
54 CreateDVD_Thread(MWindow *mwindow);
56 void handle_close_event(int result);
59 void create_chapter(FILE *fp, double pos);
60 static int create_dvd_script(BatchRenderJob *job);
61 int create_dvd_jobs(ArrayList<BatchRenderJob*> *jobs, const char *asset_path);
62 int insert_video_plugin(const char *title, KeyFrame *default_keyframe);
67 char asset_title[BCTEXTLEN];
68 char tmp_path[BCTEXTLEN];
69 int use_deinterlace, use_inverse_telecine;
70 int use_scale, use_resize_tracks;
71 int use_wide_audio, use_farmed;
72 int use_histogram, use_labeled;
73 int use_ffmpeg, use_standard;
78 double dvd_aspect_width;
79 double dvd_aspect_height;
83 double dvd_kaudio_rate;
87 class CreateDVD_OK : public BC_OKButton
90 CreateDVD_OK(CreateDVD_GUI *gui, int x, int y);
92 int button_press_event();
98 class CreateDVD_Cancel : public BC_CancelButton
101 CreateDVD_Cancel(CreateDVD_GUI *gui, int x, int y);
103 int button_press_event();
109 class CreateDVD_DiskSpace : public BC_Title
112 CreateDVD_DiskSpace(CreateDVD_GUI *gui, int x, int y);
113 ~CreateDVD_DiskSpace();
114 int64_t tmp_path_space();
120 class CreateDVD_TmpPath : public BC_TextBox
123 CreateDVD_TmpPath(CreateDVD_GUI *gui, int x, int y, int w);
124 ~CreateDVD_TmpPath();
131 class CreateDVD_AssetTitle : public BC_TextBox
134 CreateDVD_AssetTitle(CreateDVD_GUI *gui, int x, int y, int w);
135 ~CreateDVD_AssetTitle();
141 class CreateDVD_Deinterlace : public BC_CheckBox
144 CreateDVD_Deinterlace(CreateDVD_GUI *gui, int x, int y);
145 ~CreateDVD_Deinterlace();
151 class CreateDVD_InverseTelecine : public BC_CheckBox
154 CreateDVD_InverseTelecine(CreateDVD_GUI *gui, int x, int y);
155 ~CreateDVD_InverseTelecine();
161 class CreateDVD_ResizeTracks : public BC_CheckBox
164 CreateDVD_ResizeTracks(CreateDVD_GUI *gui, int x, int y);
165 ~CreateDVD_ResizeTracks();
170 class CreateDVD_Histogram : public BC_CheckBox
173 CreateDVD_Histogram(CreateDVD_GUI *gui, int x, int y);
174 ~CreateDVD_Histogram();
179 class CreateDVD_LabelChapters : public BC_CheckBox
182 CreateDVD_LabelChapters(CreateDVD_GUI *gui, int x, int y);
183 ~CreateDVD_LabelChapters();
188 class CreateDVD_UseRenderFarm : public BC_CheckBox
191 CreateDVD_UseRenderFarm(CreateDVD_GUI *gui, int x, int y);
192 ~CreateDVD_UseRenderFarm();
197 class CreateDVD_WideAudio : public BC_CheckBox
200 CreateDVD_WideAudio(CreateDVD_GUI *gui, int x, int y);
201 ~CreateDVD_WideAudio();
206 class CreateDVD_UseFFMpeg : public BC_CheckBox
209 CreateDVD_UseFFMpeg(CreateDVD_GUI *gui, int x, int y);
210 ~CreateDVD_UseFFMpeg();
215 class CreateDVD_GUI : public BC_Window
218 CreateDVD_GUI(CreateDVD_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 CreateDVD_Thread *thread;
230 CreateDVD_AssetTitle *asset_title;
232 CreateDVD_TmpPath *tmp_path;
233 BrowseButton *btmp_path;
234 CreateDVD_DiskSpace *disk_space;
235 CreateDVD_Format *standard;
236 CreateDVD_Scale *scale;
237 ArrayList<BC_ListBoxItem *> media_sizes;
238 CreateDVD_MediaSize *media_size;
239 CreateDVD_Deinterlace *need_deinterlace;
240 CreateDVD_InverseTelecine *need_inverse_telecine;
241 CreateDVD_UseFFMpeg *need_use_ffmpeg;
242 CreateDVD_ResizeTracks *need_resize_tracks;
243 CreateDVD_Histogram *need_histogram;
244 CreateDVD_WideAudio *need_wide_audio;
245 CreateDVD_LabelChapters *need_labeled;
246 CreateDVD_UseRenderFarm *need_farmed;
247 int ok_x, ok_y, ok_w, ok_h;
249 int cancel_x, cancel_y, cancel_w, cancel_h;
250 CreateDVD_Cancel *cancel;
253 class CreateDVD_FormatItem : public BC_MenuItem
257 CreateDVD_FormatItem(CreateDVD_Format *popup, int standard, const char *text);
258 ~CreateDVD_FormatItem();
260 CreateDVD_Format *popup;
264 class CreateDVD_Format : public BC_PopupMenu
267 void create_objects();
269 CreateDVD_Format(CreateDVD_GUI *gui, int x, int y);
271 void set_value(int v) { set_text(get_item(v)->get_text()); }
276 class CreateDVD_ScaleItem : public BC_MenuItem
280 CreateDVD_ScaleItem(CreateDVD_Scale *popup, int scale, const char *text);
281 ~CreateDVD_ScaleItem();
283 CreateDVD_Scale *popup;
287 class CreateDVD_Scale : public BC_PopupMenu
290 void create_objects();
292 CreateDVD_Scale(CreateDVD_GUI *gui, int x, int y);
296 void set_value(int v) { set_text(Rescale::scale_types[v]); }
299 class CreateDVD_MediaSize : public BC_PopupTextBox
302 CreateDVD_MediaSize(CreateDVD_GUI *gui, int x, int y);
303 ~CreateDVD_MediaSize();