00001 #ifndef ATTACHMENTPOINT_H 00002 #define ATTACHMENTPOINT_H 00003 00004 #include "arraylist.h" 00005 #include "filexml.inc" 00006 #include "floatauto.inc" 00007 #include "floatautos.inc" 00008 #include "mwindow.inc" 00009 #include "messages.inc" 00010 #include "plugin.inc" 00011 #include "pluginserver.inc" 00012 #include "renderengine.inc" 00013 #include "sharedlocation.h" 00014 #include "vframe.inc" 00015 #include "virtualnode.inc" 00016 00017 #include <stdint.h> 00018 00019 // Attachment points for Modules to attach plugins 00020 class AttachmentPoint 00021 { 00022 public: 00023 AttachmentPoint(RenderEngine *renderengine, 00024 Plugin *plugin, 00025 int data_type); 00026 virtual ~AttachmentPoint(); 00027 00028 virtual int reset_parameters(); 00029 // Used by Module::swap_attachments before virtual console expansion. 00030 // Return 1 if the plugin id is the same 00031 int identical(AttachmentPoint *old); 00032 00033 // Move new_virtual_plugins to virtual_plugins. 00034 // Called after virtual console expansion. 00035 int render_init(); 00036 00037 // Cause plugins to free any resources which are required after stopping 00038 void render_stop(); 00039 00040 // Called before every buffer processing 00041 void reset_status(); 00042 00043 // Attach a virtual plugin for realtime playback. Returns the number 00044 // of the buffer assigned to a multichannel plugin. 00045 int attach_virtual_plugin(VirtualNode *virtual_plugin); 00046 virtual void delete_buffer_vector() {}; 00047 00048 // return 0 if ready to render 00049 // check all the virtual plugins for waiting status 00050 // all virtual plugins attached to this must be waiting for a render 00051 // int sort(VirtualNode *virtual_plugin); 00052 // Called by plugin server to render GUI with data. 00053 void render_gui(void *data); 00054 void render_gui(void *data, int size); 00055 int gui_open(); 00056 virtual int get_buffer_size() { return 0; }; 00057 00058 // For unshared plugins, virtual plugins to send configuration events to and 00059 // read data from. 00060 // For shared plugins, virtual plugins to allocate buffers for and read 00061 // data from. 00062 ArrayList<VirtualNode*> virtual_plugins; 00063 00064 // List for a new virtual console which is transferred to virtual_plugins after 00065 // virtual console expansion. 00066 ArrayList<VirtualNode*> new_virtual_plugins; 00067 00068 // Plugin servers to do signal processing 00069 ArrayList<PluginServer*> plugin_servers; 00070 00071 // renderengine Plugindb entry 00072 PluginServer *plugin_server; 00073 // Pointer to the plugin object in EDL 00074 Plugin *plugin; 00075 // ID of plugin object in EDL 00076 int plugin_id; 00077 RenderEngine *renderengine; 00078 // Current input buffer being loaded. Determines when the plugin server is run 00079 // int current_buffer; 00080 00081 // Status of last buffer processed. 00082 // Used in shared multichannel plugin to tell of it's already been processed 00083 // or needs to be processed again for a different target. 00084 // start_position is the end of the range if playing in reverse. 00085 int64_t start_position; 00086 int64_t len; 00087 int64_t sample_rate; 00088 double frame_rate; 00089 int is_processed; 00090 int data_type; 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 int multichannel_shared(int search_new); 00103 int singlechannel(); 00104 00105 00106 00107 int dump(); 00108 00109 }; 00110 00111 #endif
1.5.5