ffmpeg param visibility, high422 x264 profile, bd/dvd enhancements
[goodguy/history.git] / cinelerra-5.1 / cinelerra / bdcreate.h
1 #ifndef __BDCREATE_H__
2 #define __BDCREATE_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 "bdcreate.inc"
16
17
18 class CreateBD_MenuItem : public BC_MenuItem
19 {
20 public:
21         CreateBD_MenuItem(MWindow *mwindow);
22         int handle_event();
23         MWindow *mwindow;
24 };
25
26
27 class CreateBD_Thread : public BC_DialogThread
28 {
29         static const int64_t BD_SIZE;
30         static const int BD_STREAMS, BD_WIDTH, BD_HEIGHT;
31         static const double BD_ASPECT_WIDTH, BD_ASPECT_HEIGHT;
32         static const double BD_WIDE_ASPECT_WIDTH, BD_WIDE_ASPECT_HEIGHT;
33         static const int BD_MAX_BITRATE, BD_CHANNELS, BD_WIDE_CHANNELS;
34         static const double BD_FRAMERATE, BD_SAMPLERATE, BD_KAUDIO_RATE;
35 public:
36         CreateBD_Thread(MWindow *mwindow);
37         ~CreateBD_Thread();
38         void handle_close_event(int result);
39         BC_Window* new_gui();
40         int option_presets();
41         int create_bd_jobs(ArrayList<BatchRenderJob*> *jobs,
42                 const char *tmp_path, const char *asset_title);
43         int insert_video_plugin(const char *title, KeyFrame *default_keyframe);
44         int resize_tracks();
45
46         MWindow *mwindow;
47         CreateBD_GUI *gui;
48         char asset_title[BCTEXTLEN];
49         char tmp_path[BCTEXTLEN];
50         int use_deinterlace, use_inverse_telecine;
51         int use_scale, use_resize_tracks;
52         int use_wide_audio, use_wide_aspect;
53         int use_histogram, use_label_chapters;
54         int use_standard;
55
56         int64_t bd_size;
57         int bd_width;
58         int bd_height;
59         double bd_aspect_width;
60         double bd_aspect_height;
61         double bd_framerate;
62         int bd_samplerate;
63         int bd_max_bitrate;
64         double bd_kaudio_rate;
65         int max_w, max_h;
66 };
67
68 class CreateBD_OK : public BC_OKButton
69 {
70 public:
71         CreateBD_OK(CreateBD_GUI *gui, int x, int y);
72         ~CreateBD_OK();
73         int button_press_event();
74         int keypress_event();
75
76         CreateBD_GUI *gui;
77 };
78
79 class CreateBD_Cancel : public BC_CancelButton
80 {
81 public:
82         CreateBD_Cancel(CreateBD_GUI *gui, int x, int y);
83         ~CreateBD_Cancel();
84         int button_press_event();
85
86         CreateBD_GUI *gui;
87 };
88
89
90 class CreateBD_DiskSpace : public BC_Title
91 {
92 public:
93         CreateBD_DiskSpace(CreateBD_GUI *gui, int x, int y);
94         ~CreateBD_DiskSpace();
95         int64_t tmp_path_space();
96         void update();
97
98         CreateBD_GUI *gui;
99 };
100
101 class CreateBD_TmpPath : public BC_TextBox
102 {
103 public:
104         CreateBD_TmpPath(CreateBD_GUI *gui, int x, int y, int w);
105         ~CreateBD_TmpPath();
106         int handle_event();
107
108         CreateBD_GUI *gui;
109 };
110
111
112 class CreateBD_AssetTitle : public BC_TextBox
113 {
114 public:
115         CreateBD_AssetTitle(CreateBD_GUI *gui, int x, int y, int w);
116         ~CreateBD_AssetTitle();
117
118         CreateBD_GUI *gui;
119 };
120
121 class CreateBD_Deinterlace : public BC_CheckBox
122 {
123 public:
124         CreateBD_Deinterlace(CreateBD_GUI *gui, int x, int y);
125         ~CreateBD_Deinterlace();
126         int handle_event();
127
128         CreateBD_GUI *gui;
129 };
130
131 class CreateBD_InverseTelecine : public BC_CheckBox
132 {
133 public:
134         CreateBD_InverseTelecine(CreateBD_GUI *gui, int x, int y);
135         ~CreateBD_InverseTelecine();
136         int handle_event();
137
138         CreateBD_GUI *gui;
139 };
140
141 class CreateBD_Scale : public BC_CheckBox
142 {
143 public:
144         CreateBD_Scale(CreateBD_GUI *gui, int x, int y);
145         ~CreateBD_Scale();
146
147         CreateBD_GUI *gui;
148 };
149
150 class CreateBD_ResizeTracks : public BC_CheckBox
151 {
152 public:
153         CreateBD_ResizeTracks(CreateBD_GUI *gui, int x, int y);
154         ~CreateBD_ResizeTracks();
155
156         CreateBD_GUI *gui;
157 };
158
159 class CreateBD_Histogram : public BC_CheckBox
160 {
161 public:
162         CreateBD_Histogram(CreateBD_GUI *gui, int x, int y);
163         ~CreateBD_Histogram();
164
165         CreateBD_GUI *gui;
166 };
167
168 class CreateBD_LabelChapters : public BC_CheckBox
169 {
170 public:
171         CreateBD_LabelChapters(CreateBD_GUI *gui, int x, int y);
172         ~CreateBD_LabelChapters();
173
174         CreateBD_GUI *gui;
175 };
176
177 class CreateBD_WideAudio : public BC_CheckBox
178 {
179 public:
180         CreateBD_WideAudio(CreateBD_GUI *gui, int x, int y);
181         ~CreateBD_WideAudio();
182
183         CreateBD_GUI *gui;
184 };
185
186 class CreateBD_WideAspect : public BC_CheckBox
187 {
188 public:
189         CreateBD_WideAspect(CreateBD_GUI *gui, int x, int y);
190         ~CreateBD_WideAspect();
191
192         CreateBD_GUI *gui;
193 };
194
195 class CreateBD_GUI : public BC_Window
196 {
197 public:
198         CreateBD_GUI(CreateBD_Thread *thread,
199                 int x, int y, int w, int h);
200         ~CreateBD_GUI();
201
202         void create_objects();
203         int resize_event(int w, int h);
204         int translation_event();
205         int close_event();
206         void update();
207
208         CreateBD_Thread *thread;
209         int at_x, at_y;
210         CreateBD_AssetTitle *asset_title;
211         int tmp_x, tmp_y;
212         CreateBD_TmpPath *tmp_path;
213         BrowseButton *btmp_path;
214         CreateBD_DiskSpace *disk_space;
215         CreateBD_Format *standard;
216         ArrayList<BC_ListBoxItem *> media_sizes;
217         CreateBD_MediaSize *media_size;
218         CreateBD_Deinterlace *need_deinterlace;
219         CreateBD_InverseTelecine *need_inverse_telecine;
220         CreateBD_Scale *need_scale;
221         CreateBD_ResizeTracks *need_resize_tracks;
222         CreateBD_Histogram *need_histogram;
223         CreateBD_WideAudio *need_wide_audio;
224         CreateBD_WideAspect *need_wide_aspect;
225         CreateBD_LabelChapters *need_label_chapters;
226         int ok_x, ok_y, ok_w, ok_h;
227         CreateBD_OK *ok;
228         int cancel_x, cancel_y, cancel_w, cancel_h;
229         CreateBD_Cancel *cancel;
230 };
231
232 class CreateBD_FormatItem : public BC_MenuItem
233 {
234 public:
235         int handle_event();
236         CreateBD_FormatItem(CreateBD_Format *popup, int standard, const char *name);
237         ~CreateBD_FormatItem();
238
239         CreateBD_Format *popup;
240         int standard;
241 };
242
243 class CreateBD_Format : public BC_PopupMenu
244 {
245 public:
246         void create_objects();
247         int handle_event();
248         CreateBD_Format(CreateBD_GUI *gui, int x, int y);
249         ~CreateBD_Format();
250
251         CreateBD_GUI *gui;
252 };
253
254 class CreateBD_MediaSize : public BC_PopupTextBox
255 {
256 public:
257         CreateBD_MediaSize(CreateBD_GUI *gui, int x, int y);
258         ~CreateBD_MediaSize();
259         int handle_event();
260
261         CreateBD_GUI *gui;
262 };
263
264 #endif