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 // If the cache was allocated by the module
87 // Parent EDL of this module when used for effect rendering.
88 // Used by APluginArray.
90 // Not available in menu effects
91 CommonRender *commonrender;
92 // Top level render engine for this module
93 // Not available in menu effects
94 RenderEngine *renderengine;
95 // Not available in realtime playback
96 PluginArray *plugin_array;
97 // Track related to this module
99 // TRACK_AUDIO or TRACK_VIDEO
102 // Pointer to transition in EDL
104 // PluginServer for transition
105 PluginServer *transition_server;
107 // RenderEngine for nested EDL
108 RenderEngine *nested_renderengine;
109 // Pointer to nested EDL currently being rendered in the parent EDL.
111 // Command for nested renderengine
112 TransportCommand *nested_command;
114 // Currently active plugins.
115 // Use one AttachmentPoint for every pluginset to allow shared plugins to create
116 // extra plugin servers.
117 // AttachmentPoints are 0 if there is no plugin on the pluginset.
118 AttachmentPoint **attachments;
119 int total_attachments;
120 // AttachmentPoints are swapped in at render start to keep unchanged modules
122 AttachmentPoint **new_attachments;
123 int new_total_attachments;