00001 #ifndef FORMATTOOLS_H
00002 #define FORMATTOOLS_H
00003
00004 #include "asset.inc"
00005 #include "guicast.h"
00006 #include "bitspopup.h"
00007 #include "browsebutton.h"
00008 #include "compresspopup.h"
00009 #include "file.inc"
00010 #include "formatpopup.h"
00011 #include "mwindow.inc"
00012
00013 class FormatAParams;
00014 class FormatVParams;
00015 class FormatAThread;
00016 class FormatVThread;
00017 class FormatChannels;
00018 class FormatPathButton;
00019 class FormatPathText;
00020 class FormatFormat;
00021 class FormatAudio;
00022 class FormatVideo;
00023 class FormatMultiple;
00024
00025 class FormatTools
00026 {
00027 public:
00028 FormatTools(MWindow *mwindow,
00029 BC_WindowBase *window,
00030 Asset *asset);
00031 virtual ~FormatTools();
00032
00033 int create_objects(int &init_x,
00034 int &init_y,
00035 int do_audio,
00036 int do_video,
00037 int prompt_audio,
00038 int prompt_video,
00039 int prompt_audio_channels,
00040 int prompt_video_compression,
00041 char *locked_compressor,
00042 int recording,
00043 int *strategy,
00044 int brender);
00045
00046
00047 void update_driver(int driver);
00048
00049
00050 void reposition_window(int &init_x, int &init_y);
00051
00052 void update(Asset *asset, int *strategy);
00053
00054 void update_extension();
00055 void close_format_windows();
00056 Asset* get_asset();
00057
00058
00059 virtual int handle_event();
00060
00061 int set_audio_options();
00062 int set_video_options();
00063 int get_w();
00064
00065 BC_WindowBase *window;
00066 Asset *asset;
00067
00068 FormatAParams *aparams_button;
00069 FormatVParams *vparams_button;
00070 FormatAThread *aparams_thread;
00071 FormatVThread *vparams_thread;
00072 BrowseButton *path_button;
00073 FormatPathText *path_textbox;
00074 BC_RecentList *path_recent;
00075 BC_Title *format_title;
00076 FormatFormat *format_button;
00077 BC_TextBox *format_text;
00078 BC_ITumbler *channels_tumbler;
00079
00080 BC_Title *audio_title;
00081 BC_Title *channels_title;
00082 FormatChannels *channels_button;
00083 FormatAudio *audio_switch;
00084
00085 BC_Title *video_title;
00086 FormatVideo *video_switch;
00087
00088 FormatMultiple *multiple_files;
00089
00090 ArrayList<PluginServer*> *plugindb;
00091 MWindow *mwindow;
00092 char *locked_compressor;
00093 int recording;
00094 int use_brender;
00095 int do_audio;
00096 int do_video;
00097 int prompt_audio;
00098 int prompt_audio_channels;
00099 int prompt_video;
00100 int prompt_video_compression;
00101 int *strategy;
00102 int w;
00103
00104 int video_driver;
00105 };
00106
00107
00108
00109 class FormatPathText : public BC_TextBox
00110 {
00111 public:
00112 FormatPathText(int x, int y, FormatTools *format);
00113 ~FormatPathText();
00114 int handle_event();
00115
00116 FormatTools *format;
00117 };
00118
00119
00120
00121 class FormatFormat : public FormatPopup
00122 {
00123 public:
00124 FormatFormat(int x, int y, FormatTools *format);
00125 ~FormatFormat();
00126
00127 int handle_event();
00128 FormatTools *format;
00129 };
00130
00131 class FormatAParams : public BC_Button
00132 {
00133 public:
00134 FormatAParams(MWindow *mwindow, FormatTools *format, int x, int y);
00135 ~FormatAParams();
00136 int handle_event();
00137 FormatTools *format;
00138 };
00139
00140 class FormatVParams : public BC_Button
00141 {
00142 public:
00143 FormatVParams(MWindow *mwindow, FormatTools *format, int x, int y);
00144 ~FormatVParams();
00145 int handle_event();
00146 FormatTools *format;
00147 };
00148
00149
00150 class FormatAThread : public Thread
00151 {
00152 public:
00153 FormatAThread(FormatTools *format);
00154 ~FormatAThread();
00155
00156 void run();
00157
00158 FormatTools *format;
00159 File *file;
00160 };
00161
00162 class FormatVThread : public Thread
00163 {
00164 public:
00165 FormatVThread(FormatTools *format);
00166 ~FormatVThread();
00167
00168 void run();
00169
00170 FormatTools *format;
00171 File *file;
00172 };
00173
00174 class FormatAudio : public BC_CheckBox
00175 {
00176 public:
00177 FormatAudio(int x, int y, FormatTools *format, int default_);
00178 ~FormatAudio();
00179 int handle_event();
00180 FormatTools *format;
00181 };
00182
00183 class FormatVideo : public BC_CheckBox
00184 {
00185 public:
00186 FormatVideo(int x, int y, FormatTools *format, int default_);
00187 ~FormatVideo();
00188 int handle_event();
00189 FormatTools *format;
00190 };
00191
00192
00193 class FormatChannels : public BC_TextBox
00194 {
00195 public:
00196 FormatChannels(int x, int y, FormatTools *format);
00197 ~FormatChannels();
00198 int handle_event();
00199 FormatTools *format;
00200 };
00201
00202 class FormatToTracks : public BC_CheckBox
00203 {
00204 public:
00205 FormatToTracks(int x, int y, int *output);
00206 ~FormatToTracks();
00207 int handle_event();
00208 int *output;
00209 };
00210
00211 class FormatMultiple : public BC_CheckBox
00212 {
00213 public:
00214 FormatMultiple(MWindow *mwindow, int x, int y, int *output);
00215 ~FormatMultiple();
00216 int handle_event();
00217 void update(int *output);
00218 int *output;
00219 MWindow *mwindow;
00220 };
00221
00222
00223 #endif