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 // Start plugin rendering 00050 int render_init(); 00051 // Stop plugin rendering in case any resources have to be freed. 00052 void render_stop(); 00053 // Current_position is relative to the EDL rate. 00054 // If direction is REVERSE, the object before current_position is tested. 00055 void update_transition(int64_t current_position, int direction); 00056 EDL* get_edl(); 00057 00058 // CICache used during effect 00059 CICache *cache; 00060 // EDL used during effect 00061 EDL *edl; 00062 // Not available in menu effects 00063 CommonRender *commonrender; 00064 // Not available in menu effects 00065 RenderEngine *renderengine; 00066 // Not available in realtime playback 00067 PluginArray *plugin_array; 00068 Track *track; 00069 // TRACK_AUDIO or TRACK_VIDEO 00070 int data_type; 00071 00072 // Pointer to transition in EDL 00073 Plugin *transition; 00074 // PluginServer for transition 00075 PluginServer *transition_server; 00076 00077 // Currently active plugins. 00078 // Use one AttachmentPoint for every pluginset to allow shared plugins to create 00079 // extra plugin servers. 00080 // AttachmentPoints are 0 if there is no plugin on the pluginset. 00081 AttachmentPoint **attachments; 00082 int total_attachments; 00083 // AttachmentPoints are swapped in at render start to keep unchanged modules 00084 // from resetting 00085 AttachmentPoint **new_attachments; 00086 int new_total_attachments; 00087 }; 00088 00089 #endif
1.5.5