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