1 /*** 2 3 Olive - Non-Linear Video Editor 4 Copyright (C) 2019 Olive Team 5 6 This program is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program. If not, see <http://www.gnu.org/licenses/>. 18 19 ***/ 20 21 #ifndef FREI0REFFECT_H 22 #define FREI0REFFECT_H 23 24 #ifndef NOFREI0R 25 26 #include <QLibrary> 27 #include <frei0r.h> 28 29 #include "effects/effect.h" 30 31 typedef void (*f0rGetParamInfo)(f0r_param_info_t * info, 32 int param_index ); 33 34 class Frei0rEffect : public Effect { 35 Q_OBJECT 36 public: 37 Frei0rEffect(Clip* c, const EffectMeta* em); 38 ~Frei0rEffect(); 39 40 virtual void process_image(double timecode, uint8_t* input, uint8_t* output, int size); 41 42 virtual void refresh(); 43 private: 44 QLibrary handle; 45 f0r_instance_t instance; 46 int param_count; 47 f0rGetParamInfo get_param_info; 48 void destruct_module(); 49 void construct_module(); 50 bool open; 51 }; 52 53 #endif 54 55 #endif // FREI0REFFECT_H 56