00001 #ifndef BRIGHTNESS_H
00002 #define BRIGHTNESS_H
00003
00004 class BrightnessEngine;
00005 class BrightnessMain;
00006
00007 #include "brightnesswindow.h"
00008 #include "loadbalance.h"
00009 #include "plugincolors.h"
00010 #include "pluginvclient.h"
00011
00012 class BrightnessConfig
00013 {
00014 public:
00015 BrightnessConfig();
00016
00017 int equivalent(BrightnessConfig &that);
00018 void copy_from(BrightnessConfig &that);
00019 void interpolate(BrightnessConfig &prev,
00020 BrightnessConfig &next,
00021 int64_t prev_frame,
00022 int64_t next_frame,
00023 int64_t current_frame);
00024
00025 float brightness;
00026 float contrast;
00027 int luma;
00028 };
00029
00030 class BrightnessMain : public PluginVClient
00031 {
00032 public:
00033 BrightnessMain(PluginServer *server);
00034 ~BrightnessMain();
00035
00036
00037 int process_buffer(VFrame *frame,
00038 int64_t start_position,
00039 double frame_rate);
00040 int is_realtime();
00041 char* plugin_title();
00042 int show_gui();
00043 void raise_window();
00044 void update_gui();
00045 int set_string();
00046 int load_configuration();
00047 void save_data(KeyFrame *keyframe);
00048 void read_data(KeyFrame *keyframe);
00049 int load_defaults();
00050 int save_defaults();
00051 VFrame* new_picon();
00052 int handle_opengl();
00053
00054
00055
00056
00057
00058
00059
00060
00061 BrightnessConfig config;
00062
00063 BrightnessThread *thread;
00064 BrightnessEngine *engine;
00065 BC_Hash *defaults;
00066 int redo_buffers;
00067 static YUV yuv;
00068
00069 VFrame *input, *output;
00070 };
00071
00072
00073
00074
00075
00076
00077 class BrightnessPackage : public LoadPackage
00078 {
00079 public:
00080 BrightnessPackage();
00081
00082 int row1, row2;
00083 };
00084
00085 class BrightnessUnit : public LoadClient
00086 {
00087 public:
00088 BrightnessUnit(BrightnessEngine *server, BrightnessMain *plugin);
00089 ~BrightnessUnit();
00090
00091 void process_package(LoadPackage *package);
00092
00093 BrightnessMain *plugin;
00094 };
00095
00096 class BrightnessEngine : public LoadServer
00097 {
00098 public:
00099 BrightnessEngine(BrightnessMain *plugin, int cpus);
00100 ~BrightnessEngine();
00101
00102 void init_packages();
00103 LoadClient* new_client();
00104 LoadPackage* new_package();
00105
00106 BrightnessMain *plugin;
00107 };
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117 #endif