00001 #ifndef DELAYVIDEO_H
00002 #define DELAYVIDEO_H
00003
00004
00005
00006 #include "bchash.inc"
00007 #include "guicast.h"
00008 #include "mutex.h"
00009 #include "pluginvclient.h"
00010 #include "vframe.inc"
00011
00012
00013
00014 class DelayVideo;
00015
00016
00017
00018
00019
00020 class DelayVideoConfig
00021 {
00022 public:
00023 DelayVideoConfig();
00024
00025 int equivalent(DelayVideoConfig &that);
00026 void copy_from(DelayVideoConfig &that);
00027 void interpolate(DelayVideoConfig &prev,
00028 DelayVideoConfig &next,
00029 int64_t prev_frame,
00030 int64_t next_frame,
00031 int64_t current_frame);
00032
00033
00034 float length;
00035 };
00036
00037
00038 class DelayVideoSlider : public BC_TextBox
00039 {
00040 public:
00041 DelayVideoSlider(DelayVideo *plugin, int x, int y);
00042
00043 int handle_event();
00044
00045 DelayVideo *plugin;
00046
00047 };
00048
00049
00050 class DelayVideoWindow : public BC_Window
00051 {
00052 public:
00053 DelayVideoWindow(DelayVideo *plugin, int x, int y);
00054 ~DelayVideoWindow();
00055
00056 void create_objects();
00057 int close_event();
00058 void update_gui();
00059
00060 DelayVideo *plugin;
00061 DelayVideoSlider *slider;
00062 };
00063
00064
00065 PLUGIN_THREAD_HEADER(DelayVideo, DelayVideoThread, DelayVideoWindow)
00066
00067
00068
00069
00070 class DelayVideo : public PluginVClient
00071 {
00072 public:
00073 DelayVideo(PluginServer *server);
00074 ~DelayVideo();
00075
00076 int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
00077 int is_realtime();
00078 char* plugin_title();
00079 int show_gui();
00080 void raise_window();
00081 int set_string();
00082 void save_data(KeyFrame *keyframe);
00083 void read_data(KeyFrame *keyframe);
00084 VFrame* new_picon();
00085 void reset();
00086 void reconfigure();
00087
00088
00089
00090 int load_configuration();
00091 int load_defaults();
00092 int save_defaults();
00093 void update_gui();
00094
00095
00096 int need_reconfigure;
00097 int allocation;
00098 DelayVideoConfig config;
00099 DelayVideoThread *thread;
00100 VFrame **buffer;
00101 BC_Hash *defaults;
00102 VFrame *input, *output;
00103 };
00104
00105
00106
00107 #endif