add auto zoombar/status color, fix 3 batchrender boobies, rotate plugin tweaks, add...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / dcoffset / dcoffset.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2009 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 GAIN_H
23 #define GAIN_H
24
25 class DCOffset;
26
27 #include "pluginaclient.h"
28
29 class DCOffsetConfig
30 {
31 public:
32         DCOffsetConfig();
33         int equivalent(DCOffsetConfig &that);
34         void copy_from(DCOffsetConfig &that);
35         void interpolate(DCOffsetConfig &prev,
36                 DCOffsetConfig &next,
37                 int64_t prev_frame,
38                 int64_t next_frame,
39                 int64_t current_frame);
40
41         double level;
42 };
43
44 class DCOffset : public PluginAClient
45 {
46 public:
47         DCOffset(PluginServer *server);
48         ~DCOffset();
49
50         int process_buffer(int64_t size,
51                 Samples *buffer,
52                 int64_t start_position,
53                 int sample_rate);
54
55         const char* plugin_title();
56         int is_realtime();
57
58         int need_collection;
59         Samples *reference;
60         double offset;
61 };
62
63 #endif