aea3efa6944b132e6201f1f48271ad0aba61a104
[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 "mwindow.h"
13
14 #include "dvdcreate.inc"
15
16 class CreateDVD_MenuItem : public BC_MenuItem
17 {
18 public:
19         CreateDVD_MenuItem(MWindow *mwindow);
20         int handle_event();
21         MWindow *mwindow;
22 };
23
24
25 class CreateDVD_Thread : public BC_DialogThread
26 {
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;
33 public:
34         CreateDVD_Thread(MWindow *mwindow);
35         ~CreateDVD_Thread();
36         void handle_close_event(int result);
37         BC_Window* new_gui();
38         int option_presets();
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);
42         int resize_tracks();
43
44         MWindow *mwindow;
45         CreateDVD_GUI *gui;
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;
53
54         int64_t dvd_size;
55         int dvd_width;
56         int dvd_height;
57         double dvd_aspect_width;
58         double dvd_aspect_height;
59         double dvd_framerate;
60         int dvd_samplerate;
61         int dvd_max_bitrate;
62         double dvd_kaudio_rate;
63 };
64
65 class CreateDVD_OK : public BC_OKButton
66 {
67 public:
68         CreateDVD_OK(CreateDVD_GUI *gui, int x, int y);
69         ~CreateDVD_OK();
70         int button_press_event();
71         int keypress_event();
72
73         CreateDVD_GUI *gui;
74 };
75
76 class CreateDVD_Cancel : public BC_CancelButton
77 {
78 public:
79         CreateDVD_Cancel(CreateDVD_GUI *gui, int x, int y);
80         ~CreateDVD_Cancel();
81         int button_press_event();
82
83         CreateDVD_GUI *gui;
84 };
85
86
87 class CreateDVD_DiskSpace : public BC_Title
88 {
89 public:
90         CreateDVD_DiskSpace(CreateDVD_GUI *gui, int x, int y);
91         ~CreateDVD_DiskSpace();
92         int64_t tmp_path_space();
93         void update();
94
95         CreateDVD_GUI *gui;
96 };
97
98 class CreateDVD_TmpPath : public BC_TextBox
99 {
100 public:
101         CreateDVD_TmpPath(CreateDVD_GUI *gui, int x, int y, int w);
102         ~CreateDVD_TmpPath();
103         int handle_event();
104
105         CreateDVD_GUI *gui;
106 };
107
108
109 class CreateDVD_AssetTitle : public BC_TextBox
110 {
111 public:
112         CreateDVD_AssetTitle(CreateDVD_GUI *gui, int x, int y, int w);
113         ~CreateDVD_AssetTitle();
114
115         CreateDVD_GUI *gui;
116 };
117
118 class CreateDVD_Deinterlace : public BC_CheckBox
119 {
120 public:
121         CreateDVD_Deinterlace(CreateDVD_GUI *gui, int x, int y);
122         ~CreateDVD_Deinterlace();
123         int handle_event();
124
125         CreateDVD_GUI *gui;
126 };
127
128 class CreateDVD_InverseTelecine : public BC_CheckBox
129 {
130 public:
131         CreateDVD_InverseTelecine(CreateDVD_GUI *gui, int x, int y);
132         ~CreateDVD_InverseTelecine();
133         int handle_event();
134
135         CreateDVD_GUI *gui;
136 };
137
138 class CreateDVD_Scale : public BC_CheckBox
139 {
140 public:
141         CreateDVD_Scale(CreateDVD_GUI *gui, int x, int y);
142         ~CreateDVD_Scale();
143
144         CreateDVD_GUI *gui;
145 };
146
147 class CreateDVD_ResizeTracks : public BC_CheckBox
148 {
149 public:
150         CreateDVD_ResizeTracks(CreateDVD_GUI *gui, int x, int y);
151         ~CreateDVD_ResizeTracks();
152
153         CreateDVD_GUI *gui;
154 };
155
156 class CreateDVD_Histogram : public BC_CheckBox
157 {
158 public:
159         CreateDVD_Histogram(CreateDVD_GUI *gui, int x, int y);
160         ~CreateDVD_Histogram();
161
162         CreateDVD_GUI *gui;
163 };
164
165 class CreateDVD_LabelChapters : public BC_CheckBox
166 {
167 public:
168         CreateDVD_LabelChapters(CreateDVD_GUI *gui, int x, int y);
169         ~CreateDVD_LabelChapters();
170
171         CreateDVD_GUI *gui;
172 };
173
174 class CreateDVD_WideAudio : public BC_CheckBox
175 {
176 public:
177         CreateDVD_WideAudio(CreateDVD_GUI *gui, int x, int y);
178         ~CreateDVD_WideAudio();
179
180         CreateDVD_GUI *gui;
181 };
182
183 class CreateDVD_WideAspect : public BC_CheckBox
184 {
185 public:
186         CreateDVD_WideAspect(CreateDVD_GUI *gui, int x, int y);
187         ~CreateDVD_WideAspect();
188
189         CreateDVD_GUI *gui;
190 };
191
192 class CreateDVD_UseFFMpeg : public BC_CheckBox
193 {
194 public:
195         CreateDVD_UseFFMpeg(CreateDVD_GUI *gui, int x, int y);
196         ~CreateDVD_UseFFMpeg();
197
198         CreateDVD_GUI *gui;
199 };
200
201 class CreateDVD_GUI : public BC_Window
202 {
203 public:
204         CreateDVD_GUI(CreateDVD_Thread *thread,
205                 int x, int y, int w, int h);
206         ~CreateDVD_GUI();
207
208         void create_objects();
209         int resize_event(int w, int h);
210         int translation_event();
211         int close_event();
212         void update();
213
214         CreateDVD_Thread *thread;
215         int at_x, at_y;
216         CreateDVD_AssetTitle *asset_title;
217         int tmp_x, tmp_y;
218         CreateDVD_TmpPath *tmp_path;
219         CreateDVD_DiskSpace *disk_space;
220         CreateDVD_Format *standard;
221         ArrayList<BC_ListBoxItem *> media_sizes;
222         CreateDVD_MediaSize *media_size;
223         CreateDVD_Deinterlace *need_deinterlace;
224         CreateDVD_InverseTelecine *need_inverse_telecine;
225         CreateDVD_Scale *need_scale;
226         CreateDVD_UseFFMpeg *need_use_ffmpeg;
227         CreateDVD_ResizeTracks *need_resize_tracks;
228         CreateDVD_Histogram *need_histogram;
229         CreateDVD_WideAudio *need_wide_audio;
230         CreateDVD_WideAspect *need_wide_aspect;
231         CreateDVD_LabelChapters *need_label_chapters;
232         int ok_x, ok_y, ok_w, ok_h;
233         CreateDVD_OK *ok;
234         int cancel_x, cancel_y, cancel_w, cancel_h;
235         CreateDVD_Cancel *cancel;
236 };
237
238 class CreateDVD_FormatItem : public BC_MenuItem
239 {
240 public:
241         int handle_event();
242         CreateDVD_FormatItem(CreateDVD_Format *popup, int standard, const char *name);
243         ~CreateDVD_FormatItem();
244
245         CreateDVD_Format *popup;
246         int standard;
247 };
248
249 class CreateDVD_Format : public BC_PopupMenu
250 {
251 public:
252         void create_objects();
253         int handle_event();
254         CreateDVD_Format(CreateDVD_GUI *gui, int x, int y);
255         ~CreateDVD_Format();
256
257         CreateDVD_GUI *gui;
258 };
259
260 class CreateDVD_MediaSize : public BC_PopupTextBox
261 {
262 public:
263         CreateDVD_MediaSize(CreateDVD_GUI *gui, int x, int y);
264         ~CreateDVD_MediaSize();
265         int handle_event();
266
267         CreateDVD_GUI *gui;
268 };
269
270 #endif