00001 #ifndef YUV_H 00002 #define YUV_H 00003 00004 #define MAXVALUE 100 00005 00006 class YUVMain; 00007 class YUVEngine; 00008 00009 #include "bcbase.h" 00010 #include "../colors/colors.h" 00011 #include "yuvwindow.h" 00012 #include "pluginvclient.h" 00013 00014 00015 class YUVMain : public PluginVClient 00016 { 00017 public: 00018 YUVMain(int argc, char *argv[]); 00019 ~YUVMain(); 00020 00021 // required for all realtime plugins 00022 int process_realtime(long size, VFrame **input_ptr, VFrame **output_ptr); 00023 int plugin_is_realtime(); 00024 int plugin_is_multi_channel(); 00025 char* plugin_title(); 00026 int start_gui(); 00027 int stop_gui(); 00028 int show_gui(); 00029 int hide_gui(); 00030 int set_string(); 00031 int load_defaults(); 00032 int save_defaults(); 00033 int save_data(char *text); 00034 int read_data(char *text); 00035 00036 // parameters needed 00037 int reconfigure(); // Rebuild tables 00038 int y; 00039 int u; 00040 int v; 00041 int automated_function; 00042 int reconfigure_flag; 00043 00044 // a thread for the GUI 00045 YUVThread *thread; 00046 00047 private: 00048 BC_Hash *defaults; 00049 YUVEngine **engine; 00050 }; 00051 00052 class YUVEngine : public Thread 00053 { 00054 public: 00055 YUVEngine(YUVMain *plugin, int start_y, int end_y); 00056 ~YUVEngine(); 00057 00058 int start_process_frame(VFrame **output, VFrame **input, int size); 00059 int wait_process_frame(); 00060 void run(); 00061 00062 YUVMain *plugin; 00063 int start_y; 00064 int end_y; 00065 int size; 00066 VFrame **output, **input; 00067 int last_frame; 00068 Mutex input_lock, output_lock; 00069 YUV yuv; 00070 }; 00071 00072 00073 #endif
1.5.5