Fixed initialisation of tf in file_open(). Without setting the memory to 0,
[cinelerra_cv/mob.git] / plugins / threshold / threshold.h
blobd0af451c1ab5952ba2823088b0946be0a9dbda40
1 #ifndef THRESHOLD_H
2 #define THRESHOLD_H
5 #include "histogramengine.inc"
6 #include "loadbalance.h"
7 #include "thresholdwindow.inc"
8 #include "plugincolors.inc"
9 #include "pluginvclient.h"
12 class ThresholdEngine;
14 class ThresholdConfig
16 public:
17 ThresholdConfig();
18 int equivalent(ThresholdConfig &that);
19 void copy_from(ThresholdConfig &that);
20 void interpolate(ThresholdConfig &prev,
21 ThresholdConfig &next,
22 int64_t prev_frame,
23 int64_t next_frame,
24 int64_t current_frame);
25 void reset();
26 void boundaries();
28 float min;
29 float max;
30 int plot;
35 class ThresholdMain : public PluginVClient
37 public:
38 ThresholdMain(PluginServer *server);
39 ~ThresholdMain();
41 int process_buffer(VFrame *frame,
42 int64_t start_position,
43 double frame_rate);
44 int is_realtime();
45 int load_defaults();
46 int save_defaults();
47 void save_data(KeyFrame *keyframe);
48 void read_data(KeyFrame *keyframe);
49 void update_gui();
50 void render_gui(void *data);
51 void calculate_histogram(VFrame *frame);
52 int handle_opengl();
54 PLUGIN_CLASS_MEMBERS(ThresholdConfig, ThresholdThread);
55 HistogramEngine *engine;
56 ThresholdEngine *threshold_engine;
64 class ThresholdPackage : public LoadPackage
66 public:
67 ThresholdPackage();
68 int start;
69 int end;
73 class ThresholdUnit : public LoadClient
75 public:
76 ThresholdUnit(ThresholdEngine *server);
77 void process_package(LoadPackage *package);
79 ThresholdEngine *server;
83 class ThresholdEngine : public LoadServer
85 public:
86 ThresholdEngine(ThresholdMain *plugin);
87 ~ThresholdEngine();
89 void process_packages(VFrame *data);
90 void init_packages();
91 LoadClient* new_client();
92 LoadPackage* new_package();
94 YUV *yuv;
95 ThresholdMain *plugin;
96 VFrame *data;
104 #endif