r1007: Make configure detect and work on amd64.
[cinelerra_cv/mob.git] / plugins / aging / aging.h
blob0c1779a7354161d57b888a80e8fc33454c3ef0de
1 #ifndef AGING_H
2 #define AGING_H
4 class AgingMain;
5 class AgingEngine;
7 #include "bchash.h"
8 #include "loadbalance.h"
9 #include "mutex.h"
10 #include "pluginvclient.h"
11 #include "agingwindow.h"
12 #include <sys/types.h>
14 #define SCRATCH_MAX 20
17 typedef struct _scratch
19 int life;
20 int x;
21 int dx;
22 int init;
23 } scratch_t;
25 class AgingConfig
27 public:
28 AgingConfig();
30 int area_scale;
31 int aging_mode;
32 scratch_t scratches[SCRATCH_MAX];
34 static int dx[8];
35 static int dy[8];
36 int dust_interval;
39 int pits_interval;
41 int scratch_lines;
42 int pit_count;
43 int dust_count;
45 int colorage;
46 int scratch;
47 int pits;
48 int dust;
51 class AgingPackage : public LoadPackage
53 public:
54 AgingPackage();
56 int row1, row2;
59 class AgingServer : public LoadServer
61 public:
62 AgingServer(AgingMain *plugin, int total_clients, int total_packages);
64 LoadClient* new_client();
65 LoadPackage* new_package();
66 void init_packages();
67 AgingMain *plugin;
70 class AgingClient : public LoadClient
72 public:
73 AgingClient(AgingServer *server);
75 void coloraging(unsigned char **output_ptr,
76 unsigned char **input_ptr,
77 int color_model,
78 int w,
79 int h);
80 void scratching(unsigned char **output_ptr,
81 int color_model,
82 int w,
83 int h);
84 void pits(unsigned char **output_ptr,
85 int color_model,
86 int w,
87 int h);
88 void dusts(unsigned char **output_ptr,
89 int color_model,
90 int w,
91 int h);
92 void process_package(LoadPackage *package);
94 AgingMain *plugin;
98 class AgingMain : public PluginVClient
100 public:
101 AgingMain(PluginServer *server);
102 ~AgingMain();
104 // required for all realtime plugins
105 int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
106 int is_realtime();
107 char* plugin_title();
108 int show_gui();
109 void raise_window();
110 int set_string();
111 void load_configuration();
112 void save_data(KeyFrame *keyframe);
113 void read_data(KeyFrame *keyframe);
115 int load_defaults();
116 int save_defaults();
117 VFrame* new_picon();
119 // a thread for the GUI
120 AgingThread *thread;
121 AgingServer *aging_server;
122 AgingClient *aging_client;
123 AgingConfig config;
125 BC_Hash *defaults;
126 AgingEngine **engine;
127 VFrame *input_ptr, *output_ptr;
139 #endif