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"
14 #include "dvdcreate.inc"
16 class CreateDVD_MenuItem : public BC_MenuItem
19 CreateDVD_MenuItem(MWindow *mwindow);
25 class CreateDVD_Thread : public BC_DialogThread
27 static const int64_t DVD_SIZE;
28 static const int DVD_STREAMS, DVD_WIDTH, DVD_HEIGHT;
29 static const double DVD_ASPECT_WIDTH, DVD_ASPECT_HEIGHT;
30 static const double DVD_WIDE_ASPECT_WIDTH, DVD_WIDE_ASPECT_HEIGHT;
31 static const int DVD_MAX_BITRATE, DVD_CHANNELS, DVD_WIDE_CHANNELS;
32 static const double DVD_FRAMERATE, DVD_SAMPLERATE, DVD_KAUDIO_RATE;
34 CreateDVD_Thread(MWindow *mwindow);
36 void handle_close_event(int result);
39 int create_dvd_jobs(ArrayList<BatchRenderJob*> *jobs,
40 const char *tmp_path, const char *asset_title);
41 int insert_video_plugin(const char *title, KeyFrame *default_keyframe);
46 char asset_title[BCTEXTLEN];
47 char tmp_path[BCTEXTLEN];
48 int use_deinterlace, use_inverse_telecine;
49 int use_scale, use_resize_tracks;
50 int use_wide_audio, use_wide_aspect;
51 int use_histogram, use_label_chapters;
52 int use_ffmpeg, use_standard;
57 double dvd_aspect_width;
58 double dvd_aspect_height;
62 double dvd_kaudio_rate;
66 class CreateDVD_OK : public BC_OKButton
69 CreateDVD_OK(CreateDVD_GUI *gui, int x, int y);
71 int button_press_event();
77 class CreateDVD_Cancel : public BC_CancelButton
80 CreateDVD_Cancel(CreateDVD_GUI *gui, int x, int y);
82 int button_press_event();
88 class CreateDVD_DiskSpace : public BC_Title
91 CreateDVD_DiskSpace(CreateDVD_GUI *gui, int x, int y);
92 ~CreateDVD_DiskSpace();
93 int64_t tmp_path_space();
99 class CreateDVD_TmpPath : public BC_TextBox
102 CreateDVD_TmpPath(CreateDVD_GUI *gui, int x, int y, int w);
103 ~CreateDVD_TmpPath();
110 class CreateDVD_AssetTitle : public BC_TextBox
113 CreateDVD_AssetTitle(CreateDVD_GUI *gui, int x, int y, int w);
114 ~CreateDVD_AssetTitle();
119 class CreateDVD_Deinterlace : public BC_CheckBox
122 CreateDVD_Deinterlace(CreateDVD_GUI *gui, int x, int y);
123 ~CreateDVD_Deinterlace();
129 class CreateDVD_InverseTelecine : public BC_CheckBox
132 CreateDVD_InverseTelecine(CreateDVD_GUI *gui, int x, int y);
133 ~CreateDVD_InverseTelecine();
139 class CreateDVD_Scale : public BC_CheckBox
142 CreateDVD_Scale(CreateDVD_GUI *gui, int x, int y);
148 class CreateDVD_ResizeTracks : public BC_CheckBox
151 CreateDVD_ResizeTracks(CreateDVD_GUI *gui, int x, int y);
152 ~CreateDVD_ResizeTracks();
157 class CreateDVD_Histogram : public BC_CheckBox
160 CreateDVD_Histogram(CreateDVD_GUI *gui, int x, int y);
161 ~CreateDVD_Histogram();
166 class CreateDVD_LabelChapters : public BC_CheckBox
169 CreateDVD_LabelChapters(CreateDVD_GUI *gui, int x, int y);
170 ~CreateDVD_LabelChapters();
175 class CreateDVD_WideAudio : public BC_CheckBox
178 CreateDVD_WideAudio(CreateDVD_GUI *gui, int x, int y);
179 ~CreateDVD_WideAudio();
184 class CreateDVD_WideAspect : public BC_CheckBox
187 CreateDVD_WideAspect(CreateDVD_GUI *gui, int x, int y);
188 ~CreateDVD_WideAspect();
193 class CreateDVD_UseFFMpeg : public BC_CheckBox
196 CreateDVD_UseFFMpeg(CreateDVD_GUI *gui, int x, int y);
197 ~CreateDVD_UseFFMpeg();
202 class CreateDVD_GUI : public BC_Window
205 CreateDVD_GUI(CreateDVD_Thread *thread,
206 int x, int y, int w, int h);
209 void create_objects();
210 int resize_event(int w, int h);
211 int translation_event();
215 CreateDVD_Thread *thread;
217 CreateDVD_AssetTitle *asset_title;
219 CreateDVD_TmpPath *tmp_path;
220 CreateDVD_DiskSpace *disk_space;
221 CreateDVD_Format *standard;
222 ArrayList<BC_ListBoxItem *> media_sizes;
223 CreateDVD_MediaSize *media_size;
224 CreateDVD_Deinterlace *need_deinterlace;
225 CreateDVD_InverseTelecine *need_inverse_telecine;
226 CreateDVD_Scale *need_scale;
227 CreateDVD_UseFFMpeg *need_use_ffmpeg;
228 CreateDVD_ResizeTracks *need_resize_tracks;
229 CreateDVD_Histogram *need_histogram;
230 CreateDVD_WideAudio *need_wide_audio;
231 CreateDVD_WideAspect *need_wide_aspect;
232 CreateDVD_LabelChapters *need_label_chapters;
233 int ok_x, ok_y, ok_w, ok_h;
235 int cancel_x, cancel_y, cancel_w, cancel_h;
236 CreateDVD_Cancel *cancel;
239 class CreateDVD_FormatItem : public BC_MenuItem
243 CreateDVD_FormatItem(CreateDVD_Format *popup, int standard, const char *name);
244 ~CreateDVD_FormatItem();
246 CreateDVD_Format *popup;
250 class CreateDVD_Format : public BC_PopupMenu
253 void create_objects();
255 CreateDVD_Format(CreateDVD_GUI *gui, int x, int y);
261 class CreateDVD_MediaSize : public BC_PopupTextBox
264 CreateDVD_MediaSize(CreateDVD_GUI *gui, int x, int y);
265 ~CreateDVD_MediaSize();