{
if( !plugin_open ) return;
PluginVClient *vclient = (PluginVClient*)client;
+ to_ram(input);
+ to_ram(output);
vclient->source_position = current_position;
vclient->source_start = 0;
return use_opengl;
}
+int PluginServer::to_ram(VFrame *vframe)
+{
+ if( vframe->get_opengl_state() == VFrame::RAM ) return 0;
+ if( !vdevice ) return -1;
+ VDeviceX11 *vdevice_x11 = (VDeviceX11*) vdevice->get_output_base();
+ int vw = vframe->get_w(), vh = vframe->get_h();
+ vdevice_x11->do_camera(vframe, vframe, 0,0,vw,vh, 0,0,vw,vh); // copy to ram
+ return 1;
+}
void PluginServer::run_opengl(PluginClient *plugin_client)
{
#include "floatautos.h"
#include "intauto.h"
#include "intautos.h"
+#include "mainerror.h"
#include "mwindow.h"
#include "module.h"
#include "panauto.h"
return 0;
}
-int VirtualNode::attach_virtual_module(Plugin *plugin,
- int plugin_number,
- int duplicate,
- int64_t current_position)
+int VirtualNode::check_circular(Track *track)
{
- if(plugin->on)
- {
- int real_module_number = plugin->shared_location.module;
- Module *real_module = vconsole->module_number(real_module_number);
-// If a track is deleted real_module is not found
- if(!real_module) return 1;
-
- Track *track = real_module->track;
+ if( real_module && real_module->track == track ) return 1;
+ return !parent_node ? 0 : parent_node->check_circular(track);
+}
+int VirtualNode::attach_virtual_module(Plugin *plugin, int plugin_set_no,
+ int duplicate, int64_t current_position)
+{
+ if( plugin->on ) {
+ int shared_track_no = plugin->shared_location.module;
+ Module *real_module = vconsole->module_number(shared_track_no);
+// If a track is deleted real_module is not found
+ if( !real_module ) return 1;
+ Track *real_track = real_module->track;
// Switch off if circular reference. This happens if a track is deleted.
- if(this->real_module && track == this->real_module->track) return 1;
-
-
-
-
- VirtualNode *virtual_module = create_module(plugin,
- real_module,
- track);
+ if( check_circular(real_track) ) {
+ int plugin_track_no = plugin->track->get_item_number();
+ eprintf("circular references, track %d, plugin_set %d, plugin %d\n",
+ plugin_track_no, plugin_set_no, plugin->get_item_number());
+ return 1;
+ }
+ VirtualNode *virtual_module = create_module(plugin, real_module, real_track);
subnodes.append(virtual_module);
virtual_module->expand(duplicate, current_position);