r956: README.BUILD - add more library recommendations
[cinelerra_cv/ct.git] / cinelerra / module.h
blobb8354ad9af1c0ba372b6e4ea1c8a6d83687e1b5a
1 #ifndef MODULE_H
2 #define MODULE_H
4 #include "attachmentpoint.inc"
5 #include "cache.inc"
6 #include "commonrender.inc"
7 #include "datatype.h"
8 #include "edl.inc"
9 #include "filexml.inc"
10 #include "guicast.h"
11 #include "maxchannels.h"
12 #include "module.inc"
13 #include "patch.inc"
14 #include "plugin.inc"
15 #include "pluginarray.inc"
16 #include "pluginserver.inc"
17 #include "pluginset.inc"
18 #include "renderengine.inc"
19 #include "sharedlocation.inc"
20 #include "track.inc"
22 class Module
24 public:
25 Module(RenderEngine *renderengine,
26 CommonRender *commonrender,
27 PluginArray *plugin_array,
28 Track *track);
29 Module() {};
30 virtual ~Module();
32 virtual void create_objects();
33 void create_new_attachments();
34 // Swaps in changed plugin servers for old plugins servers during playback.
35 // Allows data in unchanged plugins to continue. Prepares pointers in
36 // plugin server to be added in expansion.
37 void swap_attachments();
38 // Reset processing status of attachments before every buffer is processed.
39 void reset_attachments();
40 virtual AttachmentPoint* new_attachment(Plugin *plugin) { return 0; };
41 virtual int get_buffer_size() { return 0; };
42 int test_plugins();
43 AttachmentPoint* attachment_of(Plugin *plugin);
45 // Get attachment number or return 0 if out of range.
46 AttachmentPoint* get_attachment(int number);
48 void dump();
49 // Start plugin rendering
50 int render_init();
51 // Stop plugin rendering in case any resources have to be freed.
52 void render_stop();
53 // Current_position is relative to the EDL rate.
54 // If direction is REVERSE, the object before current_position is tested.
55 void update_transition(int64_t current_position, int direction);
56 EDL* get_edl();
58 // CICache used during effect
59 CICache *cache;
60 // EDL used during effect
61 EDL *edl;
62 // Not available in menu effects
63 CommonRender *commonrender;
64 // Not available in menu effects
65 RenderEngine *renderengine;
66 // Not available in realtime playback
67 PluginArray *plugin_array;
68 Track *track;
69 // TRACK_AUDIO or TRACK_VIDEO
70 int data_type;
72 // Pointer to transition in EDL
73 Plugin *transition;
74 // PluginServer for transition
75 PluginServer *transition_server;
77 // Currently active plugins.
78 // Use one AttachmentPoint for every pluginset to allow shared plugins to create
79 // extra plugin servers.
80 // AttachmentPoints are 0 if there is no plugin on the pluginset.
81 AttachmentPoint **attachments;
82 int total_attachments;
83 // AttachmentPoints are swapped in at render start to keep unchanged modules
84 // from resetting
85 AttachmentPoint **new_attachments;
86 int new_total_attachments;
89 #endif