shuttle and transportque reworks, new shdmp, titler font textbox tweak
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / virtualvnode.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 VIRTUALVNODE_H
23 #define VIRTUALVNODE_H
24
25 #include "fadeengine.inc"
26 #include "maskengine.inc"
27 #include "plugin.inc"
28 #include "renderengine.inc"
29 #include "vframe.inc"
30 #include "virtualnode.h"
31 #include "vrender.inc"
32
33 class VirtualVNode : public VirtualNode
34 {
35 public:
36 // construct as a module or a plugin
37         VirtualVNode(RenderEngine *renderengine,
38                 VirtualConsole *vconsole,
39                 Module *real_module,
40                 Plugin *real_plugin,
41                 Track *track,
42                 VirtualNode *parent_module);
43
44         ~VirtualVNode();
45
46 // expansions
47         VirtualNode* create_module(Plugin *real_plugin,
48                                                         Module *real_module,
49                                                         Track *track);
50         VirtualNode* create_plugin(Plugin *real_plugin);
51         void arm_attachmentpoint();
52
53 // Called by VirtualVConsole::process_buffer to process exit nodes.
54 // start_position - end of frame if reverse.  start of frame if forward.
55 // frame_rate - rate start_position is relative to
56 // use_opengl - if opengl is available for this step
57         int render(VFrame *output_temp,
58                 int64_t start_position,
59                 double frame_rate,
60                 int use_opengl);
61
62 // Read data from what comes before this node.
63         int read_data(VFrame *output_temp,
64                 int64_t start_position,
65                 double frame_rate,
66                 int use_opengl);
67
68 private:
69         int render_as_module(VFrame *video_out,
70                 VFrame *output_temp,
71                 int64_t start_position,
72                 double frame_rate,
73                 int use_opengl);
74         void render_as_plugin(VFrame *output_temp,
75                 int64_t start_position,
76                 double frame_rate,
77                 int use_opengl);
78
79         int render_projector(VFrame *input,
80                         VFrame *output,
81                         int64_t start_position,  // Start of input fragment in project if forward.  End of input fragment if reverse.
82                         double frame_rate,
83                         int use_opengl);
84
85         int render_fade(VFrame *output,        // start of output fragment
86                         int64_t start_position,  // start of input fragment in project if forward / end of input fragment if reverse
87                         double frame_rate,
88                         Autos *autos,
89                         int direction,
90                         int use_opengl);
91
92         void render_mask(VFrame *output_temp,
93                 int64_t start_position_project,
94                 double frame_rate,
95                 int use_opengl);
96
97         float alpha;
98         FadeEngine *fader;
99         MaskEngine *masker;
100 };
101
102
103 #endif