00001 #ifndef DOT_H
00002 #define DOT_H
00003
00004 class DotMain;
00005 class DotEngine;
00006
00007 #include "bchash.h"
00008 #include "effecttv.h"
00009 #include "loadbalance.h"
00010 #include "mutex.h"
00011 #include "pluginvclient.h"
00012 #include "dotwindow.h"
00013
00014 #include <stdint.h>
00015
00016
00017 class DotConfig
00018 {
00019 public:
00020 DotConfig();
00021
00022
00023 int dot_depth;
00024 int dot_size;
00025 inline int dot_max()
00026 {
00027 return 1 << dot_depth;
00028 };
00029 };
00030
00031 class DotPackage : public LoadPackage
00032 {
00033 public:
00034 DotPackage();
00035
00036 int row1, row2;
00037 };
00038
00039 class DotServer : public LoadServer
00040 {
00041 public:
00042 DotServer(DotMain *plugin, int total_clients, int total_packages);
00043
00044 LoadClient* new_client();
00045 LoadPackage* new_package();
00046 void init_packages();
00047 DotMain *plugin;
00048 };
00049
00050 class DotClient : public LoadClient
00051 {
00052 public:
00053 DotClient(DotServer *server);
00054
00055 void process_package(LoadPackage *package);
00056 void draw_dot(int xx,
00057 int yy,
00058 unsigned char c,
00059 unsigned char **output_rows,
00060 int color_model);
00061
00062 unsigned char RGBtoY(unsigned char *row, int color_model);
00063
00064 DotMain *plugin;
00065 };
00066
00067
00068 class DotMain : public PluginVClient
00069 {
00070 public:
00071 DotMain(PluginServer *server);
00072 ~DotMain();
00073
00074
00075 int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
00076 int is_realtime();
00077 char* plugin_title();
00078 int show_gui();
00079 void raise_window();
00080 int set_string();
00081 void load_configuration();
00082 void save_data(KeyFrame *keyframe);
00083 void read_data(KeyFrame *keyframe);
00084
00085 int load_defaults();
00086 int save_defaults();
00087 VFrame* new_picon();
00088 void make_pattern();
00089 void init_sampxy_table();
00090 void reconfigure();
00091
00092
00093 DotThread *thread;
00094 DotServer *dot_server;
00095 DotClient *dot_client;
00096 DotConfig config;
00097
00098 BC_Hash *defaults;
00099 VFrame *input_ptr, *output_ptr;
00100 int dots_width;
00101 int dots_height;
00102 int dot_size;
00103 int dot_hsize;
00104 uint32_t *pattern;
00105 int *sampx, *sampy;
00106 int need_reconfigure;
00107 EffectTV *effecttv;
00108 };
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119 #endif