X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvpluginarray.C;h=285a13cb041c82d0c28c31a649ec76f6843c96bc;hb=3a6c2c4d94e7b24eb50d8ecd3ec0b3c8d8539743;hp=bfb57271f95d15761d46d40b9cd35b8a0059776e;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/vpluginarray.C b/cinelerra-5.1/cinelerra/vpluginarray.C index bfb57271..285a13cb 100644 --- a/cinelerra-5.1/cinelerra/vpluginarray.C +++ b/cinelerra-5.1/cinelerra/vpluginarray.C @@ -2,23 +2,24 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * */ +#include "asset.h" #include "bcsignals.h" #include "cache.h" #include "edl.h" @@ -93,12 +94,13 @@ void VPluginArray::create_modules() } -void VPluginArray::process_realtime(int module, - int64_t input_position, +void VPluginArray::process_realtime(int module, + int64_t input_position, int64_t len) { - values[module]->process_buffer(realtime_buffers[module], - input_position, + int ibfr = module % file->asset->layers; + values[module]->process_buffer(realtime_buffers[ibfr], + input_position, edl->session->frame_rate, end - start, PLAY_FORWARD); @@ -109,15 +111,16 @@ int VPluginArray::process_loop(int module, int64_t &write_length) if(!realtime_buffers) realtime_buffers = file->get_video_buffer(); // Convert from array of frames to array of tracks - VFrame **temp_buffer; - temp_buffer = new VFrame*[total_tracks()]; - for(int i = 0; i < total_tracks(); i++) - { - temp_buffer[i] = realtime_buffers[i][0]; - } - - int result = values[module]->process_loop(realtime_buffers[module], write_length); - delete [] temp_buffer; +// VFrame **temp_buffer; +// temp_buffer = new VFrame*[total_tracks()]; +// for(int i = 0; i < total_tracks(); i++) +// { +// temp_buffer[i] = realtime_buffers[i][0]; +// } + + int ibfr = module % file->asset->layers; + int result = values[module]->process_loop(realtime_buffers[ibfr], write_length); +// delete [] temp_buffer; return result; }