mask xy scale, mask boundary only overlay, fix 8 char mask nm bug, rework maskgui...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / delayvideo / delayvideo.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 DELAYVIDEO_H
23 #define DELAYVIDEO_H
24
25
26
27 #include "bchash.inc"
28 #include "guicast.h"
29 #include "mutex.h"
30 #include "pluginvclient.h"
31 #include "vframe.inc"
32
33
34
35 class DelayVideo;
36
37
38
39
40
41 class DelayVideoConfig
42 {
43 public:
44         DelayVideoConfig();
45
46         int equivalent(DelayVideoConfig &that);
47         void copy_from(DelayVideoConfig &that);
48         void interpolate(DelayVideoConfig &prev,
49                 DelayVideoConfig &next,
50                 int64_t prev_frame,
51                 int64_t next_frame,
52                 int64_t current_frame);
53
54         // kjb - match defined update() type of float instead of double.
55         float length;
56 };
57
58 class DelayVideoWindow;
59
60 class DelayVideoSlider : public BC_TumbleTextBox
61 {
62 public:
63         DelayVideoSlider(DelayVideoWindow *window,
64                 DelayVideo *plugin,
65                 int x,
66                 int y);
67
68         int handle_event();
69
70         DelayVideo *plugin;
71         DelayVideoWindow *window;
72
73 };
74
75
76 class DelayVideoWindow : public PluginClientWindow
77 {
78 public:
79         DelayVideoWindow(DelayVideo *plugin);
80         ~DelayVideoWindow();
81
82         void create_objects();
83         void update_gui();
84
85         DelayVideo *plugin;
86         DelayVideoSlider *slider;
87 };
88
89
90
91
92
93
94 class DelayVideo : public PluginVClient
95 {
96 public:
97         DelayVideo(PluginServer *server);
98         ~DelayVideo();
99
100         PLUGIN_CLASS_MEMBERS(DelayVideoConfig);
101         int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
102         int is_realtime();
103         void save_data(KeyFrame *keyframe);
104         void read_data(KeyFrame *keyframe);
105         void reset();
106         void reconfigure();
107
108
109
110         void update_gui();
111
112
113         int need_reconfigure;
114         int allocation;
115         VFrame **buffer;
116         VFrame *input, *output;
117 };
118
119
120
121 #endif