00001 #ifndef FILEYUV_H
00002 #define FILEYUV_H
00003
00004 #include "yuvstream.h"
00005 #include "file.inc"
00006 #include "filelist.h"
00007 #include "vframe.inc"
00008 #include "formattools.h"
00009 #include "ffmpeg.h"
00010
00011 class PipeCheckBox;
00012 class PipePreset;
00013
00014 class FileYUV : public FileBase
00015 {
00016 public:
00017 FileYUV(Asset *asset, File *file);
00018 ~FileYUV();
00019
00020 static void get_parameters(BC_WindowBase *parent_window,
00021 Asset *asset,
00022 BC_WindowBase* &format_window,
00023 int video_options,
00024 FormatTools *format);
00025
00026 int open_file(int rd, int wr);
00027 static int check_sig(Asset *asset);
00028 static int get_best_colormodel(Asset *asset, int driver);
00029 int colormodel_supported(int colormodel);
00030 int read_frame(VFrame *frame);
00031 int write_frames(VFrame ***frame, int len);
00032 int can_copy_from(Edit *edit, int64_t position);
00033 int close_file();
00034 int set_video_position(int64_t x);
00035
00036
00037 void ensure_temp(int width, int height);
00038
00039 private:
00040 VFrame *temp;
00041 YUVStream *stream;
00042 Asset *incoming_asset;
00043 FFMPEG *ffmpeg;
00044 int pipe_latency;
00045 };
00046
00047
00048 class YUVConfigVideo : public BC_Window
00049 {
00050 public:
00051 YUVConfigVideo(BC_WindowBase *parent_window, Asset *asset,
00052 FormatTools *format);
00053 ~YUVConfigVideo();
00054
00055 int create_objects();
00056 int close_event();
00057
00058 BC_WindowBase *parent_window;
00059 Asset *asset;
00060 FormatTools *format;
00061 BC_Hash *defaults;
00062 BC_TextBox *path_textbox;
00063 BC_RecentList *path_recent;
00064 PipeCheckBox *pipe_checkbox;
00065 BC_TextBox *pipe_textbox;
00066 BC_RecentList *pipe_recent;
00067 PipePreset *mpeg2enc;
00068 PipePreset *ffmpeg;
00069 };
00070
00071
00072 class PipeCheckBox : public BC_CheckBox
00073 {
00074 public:
00075 PipeCheckBox(int x, int y, int value);
00076 int handle_event();
00077 BC_TextBox *textbox;
00078 };
00079
00080
00081
00082 class PipePreset : public BC_PopupMenu
00083 {
00084 public:
00085 PipePreset(int x, int y, char *title, BC_TextBox *textbox, BC_CheckBox *checkbox);
00086 int handle_event();
00087
00088 private:
00089 BC_TextBox *pipe_textbox;
00090 BC_CheckBox *pipe_checkbox;
00091 char *title;
00092 };
00093
00094
00095 #endif