4 * Copyright (C) 2009 Adam Williams <broadcast at earthling dot net>
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.
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.
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
25 #include "attachmentpoint.inc"
27 #include "commonrender.inc"
30 #include "filexml.inc"
32 #include "maxchannels.h"
36 #include "pluginarray.inc"
37 #include "pluginserver.inc"
38 #include "pluginset.inc"
39 #include "preferences.inc"
40 #include "renderengine.inc"
41 #include "sharedlocation.inc"
43 #include "transportque.inc"
44 #include "virtualconsole.inc"
49 Module(RenderEngine *renderengine,
50 CommonRender *commonrender,
51 PluginArray *plugin_array,
56 virtual void create_objects();
57 void create_new_attachments();
58 // Swaps in changed plugin servers for old plugins servers during playback.
59 // Allows data in unchanged plugins to continue. Prepares pointers in
60 // plugin server to be added in expansion.
61 void swap_attachments();
62 // Reset processing status of attachments before every buffer is processed.
63 void reset_attachments();
64 virtual AttachmentPoint* new_attachment(Plugin *plugin) { return 0; };
65 virtual int get_buffer_size() { return 0; };
67 AttachmentPoint* attachment_of(Plugin *plugin);
69 // Get attachment number or return 0 if out of range.
70 AttachmentPoint* get_attachment(int number);
73 // Start plugin rendering
75 // Stop plugin rendering in case any resources have to be freed.
77 // Current_position is relative to the EDL rate.
78 // If direction is REVERSE, the object before current_position is tested.
79 void update_transition(int64_t current_position, int direction);
81 Preferences* get_preferences();
83 // CICache used during effect & nested EDL
85 // Parent EDL of this module when used for effect rendering.
86 // Used by APluginArray.
88 // Not available in menu effects
89 CommonRender *commonrender;
90 // Top level render engine for this module
91 // Not available in menu effects
92 RenderEngine *renderengine;
93 // Not available in realtime playback
94 PluginArray *plugin_array;
95 // Track related to this module
97 // TRACK_AUDIO or TRACK_VIDEO
102 // PluginServer for transition
103 PluginServer *transition_server;
105 // RenderEngine for nested EDL
106 RenderEngine *nested_renderengine;
107 // Pointer to nested EDL currently being rendered in the parent EDL.
109 // Command for nested renderengine
110 TransportCommand *nested_command;
112 // Currently active plugins.
113 // Use one AttachmentPoint for every pluginset to allow shared plugins to create
114 // extra plugin servers.
115 // AttachmentPoints are 0 if there is no plugin on the pluginset.
116 AttachmentPoint **attachments;
117 int total_attachments;
118 // AttachmentPoints are swapped in at render start to keep unchanged modules
120 AttachmentPoint **new_attachments;
121 int new_total_attachments;