ffmpeg param visibility, high422 x264 profile, bd/dvd enhancements
[goodguy/history.git] / cinelerra-5.1 / cinelerra / dvdcreate.h
1 #ifndef __DVDCREATE_H__
2 #define __DVDCREATE_H__
3
4 #include "arraylist.h"
5 #include "batchrender.h"
6 #include "bcwindowbase.h"
7 #include "bcbutton.h"
8 #include "bcdialog.h"
9 #include "bclistboxitem.inc"
10 #include "bcmenuitem.h"
11 #include "bctextbox.h"
12 #include "browsebutton.h"
13 #include "mwindow.h"
14
15 #include "dvdcreate.inc"
16
17 class CreateDVD_MenuItem : public BC_MenuItem
18 {
19 public:
20         CreateDVD_MenuItem(MWindow *mwindow);
21         int handle_event();
22         MWindow *mwindow;
23 };
24
25
26 class CreateDVD_Thread : public BC_DialogThread
27 {
28         static const int64_t DVD_SIZE;
29         static const int DVD_STREAMS, DVD_WIDTH, DVD_HEIGHT;
30         static const double DVD_ASPECT_WIDTH, DVD_ASPECT_HEIGHT;
31         static const double DVD_WIDE_ASPECT_WIDTH, DVD_WIDE_ASPECT_HEIGHT;
32         static const int DVD_MAX_BITRATE, DVD_CHANNELS, DVD_WIDE_CHANNELS;
33         static const double DVD_FRAMERATE, DVD_SAMPLERATE, DVD_KAUDIO_RATE;
34 public:
35         CreateDVD_Thread(MWindow *mwindow);
36         ~CreateDVD_Thread();
37         void handle_close_event(int result);
38         BC_Window* new_gui();
39         int option_presets();
40         int create_dvd_jobs(ArrayList<BatchRenderJob*> *jobs,
41                 const char *tmp_path, const char *asset_title);
42         int insert_video_plugin(const char *title, KeyFrame *default_keyframe);
43         int resize_tracks();
44
45         MWindow *mwindow;
46         CreateDVD_GUI *gui;
47         char asset_title[BCTEXTLEN];
48         char tmp_path[BCTEXTLEN];
49         int use_deinterlace, use_inverse_telecine;
50         int use_scale, use_resize_tracks;
51         int use_wide_audio, use_wide_aspect;
52         int use_histogram, use_label_chapters;
53         int use_ffmpeg, use_standard;
54
55         int64_t dvd_size;
56         int dvd_width;
57         int dvd_height;
58         double dvd_aspect_width;
59         double dvd_aspect_height;
60         double dvd_framerate;
61         int dvd_samplerate;
62         int dvd_max_bitrate;
63         double dvd_kaudio_rate;
64         int max_w, max_h;
65 };
66
67 class CreateDVD_OK : public BC_OKButton
68 {
69 public:
70         CreateDVD_OK(CreateDVD_GUI *gui, int x, int y);
71         ~CreateDVD_OK();
72         int button_press_event();
73         int keypress_event();
74
75         CreateDVD_GUI *gui;
76 };
77
78 class CreateDVD_Cancel : public BC_CancelButton
79 {
80 public:
81         CreateDVD_Cancel(CreateDVD_GUI *gui, int x, int y);
82         ~CreateDVD_Cancel();
83         int button_press_event();
84
85         CreateDVD_GUI *gui;
86 };
87
88
89 class CreateDVD_DiskSpace : public BC_Title
90 {
91 public:
92         CreateDVD_DiskSpace(CreateDVD_GUI *gui, int x, int y);
93         ~CreateDVD_DiskSpace();
94         int64_t tmp_path_space();
95         void update();
96
97         CreateDVD_GUI *gui;
98 };
99
100 class CreateDVD_TmpPath : public BC_TextBox
101 {
102 public:
103         CreateDVD_TmpPath(CreateDVD_GUI *gui, int x, int y, int w);
104         ~CreateDVD_TmpPath();
105         int handle_event();
106
107         CreateDVD_GUI *gui;
108 };
109
110
111 class CreateDVD_AssetTitle : public BC_TextBox
112 {
113 public:
114         CreateDVD_AssetTitle(CreateDVD_GUI *gui, int x, int y, int w);
115         ~CreateDVD_AssetTitle();
116
117         CreateDVD_GUI *gui;
118 };
119
120 class CreateDVD_Deinterlace : public BC_CheckBox
121 {
122 public:
123         CreateDVD_Deinterlace(CreateDVD_GUI *gui, int x, int y);
124         ~CreateDVD_Deinterlace();
125         int handle_event();
126
127         CreateDVD_GUI *gui;
128 };
129
130 class CreateDVD_InverseTelecine : public BC_CheckBox
131 {
132 public:
133         CreateDVD_InverseTelecine(CreateDVD_GUI *gui, int x, int y);
134         ~CreateDVD_InverseTelecine();
135         int handle_event();
136
137         CreateDVD_GUI *gui;
138 };
139
140 class CreateDVD_Scale : public BC_CheckBox
141 {
142 public:
143         CreateDVD_Scale(CreateDVD_GUI *gui, int x, int y);
144         ~CreateDVD_Scale();
145
146         CreateDVD_GUI *gui;
147 };
148
149 class CreateDVD_ResizeTracks : public BC_CheckBox
150 {
151 public:
152         CreateDVD_ResizeTracks(CreateDVD_GUI *gui, int x, int y);
153         ~CreateDVD_ResizeTracks();
154
155         CreateDVD_GUI *gui;
156 };
157
158 class CreateDVD_Histogram : public BC_CheckBox
159 {
160 public:
161         CreateDVD_Histogram(CreateDVD_GUI *gui, int x, int y);
162         ~CreateDVD_Histogram();
163
164         CreateDVD_GUI *gui;
165 };
166
167 class CreateDVD_LabelChapters : public BC_CheckBox
168 {
169 public:
170         CreateDVD_LabelChapters(CreateDVD_GUI *gui, int x, int y);
171         ~CreateDVD_LabelChapters();
172
173         CreateDVD_GUI *gui;
174 };
175
176 class CreateDVD_WideAudio : public BC_CheckBox
177 {
178 public:
179         CreateDVD_WideAudio(CreateDVD_GUI *gui, int x, int y);
180         ~CreateDVD_WideAudio();
181
182         CreateDVD_GUI *gui;
183 };
184
185 class CreateDVD_WideAspect : public BC_CheckBox
186 {
187 public:
188         CreateDVD_WideAspect(CreateDVD_GUI *gui, int x, int y);
189         ~CreateDVD_WideAspect();
190
191         CreateDVD_GUI *gui;
192 };
193
194 class CreateDVD_UseFFMpeg : public BC_CheckBox
195 {
196 public:
197         CreateDVD_UseFFMpeg(CreateDVD_GUI *gui, int x, int y);
198         ~CreateDVD_UseFFMpeg();
199
200         CreateDVD_GUI *gui;
201 };
202
203 class CreateDVD_GUI : public BC_Window
204 {
205 public:
206         CreateDVD_GUI(CreateDVD_Thread *thread,
207                 int x, int y, int w, int h);
208         ~CreateDVD_GUI();
209
210         void create_objects();
211         int resize_event(int w, int h);
212         int translation_event();
213         int close_event();
214         void update();
215
216         CreateDVD_Thread *thread;
217         int at_x, at_y;
218         CreateDVD_AssetTitle *asset_title;
219         int tmp_x, tmp_y;
220         CreateDVD_TmpPath *tmp_path;
221         BrowseButton *btmp_path;
222         CreateDVD_DiskSpace *disk_space;
223         CreateDVD_Format *standard;
224         ArrayList<BC_ListBoxItem *> media_sizes;
225         CreateDVD_MediaSize *media_size;
226         CreateDVD_Deinterlace *need_deinterlace;
227         CreateDVD_InverseTelecine *need_inverse_telecine;
228         CreateDVD_Scale *need_scale;
229         CreateDVD_UseFFMpeg *need_use_ffmpeg;
230         CreateDVD_ResizeTracks *need_resize_tracks;
231         CreateDVD_Histogram *need_histogram;
232         CreateDVD_WideAudio *need_wide_audio;
233         CreateDVD_WideAspect *need_wide_aspect;
234         CreateDVD_LabelChapters *need_label_chapters;
235         int ok_x, ok_y, ok_w, ok_h;
236         CreateDVD_OK *ok;
237         int cancel_x, cancel_y, cancel_w, cancel_h;
238         CreateDVD_Cancel *cancel;
239 };
240
241 class CreateDVD_FormatItem : public BC_MenuItem
242 {
243 public:
244         int handle_event();
245         CreateDVD_FormatItem(CreateDVD_Format *popup, int standard, const char *name);
246         ~CreateDVD_FormatItem();
247
248         CreateDVD_Format *popup;
249         int standard;
250 };
251
252 class CreateDVD_Format : public BC_PopupMenu
253 {
254 public:
255         void create_objects();
256         int handle_event();
257         CreateDVD_Format(CreateDVD_GUI *gui, int x, int y);
258         ~CreateDVD_Format();
259
260         CreateDVD_GUI *gui;
261 };
262
263 class CreateDVD_MediaSize : public BC_PopupTextBox
264 {
265 public:
266         CreateDVD_MediaSize(CreateDVD_GUI *gui, int x, int y);
267         ~CreateDVD_MediaSize();
268         int handle_event();
269
270         CreateDVD_GUI *gui;
271 };
272
273 #endif