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);
27 class CreateDVD_Thread : public BC_DialogThread
29 static const int64_t DVD_SIZE;
30 static const int DVD_STREAMS, DVD_WIDTH, DVD_HEIGHT;
31 static const double DVD_ASPECT_WIDTH, DVD_ASPECT_HEIGHT;
32 static const double DVD_WIDE_ASPECT_WIDTH, DVD_WIDE_ASPECT_HEIGHT;
33 static const int DVD_MAX_BITRATE, DVD_CHANNELS, DVD_WIDE_CHANNELS;
34 static const double DVD_FRAMERATE, DVD_SAMPLERATE, DVD_KAUDIO_RATE;
36 CreateDVD_Thread(MWindow *mwindow);
38 void handle_close_event(int result);
41 int create_dvd_jobs(ArrayList<BatchRenderJob*> *jobs, const char *asset_path);
42 int insert_video_plugin(const char *title, KeyFrame *default_keyframe);
47 char asset_title[BCTEXTLEN];
48 char tmp_path[BCTEXTLEN];
49 int use_deinterlace, use_inverse_telecine;
50 int use_scale, use_resize_tracks;
52 int use_histogram, use_label_chapters;
53 int use_ffmpeg, use_standard;
58 double dvd_aspect_width;
59 double dvd_aspect_height;
63 double dvd_kaudio_rate;
67 class CreateDVD_OK : public BC_OKButton
70 CreateDVD_OK(CreateDVD_GUI *gui, int x, int y);
72 int button_press_event();
78 class CreateDVD_Cancel : public BC_CancelButton
81 CreateDVD_Cancel(CreateDVD_GUI *gui, int x, int y);
83 int button_press_event();
89 class CreateDVD_DiskSpace : public BC_Title
92 CreateDVD_DiskSpace(CreateDVD_GUI *gui, int x, int y);
93 ~CreateDVD_DiskSpace();
94 int64_t tmp_path_space();
100 class CreateDVD_TmpPath : public BC_TextBox
103 CreateDVD_TmpPath(CreateDVD_GUI *gui, int x, int y, int w);
104 ~CreateDVD_TmpPath();
111 class CreateDVD_AssetTitle : public BC_TextBox
114 CreateDVD_AssetTitle(CreateDVD_GUI *gui, int x, int y, int w);
115 ~CreateDVD_AssetTitle();
121 class CreateDVD_Deinterlace : public BC_CheckBox
124 CreateDVD_Deinterlace(CreateDVD_GUI *gui, int x, int y);
125 ~CreateDVD_Deinterlace();
131 class CreateDVD_InverseTelecine : public BC_CheckBox
134 CreateDVD_InverseTelecine(CreateDVD_GUI *gui, int x, int y);
135 ~CreateDVD_InverseTelecine();
141 class CreateDVD_ResizeTracks : public BC_CheckBox
144 CreateDVD_ResizeTracks(CreateDVD_GUI *gui, int x, int y);
145 ~CreateDVD_ResizeTracks();
150 class CreateDVD_Histogram : public BC_CheckBox
153 CreateDVD_Histogram(CreateDVD_GUI *gui, int x, int y);
154 ~CreateDVD_Histogram();
159 class CreateDVD_LabelChapters : public BC_CheckBox
162 CreateDVD_LabelChapters(CreateDVD_GUI *gui, int x, int y);
163 ~CreateDVD_LabelChapters();
168 class CreateDVD_WideAudio : public BC_CheckBox
171 CreateDVD_WideAudio(CreateDVD_GUI *gui, int x, int y);
172 ~CreateDVD_WideAudio();
177 class CreateDVD_UseFFMpeg : public BC_CheckBox
180 CreateDVD_UseFFMpeg(CreateDVD_GUI *gui, int x, int y);
181 ~CreateDVD_UseFFMpeg();
186 class CreateDVD_GUI : public BC_Window
189 CreateDVD_GUI(CreateDVD_Thread *thread,
190 int x, int y, int w, int h);
193 void create_objects();
194 int resize_event(int w, int h);
195 int translation_event();
199 CreateDVD_Thread *thread;
201 CreateDVD_AssetTitle *asset_title;
203 CreateDVD_TmpPath *tmp_path;
204 BrowseButton *btmp_path;
205 CreateDVD_DiskSpace *disk_space;
206 CreateDVD_Format *standard;
207 CreateDVD_Scale *scale;
208 ArrayList<BC_ListBoxItem *> media_sizes;
209 CreateDVD_MediaSize *media_size;
210 CreateDVD_Deinterlace *need_deinterlace;
211 CreateDVD_InverseTelecine *need_inverse_telecine;
212 CreateDVD_UseFFMpeg *need_use_ffmpeg;
213 CreateDVD_ResizeTracks *need_resize_tracks;
214 CreateDVD_Histogram *need_histogram;
215 CreateDVD_WideAudio *need_wide_audio;
216 CreateDVD_LabelChapters *need_label_chapters;
217 int ok_x, ok_y, ok_w, ok_h;
219 int cancel_x, cancel_y, cancel_w, cancel_h;
220 CreateDVD_Cancel *cancel;
223 class CreateDVD_FormatItem : public BC_MenuItem
227 CreateDVD_FormatItem(CreateDVD_Format *popup, int standard, const char *text);
228 ~CreateDVD_FormatItem();
230 CreateDVD_Format *popup;
234 class CreateDVD_Format : public BC_PopupMenu
237 void create_objects();
239 CreateDVD_Format(CreateDVD_GUI *gui, int x, int y);
241 void set_value(int v) { set_text(get_item(v)->get_text()); }
246 class CreateDVD_ScaleItem : public BC_MenuItem
250 CreateDVD_ScaleItem(CreateDVD_Scale *popup, int scale, const char *text);
251 ~CreateDVD_ScaleItem();
253 CreateDVD_Scale *popup;
257 class CreateDVD_Scale : public BC_PopupMenu
260 void create_objects();
262 CreateDVD_Scale(CreateDVD_GUI *gui, int x, int y);
266 void set_value(int v) { set_text(Rescale::scale_types[v]); }
269 class CreateDVD_MediaSize : public BC_PopupTextBox
272 CreateDVD_MediaSize(CreateDVD_GUI *gui, int x, int y);
273 ~CreateDVD_MediaSize();