4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5 * Copyright (C) 2003-2016 Cinelerra CV contributors
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef VIRTUALVNODE_H
24 #define VIRTUALVNODE_H
26 #include "fadeengine.inc"
27 #include "maskengine.inc"
29 #include "renderengine.inc"
31 #include "virtualnode.h"
32 #include "vrender.inc"
34 class VirtualVNode : public VirtualNode
37 // construct as a module or a plugin
38 VirtualVNode(RenderEngine *renderengine,
39 VirtualConsole *vconsole,
43 VirtualNode *parent_module);
48 VirtualNode* create_module(Plugin *real_plugin,
51 VirtualNode* create_plugin(Plugin *real_plugin);
52 void arm_attachmentpoint();
54 // Called by VirtualVConsole::process_buffer to process exit nodes.
55 // start_position - end of frame if reverse. start of frame if forward.
56 // frame_rate - rate start_position is relative to
57 // use_opengl - if opengl is available for this step
58 int render(VFrame *output_temp,
59 int64_t start_position,
63 // Read data from what comes before this node.
64 int read_data(VFrame *output_temp,
65 int64_t start_position,
70 int render_as_module(VFrame *video_out,
72 int64_t start_position,
75 void render_as_plugin(VFrame *output_temp,
76 int64_t start_position,
80 int render_projector(VFrame *input,
82 int64_t start_position, // Start of input fragment in project if forward. End of input fragment if reverse.
86 int render_fade(VFrame *output, // start of output fragment
87 int64_t start_position, // start of input fragment in project if forward / end of input fragment if reverse
93 void render_mask(VFrame *output_temp,
94 int64_t start_position_project,