moved vst to cross platform defs (still untested on other platforms

This commit is contained in:
itsmattkc
2019-01-21 12:34:36 +11:00
parent 22791f16ba
commit e2ceda74db
4 changed files with 330 additions and 326 deletions
@@ -1,9 +1,7 @@
#include "vsthostwin.h" #include "vsthost.h"
// adapted from http://teragonaudio.com/article/How-to-make-your-own-VST-host.html // adapted from http://teragonaudio.com/article/How-to-make-your-own-VST-host.html
#include <Windows.h>
#include <QPushButton> #include <QPushButton>
#include <QDialog> #include <QDialog>
#include <QMessageBox> #include <QMessageBox>
@@ -52,20 +50,22 @@ typedef VstInt32 (*processEventsFuncPtr)(VstEvents *events);
// Plugin's process() method // Plugin's process() method
typedef void (*processFuncPtr)(AEffect *effect, float **inputs, float **outputs, VstInt32 sampleFrames); typedef void (*processFuncPtr)(AEffect *effect, float **inputs, float **outputs, VstInt32 sampleFrames);
void VSTHostWin::loadPlugin() { void VSTHost::loadPlugin() {
QString dll_fn = file_field->get_filename(0, true); QString dll_fn = file_field->get_filename(0, true);
LPCWSTR dll_fn_w = reinterpret_cast<const wchar_t*>(dll_fn.utf16());
modulePtr = LoadLibrary(dll_fn_w); modulePtr = LibLoad(dll_fn);
if(modulePtr == nullptr) { if(modulePtr == nullptr) {
DWORD dll_err = GetLastError(); DWORD dll_err = GetLastError();
qCritical() << "Failed to load VST" << dll_fn_w << "-" << dll_err; qCritical() << "Failed to load VST" << dll_fn << "-" << dll_err;
#ifdef _WIN32
QString msg_err = tr("Failed to load VST plugin \"%1\": %2").arg(dll_fn, QString::number(dll_err)); QString msg_err = tr("Failed to load VST plugin \"%1\": %2").arg(dll_fn, QString::number(dll_err));
if (dll_err == 193) { if (dll_err == 193) {
#ifdef _WIN64 #ifdef _WIN64
msg_err += "\n\n" + tr("NOTE: You can't load 32-bit VST plugins into a 64-bit build of Olive. Please find a 64-bit version of this plugin or switch to a 32-bit build of Olive."); msg_err += "\n\n" + tr("NOTE: You can't load 32-bit VST plugins into a 64-bit build of Olive. Please find a 64-bit version of this plugin or switch to a 32-bit build of Olive.");
#elif _WIN32 #elif _WIN32
msg_err += "\n\n" + tr("NOTE: You can't load 64-bit VST plugins into a 32-bit build of Olive. Please find a 32-bit version of this plugin or switch to a 64-bit build of Olive."); msg_err += "\n\n" + tr("NOTE: You can't load 64-bit VST plugins into a 32-bit build of Olive. Please find a 32-bit version of this plugin or switch to a 64-bit build of Olive.");
#endif
#endif #endif
} }
QMessageBox::critical(mainWindow, tr("Error loading VST plugin"), msg_err); QMessageBox::critical(mainWindow, tr("Error loading VST plugin"), msg_err);
@@ -73,20 +73,20 @@ void VSTHostWin::loadPlugin() {
} }
vstPluginFuncPtr mainEntryPoint = vstPluginFuncPtr mainEntryPoint =
reinterpret_cast<vstPluginFuncPtr>(GetProcAddress(modulePtr, "VSTPluginMain")); reinterpret_cast<vstPluginFuncPtr>(LibAddress(modulePtr, "VSTPluginMain"));
// Instantiate the plugin // Instantiate the plugin
plugin = mainEntryPoint(hostCallback); plugin = mainEntryPoint(hostCallback);
} }
void VSTHostWin::freePlugin() { void VSTHost::freePlugin() {
if (plugin != nullptr) { if (plugin != nullptr) {
stopPlugin(); stopPlugin();
FreeLibrary(modulePtr); LibClose(modulePtr);
plugin = nullptr; plugin = nullptr;
} }
} }
bool VSTHostWin::configurePluginCallbacks() { bool VSTHost::configurePluginCallbacks() {
// Check plugin's magic number // Check plugin's magic number
// If incorrect, then the file either was not loaded properly, is not a // If incorrect, then the file either was not loaded properly, is not a
// real VST plugin, or is otherwise corrupt. // real VST plugin, or is otherwise corrupt.
@@ -107,7 +107,7 @@ bool VSTHostWin::configurePluginCallbacks() {
return true; return true;
} }
void VSTHostWin::startPlugin() { void VSTHost::startPlugin() {
dispatcher(plugin, effOpen, 0, 0, nullptr, 0.0f); dispatcher(plugin, effOpen, 0, 0, nullptr, 0.0f);
// Set some default properties // Set some default properties
@@ -117,25 +117,25 @@ void VSTHostWin::startPlugin() {
resumePlugin(); resumePlugin();
} }
void VSTHostWin::stopPlugin() { void VSTHost::stopPlugin() {
suspendPlugin(); suspendPlugin();
dispatcher(plugin, effClose, 0, 0, nullptr, 0); dispatcher(plugin, effClose, 0, 0, nullptr, 0);
} }
void VSTHostWin::resumePlugin() { void VSTHost::resumePlugin() {
dispatcher(plugin, effMainsChanged, 0, 1, nullptr, 0.0f); dispatcher(plugin, effMainsChanged, 0, 1, nullptr, 0.0f);
} }
void VSTHostWin::suspendPlugin() { void VSTHost::suspendPlugin() {
dispatcher(plugin, effMainsChanged, 0, 0, nullptr, 0.0f); dispatcher(plugin, effMainsChanged, 0, 0, nullptr, 0.0f);
} }
bool VSTHostWin::canPluginDo(char *canDoString) { bool VSTHost::canPluginDo(char *canDoString) {
return (dispatcher(plugin, effCanDo, 0, 0, static_cast<void*>(canDoString), 0.0f) > 0); return (dispatcher(plugin, effCanDo, 0, 0, static_cast<void*>(canDoString), 0.0f) > 0);
} }
void VSTHostWin::initializeIO() { void VSTHost::initializeIO() {
// inputs and outputs are assumed to be float** and are declared elsewhere, // inputs and outputs are assumed to be float** and are declared elsewhere,
// most likely the are fields owned by this class. numChannels and blocksize // most likely the are fields owned by this class. numChannels and blocksize
// are also fields, both should be size_t (or unsigned int, if you prefer). // are also fields, both should be size_t (or unsigned int, if you prefer).
@@ -147,7 +147,7 @@ void VSTHostWin::initializeIO() {
} }
} }
void VSTHostWin::processAudio(long numFrames) { void VSTHost::processAudio(long numFrames) {
// Always reset the output array before processing. // Always reset the output array before processing.
for (int i=0;i<CHANNEL_COUNT;i++) { for (int i=0;i<CHANNEL_COUNT;i++) {
memset(outputs[i], 0, BLOCK_SIZE*sizeof(float)); memset(outputs[i], 0, BLOCK_SIZE*sizeof(float));
@@ -156,7 +156,7 @@ void VSTHostWin::processAudio(long numFrames) {
plugin->processReplacing(plugin, inputs, outputs, numFrames); plugin->processReplacing(plugin, inputs, outputs, numFrames);
} }
VSTHostWin::VSTHostWin(Clip* c, const EffectMeta *em) : Effect(c, em) { VSTHost::VSTHost(Clip* c, const EffectMeta *em) : Effect(c, em) {
plugin = nullptr; plugin = nullptr;
initializeIO(); initializeIO();
@@ -178,11 +178,11 @@ VSTHostWin::VSTHostWin(Clip* c, const EffectMeta *em) : Effect(c, em) {
connect(dialog, SIGNAL(finished(int)), this, SLOT(uncheck_show_button())); connect(dialog, SIGNAL(finished(int)), this, SLOT(uncheck_show_button()));
} }
VSTHostWin::~VSTHostWin() { VSTHost::~VSTHost() {
freePlugin(); freePlugin();
} }
void VSTHostWin::process_audio(double, double, quint8* samples, int nb_bytes, int) { void VSTHost::process_audio(double, double, quint8* samples, int nb_bytes, int) {
if (plugin != nullptr) { if (plugin != nullptr) {
int interval = BLOCK_SIZE*4; int interval = BLOCK_SIZE*4;
for (int i=0;i<nb_bytes;i+=interval) { for (int i=0;i<nb_bytes;i+=interval) {
@@ -218,7 +218,7 @@ void VSTHostWin::process_audio(double, double, quint8* samples, int nb_bytes, in
} }
} }
void VSTHostWin::custom_load(QXmlStreamReader &stream) { void VSTHost::custom_load(QXmlStreamReader &stream) {
if (stream.name() == "plugindata") { if (stream.name() == "plugindata") {
stream.readNext(); stream.readNext();
QByteArray b = QByteArray::fromBase64(stream.text().toUtf8()); QByteArray b = QByteArray::fromBase64(stream.text().toUtf8());
@@ -228,7 +228,7 @@ void VSTHostWin::custom_load(QXmlStreamReader &stream) {
} }
} }
void VSTHostWin::save(QXmlStreamWriter &stream) { void VSTHost::save(QXmlStreamWriter &stream) {
Effect::save(stream); Effect::save(stream);
if (plugin != nullptr) { if (plugin != nullptr) {
char* p = nullptr; char* p = nullptr;
@@ -238,15 +238,15 @@ void VSTHostWin::save(QXmlStreamWriter &stream) {
} }
} }
void VSTHostWin::show_interface(bool show) { void VSTHost::show_interface(bool show) {
dialog->setVisible(show); dialog->setVisible(show);
} }
void VSTHostWin::uncheck_show_button() { void VSTHost::uncheck_show_button() {
show_interface_btn->setChecked(false); show_interface_btn->setChecked(false);
} }
void VSTHostWin::change_plugin() { void VSTHost::change_plugin() {
freePlugin(); freePlugin();
loadPlugin(); loadPlugin();
if (plugin != nullptr) { if (plugin != nullptr) {
@@ -258,7 +258,7 @@ void VSTHostWin::change_plugin() {
dialog->setFixedWidth(eRect->right); dialog->setFixedWidth(eRect->right);
dialog->setFixedHeight(eRect->bottom); dialog->setFixedHeight(eRect->bottom);
} else { } else {
FreeLibrary(modulePtr); LibClose(modulePtr);
plugin = nullptr; plugin = nullptr;
} }
} }
@@ -3,6 +3,8 @@
#include "project/effect.h" #include "project/effect.h"
#include "io/crossplatformlib.h"
#include <vst/aeffectx.h> #include <vst/aeffectx.h>
// Plugin's dispatcher function // Plugin's dispatcher function
@@ -11,11 +13,11 @@ typedef VstIntPtr (*dispatcherFuncPtr)(AEffect *effect, VstInt32 opCode, VstInt3
struct AEffect; struct AEffect;
class QDialog; class QDialog;
class VSTHostWin : public Effect { class VSTHost : public Effect {
Q_OBJECT Q_OBJECT
public: public:
VSTHostWin(Clip* c, const EffectMeta* em); VSTHost(Clip* c, const EffectMeta* em);
~VSTHostWin(); ~VSTHost();
void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count); void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
void custom_load(QXmlStreamReader& stream); void custom_load(QXmlStreamReader& stream);
@@ -43,7 +45,7 @@ private:
float** outputs; float** outputs;
QDialog* dialog; QDialog* dialog;
QPushButton* show_interface_btn; QPushButton* show_interface_btn;
HMODULE modulePtr; ModulePtr modulePtr;
}; };
#endif // VSTHOSTWIN_H #endif // VSTHOSTWIN_H
+295 -293
View File
@@ -1,293 +1,295 @@
#------------------------------------------------- #-------------------------------------------------
# #
# Project created by QtCreator 2018-05-11T10:31:59 # Project created by QtCreator 2018-05-11T10:31:59
# #
#------------------------------------------------- #-------------------------------------------------
QT += core gui multimedia opengl QT += core gui multimedia opengl
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
mac { mac {
TARGET = Olive TARGET = Olive
} }
!mac { !mac {
TARGET = olive-editor TARGET = olive-editor
} }
TEMPLATE = app TEMPLATE = app
# The following define makes your compiler emit warnings if you use # The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings # any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the # depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it. # deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs. # You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line. # In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt. # You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
# Tries to get the current Git short hash # Tries to get the current Git short hash
system("which git") { system("which git") {
GITHASHVAR = $$system(git --git-dir $$PWD/.git --work-tree $$PWD log -1 --format=%h) GITHASHVAR = $$system(git --git-dir $$PWD/.git --work-tree $$PWD log -1 --format=%h)
DEFINES += GITHASH=\\"\"$$GITHASHVAR\\"\" DEFINES += GITHASH=\\"\"$$GITHASHVAR\\"\"
} }
CONFIG += c++11 CONFIG += c++11
SOURCES += \ SOURCES += \
main.cpp \ main.cpp \
mainwindow.cpp \ mainwindow.cpp \
panels/project.cpp \ panels/project.cpp \
panels/effectcontrols.cpp \ panels/effectcontrols.cpp \
panels/viewer.cpp \ panels/viewer.cpp \
panels/timeline.cpp \ panels/timeline.cpp \
ui/sourcetable.cpp \ ui/sourcetable.cpp \
dialogs/aboutdialog.cpp \ dialogs/aboutdialog.cpp \
ui/timelinewidget.cpp \ ui/timelinewidget.cpp \
project/media.cpp \ project/media.cpp \
project/footage.cpp \ project/footage.cpp \
project/sequence.cpp \ project/sequence.cpp \
project/clip.cpp \ project/clip.cpp \
playback/playback.cpp \ playback/playback.cpp \
playback/audio.cpp \ playback/audio.cpp \
io/config.cpp \ io/config.cpp \
dialogs/newsequencedialog.cpp \ dialogs/newsequencedialog.cpp \
ui/viewerwidget.cpp \ ui/viewerwidget.cpp \
ui/viewercontainer.cpp \ ui/viewercontainer.cpp \
dialogs/exportdialog.cpp \ dialogs/exportdialog.cpp \
ui/collapsiblewidget.cpp \ ui/collapsiblewidget.cpp \
panels/panels.cpp \ panels/panels.cpp \
playback/cacher.cpp \ playback/cacher.cpp \
io/exportthread.cpp \ io/exportthread.cpp \
ui/timelineheader.cpp \ ui/timelineheader.cpp \
io/previewgenerator.cpp \ io/previewgenerator.cpp \
ui/labelslider.cpp \ ui/labelslider.cpp \
dialogs/preferencesdialog.cpp \ dialogs/preferencesdialog.cpp \
ui/audiomonitor.cpp \ ui/audiomonitor.cpp \
project/undo.cpp \ project/undo.cpp \
ui/scrollarea.cpp \ ui/scrollarea.cpp \
ui/comboboxex.cpp \ ui/comboboxex.cpp \
ui/colorbutton.cpp \ ui/colorbutton.cpp \
dialogs/replaceclipmediadialog.cpp \ dialogs/replaceclipmediadialog.cpp \
ui/fontcombobox.cpp \ ui/fontcombobox.cpp \
ui/checkboxex.cpp \ ui/checkboxex.cpp \
ui/keyframeview.cpp \ ui/keyframeview.cpp \
ui/texteditex.cpp \ ui/texteditex.cpp \
dialogs/demonotice.cpp \ dialogs/demonotice.cpp \
project/marker.cpp \ project/marker.cpp \
dialogs/speeddialog.cpp \ dialogs/speeddialog.cpp \
dialogs/mediapropertiesdialog.cpp \ dialogs/mediapropertiesdialog.cpp \
io/crc32.cpp \ io/crc32.cpp \
project/projectmodel.cpp \ project/projectmodel.cpp \
io/loadthread.cpp \ io/loadthread.cpp \
dialogs/loaddialog.cpp \ dialogs/loaddialog.cpp \
debug.cpp \ debug.cpp \
io/path.cpp \ io/path.cpp \
effects/internal/linearfadetransition.cpp \ effects/internal/linearfadetransition.cpp \
effects/internal/transformeffect.cpp \ effects/internal/transformeffect.cpp \
effects/internal/solideffect.cpp \ effects/internal/solideffect.cpp \
effects/internal/texteffect.cpp \ effects/internal/texteffect.cpp \
effects/internal/timecodeeffect.cpp \ effects/internal/timecodeeffect.cpp \
effects/internal/audionoiseeffect.cpp \ effects/internal/audionoiseeffect.cpp \
effects/internal/paneffect.cpp \ effects/internal/paneffect.cpp \
effects/internal/toneeffect.cpp \ effects/internal/toneeffect.cpp \
effects/internal/volumeeffect.cpp \ effects/internal/volumeeffect.cpp \
effects/internal/crossdissolvetransition.cpp \ effects/internal/crossdissolvetransition.cpp \
effects/internal/shakeeffect.cpp \ effects/internal/shakeeffect.cpp \
effects/internal/exponentialfadetransition.cpp \ effects/internal/exponentialfadetransition.cpp \
effects/internal/logarithmicfadetransition.cpp \ effects/internal/logarithmicfadetransition.cpp \
effects/internal/cornerpineffect.cpp \ effects/internal/cornerpineffect.cpp \
io/math.cpp \ io/math.cpp \
io/qpainterwrapper.cpp \ io/qpainterwrapper.cpp \
project/effect.cpp \ project/effect.cpp \
project/transition.cpp \ project/transition.cpp \
project/effectrow.cpp \ project/effectrow.cpp \
project/effectfield.cpp \ project/effectfield.cpp \
effects/internal/cubetransition.cpp \ effects/internal/cubetransition.cpp \
project/effectgizmo.cpp \ project/effectgizmo.cpp \
io/clipboard.cpp \ io/clipboard.cpp \
dialogs/stabilizerdialog.cpp \ dialogs/stabilizerdialog.cpp \
io/avtogl.cpp \ io/avtogl.cpp \
ui/resizablescrollbar.cpp \ ui/resizablescrollbar.cpp \
ui/sourceiconview.cpp \ ui/sourceiconview.cpp \
project/sourcescommon.cpp \ project/sourcescommon.cpp \
ui/keyframenavigator.cpp \ ui/keyframenavigator.cpp \
panels/grapheditor.cpp \ panels/grapheditor.cpp \
ui/graphview.cpp \ ui/graphview.cpp \
ui/keyframedrawing.cpp \ ui/keyframedrawing.cpp \
ui/clickablelabel.cpp \ ui/clickablelabel.cpp \
project/keyframe.cpp \ project/keyframe.cpp \
ui/rectangleselect.cpp \ ui/rectangleselect.cpp \
dialogs/actionsearch.cpp \ dialogs/actionsearch.cpp \
ui/embeddedfilechooser.cpp \ ui/embeddedfilechooser.cpp \
effects/internal/fillleftrighteffect.cpp \ effects/internal/fillleftrighteffect.cpp \
effects/internal/voideffect.cpp \ effects/internal/voideffect.cpp \
dialogs/texteditdialog.cpp \ dialogs/texteditdialog.cpp \
dialogs/debugdialog.cpp \ dialogs/debugdialog.cpp \
ui/renderthread.cpp \ ui/renderthread.cpp \
ui/renderfunctions.cpp \ ui/renderfunctions.cpp \
ui/viewerwindow.cpp \ ui/viewerwindow.cpp \
project/projectfilter.cpp \ project/projectfilter.cpp \
effects/internal/frei0reffect.cpp \ effects/internal/frei0reffect.cpp \
project/effectloaders.cpp \ project/effectloaders.cpp \
io/crossplatformlib.cpp io/crossplatformlib.cpp \
effects/internal/vsthost.cpp
HEADERS += \
mainwindow.h \ HEADERS += \
panels/project.h \ mainwindow.h \
panels/effectcontrols.h \ panels/project.h \
panels/viewer.h \ panels/effectcontrols.h \
panels/timeline.h \ panels/viewer.h \
ui/sourcetable.h \ panels/timeline.h \
dialogs/aboutdialog.h \ ui/sourcetable.h \
ui/timelinewidget.h \ dialogs/aboutdialog.h \
project/media.h \ ui/timelinewidget.h \
project/footage.h \ project/media.h \
project/sequence.h \ project/footage.h \
project/clip.h \ project/sequence.h \
playback/playback.h \ project/clip.h \
playback/audio.h \ playback/playback.h \
io/config.h \ playback/audio.h \
dialogs/newsequencedialog.h \ io/config.h \
ui/viewerwidget.h \ dialogs/newsequencedialog.h \
ui/viewercontainer.h \ ui/viewerwidget.h \
dialogs/exportdialog.h \ ui/viewercontainer.h \
ui/collapsiblewidget.h \ dialogs/exportdialog.h \
panels/panels.h \ ui/collapsiblewidget.h \
playback/cacher.h \ panels/panels.h \
io/exportthread.h \ playback/cacher.h \
ui/timelinetools.h \ io/exportthread.h \
ui/timelineheader.h \ ui/timelinetools.h \
io/previewgenerator.h \ ui/timelineheader.h \
ui/labelslider.h \ io/previewgenerator.h \
dialogs/preferencesdialog.h \ ui/labelslider.h \
ui/audiomonitor.h \ dialogs/preferencesdialog.h \
project/undo.h \ ui/audiomonitor.h \
ui/scrollarea.h \ project/undo.h \
ui/comboboxex.h \ ui/scrollarea.h \
ui/colorbutton.h \ ui/comboboxex.h \
dialogs/replaceclipmediadialog.h \ ui/colorbutton.h \
ui/fontcombobox.h \ dialogs/replaceclipmediadialog.h \
ui/checkboxex.h \ ui/fontcombobox.h \
ui/keyframeview.h \ ui/checkboxex.h \
ui/texteditex.h \ ui/keyframeview.h \
dialogs/demonotice.h \ ui/texteditex.h \
project/marker.h \ dialogs/demonotice.h \
project/selection.h \ project/marker.h \
dialogs/speeddialog.h \ project/selection.h \
dialogs/mediapropertiesdialog.h \ dialogs/speeddialog.h \
io/crc32.h \ dialogs/mediapropertiesdialog.h \
project/projectmodel.h \ io/crc32.h \
io/loadthread.h \ project/projectmodel.h \
dialogs/loaddialog.h \ io/loadthread.h \
debug.h \ dialogs/loaddialog.h \
io/path.h \ debug.h \
effects/internal/transformeffect.h \ io/path.h \
effects/internal/solideffect.h \ effects/internal/transformeffect.h \
effects/internal/texteffect.h \ effects/internal/solideffect.h \
effects/internal/timecodeeffect.h \ effects/internal/texteffect.h \
effects/internal/audionoiseeffect.h \ effects/internal/timecodeeffect.h \
effects/internal/paneffect.h \ effects/internal/audionoiseeffect.h \
effects/internal/toneeffect.h \ effects/internal/paneffect.h \
effects/internal/volumeeffect.h \ effects/internal/toneeffect.h \
effects/internal/shakeeffect.h \ effects/internal/volumeeffect.h \
effects/internal/linearfadetransition.h \ effects/internal/shakeeffect.h \
effects/internal/crossdissolvetransition.h \ effects/internal/linearfadetransition.h \
effects/internal/exponentialfadetransition.h \ effects/internal/crossdissolvetransition.h \
effects/internal/logarithmicfadetransition.h \ effects/internal/exponentialfadetransition.h \
effects/internal/cornerpineffect.h \ effects/internal/logarithmicfadetransition.h \
io/math.h \ effects/internal/cornerpineffect.h \
io/qpainterwrapper.h \ io/math.h \
project/effect.h \ io/qpainterwrapper.h \
project/transition.h \ project/effect.h \
project/effectrow.h \ project/transition.h \
project/effectfield.h \ project/effectrow.h \
effects/internal/cubetransition.h \ project/effectfield.h \
project/effectgizmo.h \ effects/internal/cubetransition.h \
io/clipboard.h \ project/effectgizmo.h \
dialogs/stabilizerdialog.h \ io/clipboard.h \
io/avtogl.h \ dialogs/stabilizerdialog.h \
ui/resizablescrollbar.h \ io/avtogl.h \
ui/sourceiconview.h \ ui/resizablescrollbar.h \
project/sourcescommon.h \ ui/sourceiconview.h \
ui/keyframenavigator.h \ project/sourcescommon.h \
panels/grapheditor.h \ ui/keyframenavigator.h \
ui/graphview.h \ panels/grapheditor.h \
ui/keyframedrawing.h \ ui/graphview.h \
ui/clickablelabel.h \ ui/keyframedrawing.h \
project/keyframe.h \ ui/clickablelabel.h \
ui/rectangleselect.h \ project/keyframe.h \
dialogs/actionsearch.h \ ui/rectangleselect.h \
ui/embeddedfilechooser.h \ dialogs/actionsearch.h \
effects/internal/fillleftrighteffect.h \ ui/embeddedfilechooser.h \
effects/internal/voideffect.h \ effects/internal/fillleftrighteffect.h \
dialogs/texteditdialog.h \ effects/internal/voideffect.h \
dialogs/debugdialog.h \ dialogs/texteditdialog.h \
ui/renderthread.h \ dialogs/debugdialog.h \
ui/renderfunctions.h \ ui/renderthread.h \
ui/viewerwindow.h \ ui/renderfunctions.h \
project/projectfilter.h \ ui/viewerwindow.h \
effects/internal/frei0reffect.h \ project/projectfilter.h \
project/effectloaders.h \ effects/internal/frei0reffect.h \
io/crossplatformlib.h project/effectloaders.h \
io/crossplatformlib.h \
FORMS += effects/internal/vsthost.h
win32 { FORMS +=
RC_FILE = packaging/windows/resources.rc
LIBS += -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample -lopengl32 -luser32 win32 {
RC_FILE = packaging/windows/resources.rc
SOURCES += effects/internal/vsthostwin.cpp LIBS += -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample -lopengl32 -luser32
HEADERS += effects/internal/vsthostwin.h
} SOURCES +=
HEADERS +=
mac { }
LIBS += -L/usr/local/lib -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample
ICON = packaging/macos/olive.icns mac {
INCLUDEPATH = /usr/local/include LIBS += -L/usr/local/lib -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample
} ICON = packaging/macos/olive.icns
INCLUDEPATH = /usr/local/include
unix:!mac { }
CONFIG += link_pkgconfig
PKGCONFIG += libavutil libavformat libavcodec libavfilter libswscale libswresample unix:!mac {
LIBS += -ldl CONFIG += link_pkgconfig
} PKGCONFIG += libavutil libavformat libavcodec libavfilter libswscale libswresample
LIBS += -ldl
RESOURCES += \ }
icons/icons.qrc
RESOURCES += \
unix:!mac:isEmpty(PREFIX) { icons/icons.qrc
PREFIX = /usr/local
} unix:!mac:isEmpty(PREFIX) {
PREFIX = /usr/local
unix:!mac:target.path = $$PREFIX/bin }
effects.files = $$PWD/effects/*.frag $$PWD/effects/*.xml $$PWD/effects/*.vert unix:!mac:target.path = $$PREFIX/bin
unix:!mac:effects.path = $$PREFIX/share/olive-editor/effects
effects.files = $$PWD/effects/*.frag $$PWD/effects/*.xml $$PWD/effects/*.vert
unix:!mac { unix:!mac:effects.path = $$PREFIX/share/olive-editor/effects
metainfo.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.appdata.xml
metainfo.path = $$PREFIX/share/metainfo unix:!mac {
desktop.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.desktop metainfo.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.appdata.xml
desktop.path = $$PREFIX/share/applications metainfo.path = $$PREFIX/share/metainfo
mime.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.xml desktop.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.desktop
mime.path = $$PREFIX/share/mime/packages desktop.path = $$PREFIX/share/applications
icon16.files = $$PWD/packaging/linux/icons/16x16/org.olivevideoeditor.Olive.png mime.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.xml
icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps mime.path = $$PREFIX/share/mime/packages
icon32.files = $$PWD/packaging/linux/icons/32x32/org.olivevideoeditor.Olive.png icon16.files = $$PWD/packaging/linux/icons/16x16/org.olivevideoeditor.Olive.png
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps
icon48.files = $$PWD/packaging/linux/icons/48x48/org.olivevideoeditor.Olive.png icon32.files = $$PWD/packaging/linux/icons/32x32/org.olivevideoeditor.Olive.png
icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
icon64.files = $$PWD/packaging/linux/icons/64x64/org.olivevideoeditor.Olive.png icon48.files = $$PWD/packaging/linux/icons/48x48/org.olivevideoeditor.Olive.png
icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps
icon128.files = $$PWD/packaging/linux/icons/128x128/org.olivevideoeditor.Olive.png icon64.files = $$PWD/packaging/linux/icons/64x64/org.olivevideoeditor.Olive.png
icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps
icon256.files = $$PWD/packaging/linux/icons/256x256/org.olivevideoeditor.Olive.png icon128.files = $$PWD/packaging/linux/icons/128x128/org.olivevideoeditor.Olive.png
icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps
icon512.files = $$PWD/packaging/linux/icons/512x512/org.olivevideoeditor.Olive.png icon256.files = $$PWD/packaging/linux/icons/256x256/org.olivevideoeditor.Olive.png
icon512.path = $$PREFIX/share/icons/hicolor/512x512/apps icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps
icon1024.files = $$PWD/packaging/linux/icons/1024x1024/org.olivevideoeditor.Olive.png icon512.files = $$PWD/packaging/linux/icons/512x512/org.olivevideoeditor.Olive.png
icon1024.path = $$PREFIX/share/icons/hicolor/1024x1024/apps icon512.path = $$PREFIX/share/icons/hicolor/512x512/apps
INSTALLS += target effects metainfo desktop mime icon16 icon32 icon48 icon64 icon128 icon256 icon512 icon1024 icon1024.files = $$PWD/packaging/linux/icons/1024x1024/org.olivevideoeditor.Olive.png
} icon1024.path = $$PREFIX/share/icons/hicolor/1024x1024/apps
INSTALLS += target effects metainfo desktop mime icon16 icon32 icon48 icon64 icon128 icon256 icon512 icon1024
}
+2 -2
View File
@@ -29,7 +29,7 @@
#include "effects/internal/shakeeffect.h" #include "effects/internal/shakeeffect.h"
#include "effects/internal/cornerpineffect.h" #include "effects/internal/cornerpineffect.h"
#ifdef _WIN32 #ifdef _WIN32
#include "effects/internal/vsthostwin.h" #include "effects/internal/vsthost.h"
#endif #endif
#include "effects/internal/fillleftrighteffect.h" #include "effects/internal/fillleftrighteffect.h"
#include "effects/internal/frei0reffect.h" #include "effects/internal/frei0reffect.h"
@@ -65,7 +65,7 @@ Effect* create_effect(Clip* c, const EffectMeta* em) {
case EFFECT_INTERNAL_CORNERPIN: return new CornerPinEffect(c, em); case EFFECT_INTERNAL_CORNERPIN: return new CornerPinEffect(c, em);
case EFFECT_INTERNAL_FILLLEFTRIGHT: return new FillLeftRightEffect(c, em); case EFFECT_INTERNAL_FILLLEFTRIGHT: return new FillLeftRightEffect(c, em);
#ifdef _WIN32 #ifdef _WIN32
case EFFECT_INTERNAL_VST: return new VSTHostWin(c, em); case EFFECT_INTERNAL_VST: return new VSTHost(c, em);
#endif #endif
#ifndef NOFREI0R #ifndef NOFREI0R
case EFFECT_INTERNAL_FREI0R: return new Frei0rEffect(c, em); case EFFECT_INTERNAL_FREI0R: return new Frei0rEffect(c, em);