r668: Configure.in and autogen.sh cleanup based on ideas by giskard.
[cinelerra_cv.git] / cinelerra / attachmentpoint.h
blob2109e908e93f6934173e769184dbe5d330e8f32c
1 #ifndef ATTACHMENTPOINT_H
2 #define ATTACHMENTPOINT_H
4 #include "arraylist.h"
5 #include "filexml.inc"
6 #include "floatauto.inc"
7 #include "floatautos.inc"
8 #include "mwindow.inc"
9 #include "messages.inc"
10 #include "plugin.inc"
11 #include "pluginserver.inc"
12 #include "renderengine.inc"
13 #include "sharedlocation.h"
14 #include "vframe.inc"
15 #include "virtualnode.inc"
17 #include <stdint.h>
19 // Attachment points for Modules to attach plugins
20 class AttachmentPoint
22 public:
23 AttachmentPoint(RenderEngine *renderengine,
24 Plugin *plugin,
25 int data_type);
26 virtual ~AttachmentPoint();
28 virtual int reset_parameters();
29 // Used by Module::swap_attachments before virtual console expansion.
30 // Return 1 if the plugin id is the same
31 int identical(AttachmentPoint *old);
33 // Move new_virtual_plugins to virtual_plugins.
34 // Called after virtual console expansion.
35 int render_init();
37 // Called before every buffer processing
38 void reset_status();
40 // Attach a virtual plugin for realtime playback. Returns the number
41 // of the buffer assigned to a multichannel plugin.
42 int attach_virtual_plugin(VirtualNode *virtual_plugin);
43 virtual void delete_buffer_vector() {};
45 // return 0 if ready to render
46 // check all the virtual plugins for waiting status
47 // all virtual plugins attached to this must be waiting for a render
48 // int sort(VirtualNode *virtual_plugin);
49 // Called by plugin server to render GUI with data.
50 void render_gui(void *data);
51 void render_gui(void *data, int size);
52 virtual int get_buffer_size() { return 0; };
54 // For unshared plugins, virtual plugins to send configuration events to and
55 // read data from.
56 // For shared plugins, virtual plugins to allocate buffers for and read
57 // data from.
58 ArrayList<VirtualNode*> virtual_plugins;
60 // List for a new virtual console which is transferred to virtual_plugins after
61 // virtual console expansion.
62 ArrayList<VirtualNode*> new_virtual_plugins;
64 // Plugin servers to do signal processing
65 ArrayList<PluginServer*> plugin_servers;
67 // renderengine Plugindb entry
68 PluginServer *plugin_server;
69 // Pointer to the plugin object in EDL
70 Plugin *plugin;
71 // ID of plugin object in EDL
72 int plugin_id;
73 RenderEngine *renderengine;
74 // Current input buffer being loaded. Determines when the plugin server is run
75 // int current_buffer;
77 // Status of last buffer processed.
78 // Used in shared multichannel plugin to tell of it's already been processed
79 // or needs to be processed again for a different target.
80 // start_position is the end of the range if playing in reverse.
81 int64_t start_position;
82 int64_t len;
83 int64_t sample_rate;
84 double frame_rate;
85 int is_processed;
86 int data_type;
98 int multichannel_shared(int search_new);
99 int singlechannel();
101 // Simply deletes the virtual plugin
102 int render_stop(int duplicate);
105 int dump();
109 #endif