r602: Fix baver's code... don't insert timecode when show_tc is not set
[cinelerra_cv/mob.git] / cinelerra / formattools.h
blobd03dceda56f984414197d6b10aaa3b3c79ded8e9
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 int lock_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 void reposition_window(int &init_x, int &init_y);
47 // Put new asset's parameters in and change asset.
48 void update(Asset *asset, int *strategy);
49 void close_format_windows();
50 Asset* get_asset();
52 // Handle change in path text. Used in BatchRender.
53 virtual int handle_event();
55 int set_audio_options();
56 int set_video_options();
57 int get_w();
59 BC_WindowBase *window;
60 Asset *asset;
62 FormatAParams *aparams_button;
63 FormatVParams *vparams_button;
64 FormatAThread *aparams_thread;
65 FormatVThread *vparams_thread;
66 BrowseButton *path_button;
67 FormatPathText *path_textbox;
68 BC_RecentList *path_recent;
69 PipeStatus *pipe_status;
70 BC_Title *format_title;
71 FormatFormat *format_button;
72 BC_TextBox *format_text;
73 BC_ITumbler *channels_tumbler;
75 BC_Title *audio_title;
76 BC_Title *channels_title;
77 FormatChannels *channels_button;
78 FormatAudio *audio_switch;
80 BC_Title *video_title;
81 FormatVideo *video_switch;
83 FormatMultiple *multiple_files;
85 ArrayList<PluginServer*> *plugindb;
86 MWindow *mwindow;
87 int lock_compressor;
88 int recording;
89 int use_brender;
90 int do_audio;
91 int do_video;
92 int prompt_audio;
93 int prompt_audio_channels;
94 int prompt_video;
95 int prompt_video_compression;
96 int *strategy;
97 int w;
102 class FormatPathText : public BC_TextBox
104 public:
105 FormatPathText(int x, int y, FormatTools *format);
106 ~FormatPathText();
107 int handle_event();
109 FormatTools *format;
114 class FormatFormat : public FormatPopup
116 public:
117 FormatFormat(int x, int y, FormatTools *format);
118 ~FormatFormat();
120 int handle_event();
121 FormatTools *format;
124 class FormatAParams : public BC_Button
126 public:
127 FormatAParams(MWindow *mwindow, FormatTools *format, int x, int y);
128 ~FormatAParams();
129 int handle_event();
130 FormatTools *format;
133 class FormatVParams : public BC_Button
135 public:
136 FormatVParams(MWindow *mwindow, FormatTools *format, int x, int y);
137 ~FormatVParams();
138 int handle_event();
139 FormatTools *format;
143 class FormatAThread : public Thread
145 public:
146 FormatAThread(FormatTools *format);
147 ~FormatAThread();
149 void run();
151 FormatTools *format;
152 File *file;
155 class FormatVThread : public Thread
157 public:
158 FormatVThread(FormatTools *format, int lock_compressor);
159 ~FormatVThread();
161 void run();
163 FormatTools *format;
164 File *file;
165 int lock_compressor;
168 class FormatAudio : public BC_CheckBox
170 public:
171 FormatAudio(int x, int y, FormatTools *format, int default_);
172 ~FormatAudio();
173 int handle_event();
174 FormatTools *format;
177 class FormatVideo : public BC_CheckBox
179 public:
180 FormatVideo(int x, int y, FormatTools *format, int default_);
181 ~FormatVideo();
182 int handle_event();
183 FormatTools *format;
187 class FormatChannels : public BC_TextBox
189 public:
190 FormatChannels(int x, int y, FormatTools *format);
191 ~FormatChannels();
192 int handle_event();
193 FormatTools *format;
196 class FormatToTracks : public BC_CheckBox
198 public:
199 FormatToTracks(int x, int y, int *output);
200 ~FormatToTracks();
201 int handle_event();
202 int *output;
205 class FormatMultiple : public BC_CheckBox
207 public:
208 FormatMultiple(MWindow *mwindow, int x, int y, int *output);
209 ~FormatMultiple();
210 int handle_event();
211 void update(int *output);
212 int *output;
213 MWindow *mwindow;
217 #endif