00001 #ifndef MODULE_H 00002 #define MODULE_H 00003 00004 #include "attachmentpoint.inc" 00005 #include "cache.inc" 00006 #include "commonrender.inc" 00007 #include "datatype.h" 00008 #include "edl.inc" 00009 #include "filexml.inc" 00010 #include "guicast.h" 00011 #include "maxchannels.h" 00012 #include "module.inc" 00013 #include "patch.inc" 00014 #include "plugin.inc" 00015 #include "pluginarray.inc" 00016 #include "pluginserver.inc" 00017 #include "pluginset.inc" 00018 #include "renderengine.inc" 00019 #include "sharedlocation.inc" 00020 #include "track.inc" 00021 00022 class Module 00023 { 00024 public: 00025 Module(RenderEngine *renderengine, 00026 CommonRender *commonrender, 00027 PluginArray *plugin_array, 00028 Track *track); 00029 Module() {}; 00030 virtual ~Module(); 00031 00032 virtual void create_objects(); 00033 void create_new_attachments(); 00034 // Swaps in changed plugin servers for old plugins servers during playback. 00035 // Allows data in unchanged plugins to continue. Prepares pointers in 00036 // plugin server to be added in expansion. 00037 void swap_attachments(); 00038 // Reset processing status of attachments before every buffer is processed. 00039 void reset_attachments(); 00040 virtual AttachmentPoint* new_attachment(Plugin *plugin) { return 0; }; 00041 virtual int get_buffer_size() { return 0; }; 00042 int test_plugins(); 00043 AttachmentPoint* attachment_of(Plugin *plugin); 00044 00045 // Get attachment number or return 0 if out of range. 00046 AttachmentPoint* get_attachment(int number); 00047 00048 void dump(); 00049 int render_init(); 00050 // Current_position is relative to the EDL rate. 00051 // If direction is REVERSE, the object before current_position is tested. 00052 void update_transition(int64_t current_position, int direction); 00053 EDL* get_edl(); 00054 00055 // CICache used during effect 00056 CICache *cache; 00057 // EDL used during effect 00058 EDL *edl; 00059 // Not available in menu effects 00060 CommonRender *commonrender; 00061 // Not available in menu effects 00062 RenderEngine *renderengine; 00063 // Not available in realtime playback 00064 PluginArray *plugin_array; 00065 Track *track; 00066 // TRACK_AUDIO or TRACK_VIDEO 00067 int data_type; 00068 00069 // Pointer to transition in EDL 00070 Plugin *transition; 00071 // PluginServer for transition 00072 PluginServer *transition_server; 00073 00074 // Currently active plugins. 00075 // Use one AttachmentPoint for every pluginset to allow shared plugins to create 00076 // extra plugin servers. 00077 // AttachmentPoints are 0 if there is no plugin on the pluginset. 00078 AttachmentPoint **attachments; 00079 int total_attachments; 00080 // AttachmentPoints are swapped in at render start to keep unchanged modules 00081 // from resetting 00082 AttachmentPoint **new_attachments; 00083 int new_total_attachments; 00084 }; 00085 00086 #endif
1.4.4