r969: Render format selector: Do not change the path name when the format is changed.
[cinelerra_cv/ct.git] / cinelerra / formattools.h
blob102035d261677ba2827c6e0b7dfe1c9b67e6b355
1 #ifndef FORMATTOOLS_H
2 #define FORMATTOOLS_H
4 #include "asset.inc"
5 #include "guicast.h"
6 #include "bitspopup.h"
7 #include "browsebutton.h"
8 #include "compresspopup.h"
9 #include "file.inc"
10 #include "formatpopup.h"
11 #include "mwindow.inc"
13 class FormatAParams;
14 class FormatVParams;
15 class FormatAThread;
16 class FormatVThread;
17 class FormatChannels;
18 class FormatPathButton;
19 class FormatPathText;
20 class FormatFormat;
21 class FormatAudio;
22 class FormatVideo;
23 class FormatMultiple;
25 class FormatTools
27 public:
28 FormatTools(MWindow *mwindow,
29 BC_WindowBase *window,
30 Asset *asset);
31 virtual ~FormatTools();
33 int create_objects(int &init_x,
34 int &init_y,
35 int do_audio, // Include tools for audio
36 int do_video, // Include tools for video
37 int prompt_audio, // Include checkbox for audio
38 int prompt_video, // Include checkbox for video
39 int prompt_audio_channels,
40 int prompt_video_compression,
41 char *locked_compressor, // Select compressors to be offered
42 int recording, // Change captions for recording
43 int *strategy, // If nonzero, prompt for insertion strategy
44 int brender); // Supply file formats for background rendering
45 // In recording preferences, aspects of the format are locked
46 // depending on the driver used.
47 void update_driver(int driver);
50 void reposition_window(int &init_x, int &init_y);
51 // Put new asset's parameters in and change asset.
52 void update(Asset *asset, int *strategy);
53 // Update filename extension when format is changed.
54 void update_extension();
55 void close_format_windows();
56 Asset* get_asset();
58 // Handle change in path text. Used in BatchRender.
59 virtual int handle_event();
61 int set_audio_options();
62 int set_video_options();
63 int get_w();
65 BC_WindowBase *window;
66 Asset *asset;
68 FormatAParams *aparams_button;
69 FormatVParams *vparams_button;
70 FormatAThread *aparams_thread;
71 FormatVThread *vparams_thread;
72 BrowseButton *path_button;
73 FormatPathText *path_textbox;
74 BC_RecentList *path_recent;
75 BC_Title *format_title;
76 FormatFormat *format_button;
77 BC_TextBox *format_text;
78 BC_ITumbler *channels_tumbler;
80 BC_Title *audio_title;
81 BC_Title *channels_title;
82 FormatChannels *channels_button;
83 FormatAudio *audio_switch;
85 BC_Title *video_title;
86 FormatVideo *video_switch;
88 FormatMultiple *multiple_files;
90 ArrayList<PluginServer*> *plugindb;
91 MWindow *mwindow;
92 char *locked_compressor;
93 int recording;
94 int use_brender;
95 int do_audio;
96 int do_video;
97 int prompt_audio;
98 int prompt_audio_channels;
99 int prompt_video;
100 int prompt_video_compression;
101 int *strategy;
102 int w;
103 // Determines what the configuration buttons do.
104 int video_driver;
109 class FormatPathText : public BC_TextBox
111 public:
112 FormatPathText(int x, int y, FormatTools *format);
113 ~FormatPathText();
114 int handle_event();
116 FormatTools *format;
121 class FormatFormat : public FormatPopup
123 public:
124 FormatFormat(int x, int y, FormatTools *format);
125 ~FormatFormat();
127 int handle_event();
128 FormatTools *format;
131 class FormatAParams : public BC_Button
133 public:
134 FormatAParams(MWindow *mwindow, FormatTools *format, int x, int y);
135 ~FormatAParams();
136 int handle_event();
137 FormatTools *format;
140 class FormatVParams : public BC_Button
142 public:
143 FormatVParams(MWindow *mwindow, FormatTools *format, int x, int y);
144 ~FormatVParams();
145 int handle_event();
146 FormatTools *format;
150 class FormatAThread : public Thread
152 public:
153 FormatAThread(FormatTools *format);
154 ~FormatAThread();
156 void run();
158 FormatTools *format;
159 File *file;
162 class FormatVThread : public Thread
164 public:
165 FormatVThread(FormatTools *format);
166 ~FormatVThread();
168 void run();
170 FormatTools *format;
171 File *file;
174 class FormatAudio : public BC_CheckBox
176 public:
177 FormatAudio(int x, int y, FormatTools *format, int default_);
178 ~FormatAudio();
179 int handle_event();
180 FormatTools *format;
183 class FormatVideo : public BC_CheckBox
185 public:
186 FormatVideo(int x, int y, FormatTools *format, int default_);
187 ~FormatVideo();
188 int handle_event();
189 FormatTools *format;
193 class FormatChannels : public BC_TextBox
195 public:
196 FormatChannels(int x, int y, FormatTools *format);
197 ~FormatChannels();
198 int handle_event();
199 FormatTools *format;
202 class FormatToTracks : public BC_CheckBox
204 public:
205 FormatToTracks(int x, int y, int *output);
206 ~FormatToTracks();
207 int handle_event();
208 int *output;
211 class FormatMultiple : public BC_CheckBox
213 public:
214 FormatMultiple(MWindow *mwindow, int x, int y, int *output);
215 ~FormatMultiple();
216 int handle_event();
217 void update(int *output);
218 int *output;
219 MWindow *mwindow;
223 #endif