no longer need ffmpeg patch0 which was for Termux
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / burn / burn.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef BURN_H
23 #define BURN_H
24
25 class BurnMain;
26
27 #include "bchash.h"
28 #include "effecttv.inc"
29 #include "loadbalance.h"
30 #include "mutex.h"
31 #include "bccolors.inc"
32 #include "pluginvclient.h"
33 #include "burnwindow.h"
34 #include <sys/types.h>
35
36 class BurnConfig
37 {
38 public:
39         BurnConfig();
40         int threshold;
41         int decay;
42         double recycle;  // Seconds to a recycle
43 };
44
45 class BurnPackage : public LoadPackage
46 {
47 public:
48         BurnPackage();
49
50         int row1, row2;
51 };
52
53 class BurnServer : public LoadServer
54 {
55 public:
56         BurnServer(BurnMain *plugin, int total_clients, int total_packages);
57
58         LoadClient* new_client();
59         LoadPackage* new_package();
60         void init_packages();
61         BurnMain *plugin;
62 };
63
64 class BurnClient : public LoadClient
65 {
66 public:
67         BurnClient(BurnServer *server);
68
69         void process_package(LoadPackage *package);
70
71         BurnMain *plugin;
72 };
73
74
75 class BurnMain : public PluginVClient
76 {
77 public:
78         BurnMain(PluginServer *server);
79         ~BurnMain();
80
81 // required for all realtime plugins
82         int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
83         int is_realtime();
84         PLUGIN_CLASS_MEMBERS(BurnConfig);
85         void save_data(KeyFrame *keyframe);
86         void read_data(KeyFrame *keyframe);
87
88
89
90
91
92         void HSItoRGB(double H,
93                 double S,
94                 double I,
95                 int *r,
96                 int *g,
97                 int *b,
98                 int color_model);
99         void make_palette(int color_model);
100
101         BurnServer *burn_server;
102
103         int palette[3][256];
104         unsigned char *buffer;
105
106         int total;
107
108         EffectTV *effecttv;
109         VFrame *input_ptr, *output_ptr;
110         YUV *yuv;
111 };
112
113
114
115
116
117
118
119
120
121
122 #endif