Fixed initialisation of tf in file_open(). Without setting the memory to 0,
[cinelerra_cv/mob.git] / plugins / timeavg / timeavg.h
blobe9eb98d7ba6726adc3e15a1256f66d2ff940e85a
1 #ifndef TIMEAVG_H
2 #define TIMEAVG_H
4 class TimeAvgMain;
6 #include "bchash.inc"
7 #include "pluginvclient.h"
8 #include "timeavgwindow.h"
9 #include "vframe.inc"
11 class TimeAvgConfig
13 public:
14 TimeAvgConfig();
15 void copy_from(TimeAvgConfig *src);
16 int equivalent(TimeAvgConfig *src);
18 int frames;
19 int mode;
20 enum
22 AVERAGE,
23 ACCUMULATE,
26 int paranoid;
27 int nosubtract;
31 class TimeAvgMain : public PluginVClient
33 public:
34 TimeAvgMain(PluginServer *server);
35 ~TimeAvgMain();
37 // required for all realtime plugins
38 int process_buffer(VFrame *frame,
39 int64_t start_position,
40 double frame_rate);
41 int is_realtime();
42 char* plugin_title();
43 VFrame* new_picon();
44 int show_gui();
45 int load_configuration();
46 int set_string();
47 int load_defaults();
48 int save_defaults();
49 void save_data(KeyFrame *keyframe);
50 void read_data(KeyFrame *keyframe);
51 void raise_window();
52 void update_gui();
53 void clear_accum(int w, int h, int color_model);
54 void subtract_accum(VFrame *frame);
55 void add_accum(VFrame *frame);
56 void transfer_accum(VFrame *frame);
59 VFrame **history;
60 // Frame of history in requested samplerate
61 int64_t *history_frame;
62 int *history_valid;
63 unsigned char *accumulation;
65 // a thread for the GUI
66 TimeAvgThread *thread;
67 TimeAvgConfig config;
68 int history_size;
69 // Starting frame of history in requested framerate
70 int64_t history_start;
71 // When subtraction is disabled, this detects no change for paranoid mode.
72 int64_t prev_frame;
74 BC_Hash *defaults;
78 #endif