Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
vsthost.h
Go to the documentation of this file.
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 VSTHOSTWIN_H
22 #define VSTHOSTWIN_H
23 
24 #include <QDialog>
25 #include <QLibrary>
26 
27 #include "effects/effect.h"
28 #include "include/vestige.h"
29 
30 // Plugin's dispatcher function
31 typedef intptr_t (*dispatcherFuncPtr)(AEffect *effect, int32_t opCode, int32_t index, int32_t value, void *ptr, float opt);
32 
33 class VSTHost : public Effect {
34  Q_OBJECT
35 public:
36  VSTHost(Clip* c, const EffectMeta* em);
37  ~VSTHost();
38  void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
39 
40  void custom_load(QXmlStreamReader& stream);
41  void save(QXmlStreamWriter& stream);
42 private slots:
43  void show_interface(bool show);
44  void uncheck_show_button();
45  void change_plugin();
46 private:
49 
50  void loadPlugin();
51  void freePlugin();
55  void startPlugin();
56  void stopPlugin();
57  void resumePlugin();
58  void suspendPlugin();
59  bool canPluginDo(char *canDoString);
60  void processAudio(long numFrames);
61  void CreateDialogIfNull();
62  float** inputs;
63  float** outputs;
64  QDialog* dialog;
65  QByteArray data_cache;
66 
68 
69  QLibrary modulePtr;
70 };
71 
72 #endif // VSTHOSTWIN_H
void stopPlugin()
Definition: vsthost.cpp:197
bool configurePluginCallbacks()
Definition: vsthost.cpp:166
float ** outputs
Definition: vsthost.h:63
The ButtonField class.
Definition: buttonfield.h:18
void resumePlugin()
Definition: vsthost.cpp:203
bool canPluginDo(char *canDoString)
Definition: vsthost.cpp:211
void custom_load(QXmlStreamReader &stream)
Definition: vsthost.cpp:313
Definition: vsthost.h:33
dispatcherFuncPtr dispatcher
Definition: vsthost.h:52
void CreateDialogIfNull()
Definition: vsthost.cpp:224
AEffect * plugin
Definition: vsthost.h:53
VSTHost(Clip *c, const EffectMeta *em)
Definition: vsthost.cpp:240
FileField * file_field
Definition: vsthost.h:47
Definition: clip.h:56
intptr_t(* dispatcherFuncPtr)(AEffect *effect, int32_t opCode, int32_t index, int32_t value, void *ptr, float opt)
Definition: vsthost.h:31
Definition: vestige.h:275
QByteArray data_cache
Definition: vsthost.h:65
void startPlugin()
Definition: vsthost.cpp:187
void change_plugin()
Definition: vsthost.cpp:356
Definition: effect.h:52
ButtonField * show_interface_btn
Definition: vsthost.h:48
void processAudio(long numFrames)
Definition: vsthost.cpp:215
~VSTHost()
Definition: vsthost.cpp:266
void show_interface(bool show)
Definition: vsthost.cpp:335
float ** inputs
Definition: vsthost.h:62
void process_audio(double timecode_start, double timecode_end, quint8 *samples, int nb_bytes, int channel_count)
Definition: vsthost.cpp:277
void save(QXmlStreamWriter &stream)
Definition: vsthost.cpp:323
void suspendPlugin()
Definition: vsthost.cpp:207
QLibrary modulePtr
Definition: vsthost.h:69
void loadPlugin()
Definition: vsthost.cpp:114
void freePlugin()
Definition: vsthost.cpp:157
QDialog * dialog
Definition: vsthost.h:64
void uncheck_show_button()
Definition: vsthost.cpp:352
void send_data_cache_to_plugin()
Definition: vsthost.cpp:235
Definition: effect.h:136
The FileField class.
Definition: filefield.h:12