r956: README.BUILD - add more library recommendations
[cinelerra_cv/ct.git] / cinelerra / formattools.h
blob0a09c155c46d09e37985f3dd9936aaae12562203
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"
12 #include "pipe.inc"
14 class FormatAParams;
15 class FormatVParams;
16 class FormatAThread;
17 class FormatVThread;
18 class FormatChannels;
19 class FormatPathButton;
20 class FormatPathText;
21 class FormatFormat;
22 class FormatAudio;
23 class FormatVideo;
24 class FormatMultiple;
26 class FormatTools
28 public:
29 FormatTools(MWindow *mwindow,
30 BC_WindowBase *window,
31 Asset *asset);
32 virtual ~FormatTools();
34 int create_objects(int &init_x,
35 int &init_y,
36 int do_audio, // Include tools for audio
37 int do_video, // Include tools for video
38 int prompt_audio, // Include checkbox for audio
39 int prompt_video, // Include checkbox for video
40 int prompt_audio_channels,
41 int prompt_video_compression,
42 char *locked_compressor, // Select compressors to be offered
43 int recording, // Change captions for recording
44 int *strategy, // If nonzero, prompt for insertion strategy
45 int brender); // Supply file formats for background rendering
46 // In recording preferences, aspects of the format are locked
47 // depending on the driver used.
48 void update_driver(int driver);
51 void reposition_window(int &init_x, int &init_y);
52 // Put new asset's parameters in and change asset.
53 void update(Asset *asset, int *strategy);
54 // Update filename extension when format is changed.
55 void update_extension();
56 void close_format_windows();
57 Asset* get_asset();
59 // Handle change in path text. Used in BatchRender.
60 virtual int handle_event();
62 int set_audio_options();
63 int set_video_options();
64 int get_w();
66 BC_WindowBase *window;
67 Asset *asset;
69 FormatAParams *aparams_button;
70 FormatVParams *vparams_button;
71 FormatAThread *aparams_thread;
72 FormatVThread *vparams_thread;
73 BrowseButton *path_button;
74 FormatPathText *path_textbox;
75 BC_RecentList *path_recent;
76 PipeStatus *pipe_status;
77 BC_Title *format_title;
78 FormatFormat *format_button;
79 BC_TextBox *format_text;
80 BC_ITumbler *channels_tumbler;
82 BC_Title *audio_title;
83 BC_Title *channels_title;
84 FormatChannels *channels_button;
85 FormatAudio *audio_switch;
87 BC_Title *video_title;
88 FormatVideo *video_switch;
90 FormatMultiple *multiple_files;
92 ArrayList<PluginServer*> *plugindb;
93 MWindow *mwindow;
94 char *locked_compressor;
95 int recording;
96 int use_brender;
97 int do_audio;
98 int do_video;
99 int prompt_audio;
100 int prompt_audio_channels;
101 int prompt_video;
102 int prompt_video_compression;
103 int *strategy;
104 int w;
105 // Determines what the configuration buttons do.
106 int video_driver;
111 class FormatPathText : public BC_TextBox
113 public:
114 FormatPathText(int x, int y, FormatTools *format);
115 ~FormatPathText();
116 int handle_event();
118 FormatTools *format;
123 class FormatFormat : public FormatPopup
125 public:
126 FormatFormat(int x, int y, FormatTools *format);
127 ~FormatFormat();
129 int handle_event();
130 FormatTools *format;
133 class FormatAParams : public BC_Button
135 public:
136 FormatAParams(MWindow *mwindow, FormatTools *format, int x, int y);
137 ~FormatAParams();
138 int handle_event();
139 FormatTools *format;
142 class FormatVParams : public BC_Button
144 public:
145 FormatVParams(MWindow *mwindow, FormatTools *format, int x, int y);
146 ~FormatVParams();
147 int handle_event();
148 FormatTools *format;
152 class FormatAThread : public Thread
154 public:
155 FormatAThread(FormatTools *format);
156 ~FormatAThread();
158 void run();
160 FormatTools *format;
161 File *file;
164 class FormatVThread : public Thread
166 public:
167 FormatVThread(FormatTools *format);
168 ~FormatVThread();
170 void run();
172 FormatTools *format;
173 File *file;
176 class FormatAudio : public BC_CheckBox
178 public:
179 FormatAudio(int x, int y, FormatTools *format, int default_);
180 ~FormatAudio();
181 int handle_event();
182 FormatTools *format;
185 class FormatVideo : public BC_CheckBox
187 public:
188 FormatVideo(int x, int y, FormatTools *format, int default_);
189 ~FormatVideo();
190 int handle_event();
191 FormatTools *format;
195 class FormatChannels : public BC_TextBox
197 public:
198 FormatChannels(int x, int y, FormatTools *format);
199 ~FormatChannels();
200 int handle_event();
201 FormatTools *format;
204 class FormatToTracks : public BC_CheckBox
206 public:
207 FormatToTracks(int x, int y, int *output);
208 ~FormatToTracks();
209 int handle_event();
210 int *output;
213 class FormatMultiple : public BC_CheckBox
215 public:
216 FormatMultiple(MWindow *mwindow, int x, int y, int *output);
217 ~FormatMultiple();
218 int handle_event();
219 void update(int *output);
220 int *output;
221 MWindow *mwindow;
225 #endif