moved vst to cross platform defs (still untested on other platforms
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
#include "vsthostwin.h"
|
||||
#include "vsthost.h"
|
||||
|
||||
// adapted from http://teragonaudio.com/article/How-to-make-your-own-VST-host.html
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QDialog>
|
||||
#include <QMessageBox>
|
||||
@@ -52,20 +50,22 @@ typedef VstInt32 (*processEventsFuncPtr)(VstEvents *events);
|
||||
// Plugin's process() method
|
||||
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);
|
||||
LPCWSTR dll_fn_w = reinterpret_cast<const wchar_t*>(dll_fn.utf16());
|
||||
|
||||
modulePtr = LoadLibrary(dll_fn_w);
|
||||
modulePtr = LibLoad(dll_fn);
|
||||
if(modulePtr == nullptr) {
|
||||
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));
|
||||
if (dll_err == 193) {
|
||||
#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.");
|
||||
#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.");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
QMessageBox::critical(mainWindow, tr("Error loading VST plugin"), msg_err);
|
||||
@@ -73,20 +73,20 @@ void VSTHostWin::loadPlugin() {
|
||||
}
|
||||
|
||||
vstPluginFuncPtr mainEntryPoint =
|
||||
reinterpret_cast<vstPluginFuncPtr>(GetProcAddress(modulePtr, "VSTPluginMain"));
|
||||
reinterpret_cast<vstPluginFuncPtr>(LibAddress(modulePtr, "VSTPluginMain"));
|
||||
// Instantiate the plugin
|
||||
plugin = mainEntryPoint(hostCallback);
|
||||
}
|
||||
|
||||
void VSTHostWin::freePlugin() {
|
||||
void VSTHost::freePlugin() {
|
||||
if (plugin != nullptr) {
|
||||
stopPlugin();
|
||||
FreeLibrary(modulePtr);
|
||||
LibClose(modulePtr);
|
||||
plugin = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
bool VSTHostWin::configurePluginCallbacks() {
|
||||
bool VSTHost::configurePluginCallbacks() {
|
||||
// Check plugin's magic number
|
||||
// If incorrect, then the file either was not loaded properly, is not a
|
||||
// real VST plugin, or is otherwise corrupt.
|
||||
@@ -107,7 +107,7 @@ bool VSTHostWin::configurePluginCallbacks() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void VSTHostWin::startPlugin() {
|
||||
void VSTHost::startPlugin() {
|
||||
dispatcher(plugin, effOpen, 0, 0, nullptr, 0.0f);
|
||||
|
||||
// Set some default properties
|
||||
@@ -117,25 +117,25 @@ void VSTHostWin::startPlugin() {
|
||||
resumePlugin();
|
||||
}
|
||||
|
||||
void VSTHostWin::stopPlugin() {
|
||||
void VSTHost::stopPlugin() {
|
||||
suspendPlugin();
|
||||
|
||||
dispatcher(plugin, effClose, 0, 0, nullptr, 0);
|
||||
}
|
||||
|
||||
void VSTHostWin::resumePlugin() {
|
||||
void VSTHost::resumePlugin() {
|
||||
dispatcher(plugin, effMainsChanged, 0, 1, nullptr, 0.0f);
|
||||
}
|
||||
|
||||
void VSTHostWin::suspendPlugin() {
|
||||
void VSTHost::suspendPlugin() {
|
||||
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);
|
||||
}
|
||||
|
||||
void VSTHostWin::initializeIO() {
|
||||
void VSTHost::initializeIO() {
|
||||
// inputs and outputs are assumed to be float** and are declared elsewhere,
|
||||
// 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).
|
||||
@@ -147,7 +147,7 @@ void VSTHostWin::initializeIO() {
|
||||
}
|
||||
}
|
||||
|
||||
void VSTHostWin::processAudio(long numFrames) {
|
||||
void VSTHost::processAudio(long numFrames) {
|
||||
// Always reset the output array before processing.
|
||||
for (int i=0;i<CHANNEL_COUNT;i++) {
|
||||
memset(outputs[i], 0, BLOCK_SIZE*sizeof(float));
|
||||
@@ -156,7 +156,7 @@ void VSTHostWin::processAudio(long 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;
|
||||
|
||||
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()));
|
||||
}
|
||||
|
||||
VSTHostWin::~VSTHostWin() {
|
||||
VSTHost::~VSTHost() {
|
||||
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) {
|
||||
int interval = BLOCK_SIZE*4;
|
||||
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") {
|
||||
stream.readNext();
|
||||
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);
|
||||
if (plugin != 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);
|
||||
}
|
||||
|
||||
void VSTHostWin::uncheck_show_button() {
|
||||
void VSTHost::uncheck_show_button() {
|
||||
show_interface_btn->setChecked(false);
|
||||
}
|
||||
|
||||
void VSTHostWin::change_plugin() {
|
||||
void VSTHost::change_plugin() {
|
||||
freePlugin();
|
||||
loadPlugin();
|
||||
if (plugin != nullptr) {
|
||||
@@ -258,7 +258,7 @@ void VSTHostWin::change_plugin() {
|
||||
dialog->setFixedWidth(eRect->right);
|
||||
dialog->setFixedHeight(eRect->bottom);
|
||||
} else {
|
||||
FreeLibrary(modulePtr);
|
||||
LibClose(modulePtr);
|
||||
plugin = nullptr;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "project/effect.h"
|
||||
|
||||
#include "io/crossplatformlib.h"
|
||||
|
||||
#include <vst/aeffectx.h>
|
||||
|
||||
// Plugin's dispatcher function
|
||||
@@ -11,11 +13,11 @@ typedef VstIntPtr (*dispatcherFuncPtr)(AEffect *effect, VstInt32 opCode, VstInt3
|
||||
struct AEffect;
|
||||
class QDialog;
|
||||
|
||||
class VSTHostWin : public Effect {
|
||||
class VSTHost : public Effect {
|
||||
Q_OBJECT
|
||||
public:
|
||||
VSTHostWin(Clip* c, const EffectMeta* em);
|
||||
~VSTHostWin();
|
||||
VSTHost(Clip* c, const EffectMeta* em);
|
||||
~VSTHost();
|
||||
void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
|
||||
|
||||
void custom_load(QXmlStreamReader& stream);
|
||||
@@ -43,7 +45,7 @@ private:
|
||||
float** outputs;
|
||||
QDialog* dialog;
|
||||
QPushButton* show_interface_btn;
|
||||
HMODULE modulePtr;
|
||||
ModulePtr modulePtr;
|
||||
};
|
||||
|
||||
#endif // VSTHOSTWIN_H
|
||||
@@ -1,293 +1,295 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2018-05-11T10:31:59
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui multimedia opengl
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
mac {
|
||||
TARGET = Olive
|
||||
}
|
||||
!mac {
|
||||
TARGET = olive-editor
|
||||
}
|
||||
TEMPLATE = app
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# 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.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
# Tries to get the current Git short hash
|
||||
system("which git") {
|
||||
GITHASHVAR = $$system(git --git-dir $$PWD/.git --work-tree $$PWD log -1 --format=%h)
|
||||
DEFINES += GITHASH=\\"\"$$GITHASHVAR\\"\"
|
||||
}
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
panels/project.cpp \
|
||||
panels/effectcontrols.cpp \
|
||||
panels/viewer.cpp \
|
||||
panels/timeline.cpp \
|
||||
ui/sourcetable.cpp \
|
||||
dialogs/aboutdialog.cpp \
|
||||
ui/timelinewidget.cpp \
|
||||
project/media.cpp \
|
||||
project/footage.cpp \
|
||||
project/sequence.cpp \
|
||||
project/clip.cpp \
|
||||
playback/playback.cpp \
|
||||
playback/audio.cpp \
|
||||
io/config.cpp \
|
||||
dialogs/newsequencedialog.cpp \
|
||||
ui/viewerwidget.cpp \
|
||||
ui/viewercontainer.cpp \
|
||||
dialogs/exportdialog.cpp \
|
||||
ui/collapsiblewidget.cpp \
|
||||
panels/panels.cpp \
|
||||
playback/cacher.cpp \
|
||||
io/exportthread.cpp \
|
||||
ui/timelineheader.cpp \
|
||||
io/previewgenerator.cpp \
|
||||
ui/labelslider.cpp \
|
||||
dialogs/preferencesdialog.cpp \
|
||||
ui/audiomonitor.cpp \
|
||||
project/undo.cpp \
|
||||
ui/scrollarea.cpp \
|
||||
ui/comboboxex.cpp \
|
||||
ui/colorbutton.cpp \
|
||||
dialogs/replaceclipmediadialog.cpp \
|
||||
ui/fontcombobox.cpp \
|
||||
ui/checkboxex.cpp \
|
||||
ui/keyframeview.cpp \
|
||||
ui/texteditex.cpp \
|
||||
dialogs/demonotice.cpp \
|
||||
project/marker.cpp \
|
||||
dialogs/speeddialog.cpp \
|
||||
dialogs/mediapropertiesdialog.cpp \
|
||||
io/crc32.cpp \
|
||||
project/projectmodel.cpp \
|
||||
io/loadthread.cpp \
|
||||
dialogs/loaddialog.cpp \
|
||||
debug.cpp \
|
||||
io/path.cpp \
|
||||
effects/internal/linearfadetransition.cpp \
|
||||
effects/internal/transformeffect.cpp \
|
||||
effects/internal/solideffect.cpp \
|
||||
effects/internal/texteffect.cpp \
|
||||
effects/internal/timecodeeffect.cpp \
|
||||
effects/internal/audionoiseeffect.cpp \
|
||||
effects/internal/paneffect.cpp \
|
||||
effects/internal/toneeffect.cpp \
|
||||
effects/internal/volumeeffect.cpp \
|
||||
effects/internal/crossdissolvetransition.cpp \
|
||||
effects/internal/shakeeffect.cpp \
|
||||
effects/internal/exponentialfadetransition.cpp \
|
||||
effects/internal/logarithmicfadetransition.cpp \
|
||||
effects/internal/cornerpineffect.cpp \
|
||||
io/math.cpp \
|
||||
io/qpainterwrapper.cpp \
|
||||
project/effect.cpp \
|
||||
project/transition.cpp \
|
||||
project/effectrow.cpp \
|
||||
project/effectfield.cpp \
|
||||
effects/internal/cubetransition.cpp \
|
||||
project/effectgizmo.cpp \
|
||||
io/clipboard.cpp \
|
||||
dialogs/stabilizerdialog.cpp \
|
||||
io/avtogl.cpp \
|
||||
ui/resizablescrollbar.cpp \
|
||||
ui/sourceiconview.cpp \
|
||||
project/sourcescommon.cpp \
|
||||
ui/keyframenavigator.cpp \
|
||||
panels/grapheditor.cpp \
|
||||
ui/graphview.cpp \
|
||||
ui/keyframedrawing.cpp \
|
||||
ui/clickablelabel.cpp \
|
||||
project/keyframe.cpp \
|
||||
ui/rectangleselect.cpp \
|
||||
dialogs/actionsearch.cpp \
|
||||
ui/embeddedfilechooser.cpp \
|
||||
effects/internal/fillleftrighteffect.cpp \
|
||||
effects/internal/voideffect.cpp \
|
||||
dialogs/texteditdialog.cpp \
|
||||
dialogs/debugdialog.cpp \
|
||||
ui/renderthread.cpp \
|
||||
ui/renderfunctions.cpp \
|
||||
ui/viewerwindow.cpp \
|
||||
project/projectfilter.cpp \
|
||||
effects/internal/frei0reffect.cpp \
|
||||
project/effectloaders.cpp \
|
||||
io/crossplatformlib.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
panels/project.h \
|
||||
panels/effectcontrols.h \
|
||||
panels/viewer.h \
|
||||
panels/timeline.h \
|
||||
ui/sourcetable.h \
|
||||
dialogs/aboutdialog.h \
|
||||
ui/timelinewidget.h \
|
||||
project/media.h \
|
||||
project/footage.h \
|
||||
project/sequence.h \
|
||||
project/clip.h \
|
||||
playback/playback.h \
|
||||
playback/audio.h \
|
||||
io/config.h \
|
||||
dialogs/newsequencedialog.h \
|
||||
ui/viewerwidget.h \
|
||||
ui/viewercontainer.h \
|
||||
dialogs/exportdialog.h \
|
||||
ui/collapsiblewidget.h \
|
||||
panels/panels.h \
|
||||
playback/cacher.h \
|
||||
io/exportthread.h \
|
||||
ui/timelinetools.h \
|
||||
ui/timelineheader.h \
|
||||
io/previewgenerator.h \
|
||||
ui/labelslider.h \
|
||||
dialogs/preferencesdialog.h \
|
||||
ui/audiomonitor.h \
|
||||
project/undo.h \
|
||||
ui/scrollarea.h \
|
||||
ui/comboboxex.h \
|
||||
ui/colorbutton.h \
|
||||
dialogs/replaceclipmediadialog.h \
|
||||
ui/fontcombobox.h \
|
||||
ui/checkboxex.h \
|
||||
ui/keyframeview.h \
|
||||
ui/texteditex.h \
|
||||
dialogs/demonotice.h \
|
||||
project/marker.h \
|
||||
project/selection.h \
|
||||
dialogs/speeddialog.h \
|
||||
dialogs/mediapropertiesdialog.h \
|
||||
io/crc32.h \
|
||||
project/projectmodel.h \
|
||||
io/loadthread.h \
|
||||
dialogs/loaddialog.h \
|
||||
debug.h \
|
||||
io/path.h \
|
||||
effects/internal/transformeffect.h \
|
||||
effects/internal/solideffect.h \
|
||||
effects/internal/texteffect.h \
|
||||
effects/internal/timecodeeffect.h \
|
||||
effects/internal/audionoiseeffect.h \
|
||||
effects/internal/paneffect.h \
|
||||
effects/internal/toneeffect.h \
|
||||
effects/internal/volumeeffect.h \
|
||||
effects/internal/shakeeffect.h \
|
||||
effects/internal/linearfadetransition.h \
|
||||
effects/internal/crossdissolvetransition.h \
|
||||
effects/internal/exponentialfadetransition.h \
|
||||
effects/internal/logarithmicfadetransition.h \
|
||||
effects/internal/cornerpineffect.h \
|
||||
io/math.h \
|
||||
io/qpainterwrapper.h \
|
||||
project/effect.h \
|
||||
project/transition.h \
|
||||
project/effectrow.h \
|
||||
project/effectfield.h \
|
||||
effects/internal/cubetransition.h \
|
||||
project/effectgizmo.h \
|
||||
io/clipboard.h \
|
||||
dialogs/stabilizerdialog.h \
|
||||
io/avtogl.h \
|
||||
ui/resizablescrollbar.h \
|
||||
ui/sourceiconview.h \
|
||||
project/sourcescommon.h \
|
||||
ui/keyframenavigator.h \
|
||||
panels/grapheditor.h \
|
||||
ui/graphview.h \
|
||||
ui/keyframedrawing.h \
|
||||
ui/clickablelabel.h \
|
||||
project/keyframe.h \
|
||||
ui/rectangleselect.h \
|
||||
dialogs/actionsearch.h \
|
||||
ui/embeddedfilechooser.h \
|
||||
effects/internal/fillleftrighteffect.h \
|
||||
effects/internal/voideffect.h \
|
||||
dialogs/texteditdialog.h \
|
||||
dialogs/debugdialog.h \
|
||||
ui/renderthread.h \
|
||||
ui/renderfunctions.h \
|
||||
ui/viewerwindow.h \
|
||||
project/projectfilter.h \
|
||||
effects/internal/frei0reffect.h \
|
||||
project/effectloaders.h \
|
||||
io/crossplatformlib.h
|
||||
|
||||
FORMS +=
|
||||
|
||||
win32 {
|
||||
RC_FILE = packaging/windows/resources.rc
|
||||
LIBS += -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample -lopengl32 -luser32
|
||||
|
||||
SOURCES += effects/internal/vsthostwin.cpp
|
||||
HEADERS += effects/internal/vsthostwin.h
|
||||
}
|
||||
|
||||
mac {
|
||||
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
|
||||
LIBS += -ldl
|
||||
}
|
||||
|
||||
RESOURCES += \
|
||||
icons/icons.qrc
|
||||
|
||||
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:effects.path = $$PREFIX/share/olive-editor/effects
|
||||
|
||||
unix:!mac {
|
||||
metainfo.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.appdata.xml
|
||||
metainfo.path = $$PREFIX/share/metainfo
|
||||
desktop.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.desktop
|
||||
desktop.path = $$PREFIX/share/applications
|
||||
mime.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.xml
|
||||
mime.path = $$PREFIX/share/mime/packages
|
||||
icon16.files = $$PWD/packaging/linux/icons/16x16/org.olivevideoeditor.Olive.png
|
||||
icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps
|
||||
icon32.files = $$PWD/packaging/linux/icons/32x32/org.olivevideoeditor.Olive.png
|
||||
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
|
||||
icon48.files = $$PWD/packaging/linux/icons/48x48/org.olivevideoeditor.Olive.png
|
||||
icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps
|
||||
icon64.files = $$PWD/packaging/linux/icons/64x64/org.olivevideoeditor.Olive.png
|
||||
icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps
|
||||
icon128.files = $$PWD/packaging/linux/icons/128x128/org.olivevideoeditor.Olive.png
|
||||
icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps
|
||||
icon256.files = $$PWD/packaging/linux/icons/256x256/org.olivevideoeditor.Olive.png
|
||||
icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps
|
||||
icon512.files = $$PWD/packaging/linux/icons/512x512/org.olivevideoeditor.Olive.png
|
||||
icon512.path = $$PREFIX/share/icons/hicolor/512x512/apps
|
||||
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
|
||||
}
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2018-05-11T10:31:59
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui multimedia opengl
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
mac {
|
||||
TARGET = Olive
|
||||
}
|
||||
!mac {
|
||||
TARGET = olive-editor
|
||||
}
|
||||
TEMPLATE = app
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# 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.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
# Tries to get the current Git short hash
|
||||
system("which git") {
|
||||
GITHASHVAR = $$system(git --git-dir $$PWD/.git --work-tree $$PWD log -1 --format=%h)
|
||||
DEFINES += GITHASH=\\"\"$$GITHASHVAR\\"\"
|
||||
}
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
panels/project.cpp \
|
||||
panels/effectcontrols.cpp \
|
||||
panels/viewer.cpp \
|
||||
panels/timeline.cpp \
|
||||
ui/sourcetable.cpp \
|
||||
dialogs/aboutdialog.cpp \
|
||||
ui/timelinewidget.cpp \
|
||||
project/media.cpp \
|
||||
project/footage.cpp \
|
||||
project/sequence.cpp \
|
||||
project/clip.cpp \
|
||||
playback/playback.cpp \
|
||||
playback/audio.cpp \
|
||||
io/config.cpp \
|
||||
dialogs/newsequencedialog.cpp \
|
||||
ui/viewerwidget.cpp \
|
||||
ui/viewercontainer.cpp \
|
||||
dialogs/exportdialog.cpp \
|
||||
ui/collapsiblewidget.cpp \
|
||||
panels/panels.cpp \
|
||||
playback/cacher.cpp \
|
||||
io/exportthread.cpp \
|
||||
ui/timelineheader.cpp \
|
||||
io/previewgenerator.cpp \
|
||||
ui/labelslider.cpp \
|
||||
dialogs/preferencesdialog.cpp \
|
||||
ui/audiomonitor.cpp \
|
||||
project/undo.cpp \
|
||||
ui/scrollarea.cpp \
|
||||
ui/comboboxex.cpp \
|
||||
ui/colorbutton.cpp \
|
||||
dialogs/replaceclipmediadialog.cpp \
|
||||
ui/fontcombobox.cpp \
|
||||
ui/checkboxex.cpp \
|
||||
ui/keyframeview.cpp \
|
||||
ui/texteditex.cpp \
|
||||
dialogs/demonotice.cpp \
|
||||
project/marker.cpp \
|
||||
dialogs/speeddialog.cpp \
|
||||
dialogs/mediapropertiesdialog.cpp \
|
||||
io/crc32.cpp \
|
||||
project/projectmodel.cpp \
|
||||
io/loadthread.cpp \
|
||||
dialogs/loaddialog.cpp \
|
||||
debug.cpp \
|
||||
io/path.cpp \
|
||||
effects/internal/linearfadetransition.cpp \
|
||||
effects/internal/transformeffect.cpp \
|
||||
effects/internal/solideffect.cpp \
|
||||
effects/internal/texteffect.cpp \
|
||||
effects/internal/timecodeeffect.cpp \
|
||||
effects/internal/audionoiseeffect.cpp \
|
||||
effects/internal/paneffect.cpp \
|
||||
effects/internal/toneeffect.cpp \
|
||||
effects/internal/volumeeffect.cpp \
|
||||
effects/internal/crossdissolvetransition.cpp \
|
||||
effects/internal/shakeeffect.cpp \
|
||||
effects/internal/exponentialfadetransition.cpp \
|
||||
effects/internal/logarithmicfadetransition.cpp \
|
||||
effects/internal/cornerpineffect.cpp \
|
||||
io/math.cpp \
|
||||
io/qpainterwrapper.cpp \
|
||||
project/effect.cpp \
|
||||
project/transition.cpp \
|
||||
project/effectrow.cpp \
|
||||
project/effectfield.cpp \
|
||||
effects/internal/cubetransition.cpp \
|
||||
project/effectgizmo.cpp \
|
||||
io/clipboard.cpp \
|
||||
dialogs/stabilizerdialog.cpp \
|
||||
io/avtogl.cpp \
|
||||
ui/resizablescrollbar.cpp \
|
||||
ui/sourceiconview.cpp \
|
||||
project/sourcescommon.cpp \
|
||||
ui/keyframenavigator.cpp \
|
||||
panels/grapheditor.cpp \
|
||||
ui/graphview.cpp \
|
||||
ui/keyframedrawing.cpp \
|
||||
ui/clickablelabel.cpp \
|
||||
project/keyframe.cpp \
|
||||
ui/rectangleselect.cpp \
|
||||
dialogs/actionsearch.cpp \
|
||||
ui/embeddedfilechooser.cpp \
|
||||
effects/internal/fillleftrighteffect.cpp \
|
||||
effects/internal/voideffect.cpp \
|
||||
dialogs/texteditdialog.cpp \
|
||||
dialogs/debugdialog.cpp \
|
||||
ui/renderthread.cpp \
|
||||
ui/renderfunctions.cpp \
|
||||
ui/viewerwindow.cpp \
|
||||
project/projectfilter.cpp \
|
||||
effects/internal/frei0reffect.cpp \
|
||||
project/effectloaders.cpp \
|
||||
io/crossplatformlib.cpp \
|
||||
effects/internal/vsthost.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
panels/project.h \
|
||||
panels/effectcontrols.h \
|
||||
panels/viewer.h \
|
||||
panels/timeline.h \
|
||||
ui/sourcetable.h \
|
||||
dialogs/aboutdialog.h \
|
||||
ui/timelinewidget.h \
|
||||
project/media.h \
|
||||
project/footage.h \
|
||||
project/sequence.h \
|
||||
project/clip.h \
|
||||
playback/playback.h \
|
||||
playback/audio.h \
|
||||
io/config.h \
|
||||
dialogs/newsequencedialog.h \
|
||||
ui/viewerwidget.h \
|
||||
ui/viewercontainer.h \
|
||||
dialogs/exportdialog.h \
|
||||
ui/collapsiblewidget.h \
|
||||
panels/panels.h \
|
||||
playback/cacher.h \
|
||||
io/exportthread.h \
|
||||
ui/timelinetools.h \
|
||||
ui/timelineheader.h \
|
||||
io/previewgenerator.h \
|
||||
ui/labelslider.h \
|
||||
dialogs/preferencesdialog.h \
|
||||
ui/audiomonitor.h \
|
||||
project/undo.h \
|
||||
ui/scrollarea.h \
|
||||
ui/comboboxex.h \
|
||||
ui/colorbutton.h \
|
||||
dialogs/replaceclipmediadialog.h \
|
||||
ui/fontcombobox.h \
|
||||
ui/checkboxex.h \
|
||||
ui/keyframeview.h \
|
||||
ui/texteditex.h \
|
||||
dialogs/demonotice.h \
|
||||
project/marker.h \
|
||||
project/selection.h \
|
||||
dialogs/speeddialog.h \
|
||||
dialogs/mediapropertiesdialog.h \
|
||||
io/crc32.h \
|
||||
project/projectmodel.h \
|
||||
io/loadthread.h \
|
||||
dialogs/loaddialog.h \
|
||||
debug.h \
|
||||
io/path.h \
|
||||
effects/internal/transformeffect.h \
|
||||
effects/internal/solideffect.h \
|
||||
effects/internal/texteffect.h \
|
||||
effects/internal/timecodeeffect.h \
|
||||
effects/internal/audionoiseeffect.h \
|
||||
effects/internal/paneffect.h \
|
||||
effects/internal/toneeffect.h \
|
||||
effects/internal/volumeeffect.h \
|
||||
effects/internal/shakeeffect.h \
|
||||
effects/internal/linearfadetransition.h \
|
||||
effects/internal/crossdissolvetransition.h \
|
||||
effects/internal/exponentialfadetransition.h \
|
||||
effects/internal/logarithmicfadetransition.h \
|
||||
effects/internal/cornerpineffect.h \
|
||||
io/math.h \
|
||||
io/qpainterwrapper.h \
|
||||
project/effect.h \
|
||||
project/transition.h \
|
||||
project/effectrow.h \
|
||||
project/effectfield.h \
|
||||
effects/internal/cubetransition.h \
|
||||
project/effectgizmo.h \
|
||||
io/clipboard.h \
|
||||
dialogs/stabilizerdialog.h \
|
||||
io/avtogl.h \
|
||||
ui/resizablescrollbar.h \
|
||||
ui/sourceiconview.h \
|
||||
project/sourcescommon.h \
|
||||
ui/keyframenavigator.h \
|
||||
panels/grapheditor.h \
|
||||
ui/graphview.h \
|
||||
ui/keyframedrawing.h \
|
||||
ui/clickablelabel.h \
|
||||
project/keyframe.h \
|
||||
ui/rectangleselect.h \
|
||||
dialogs/actionsearch.h \
|
||||
ui/embeddedfilechooser.h \
|
||||
effects/internal/fillleftrighteffect.h \
|
||||
effects/internal/voideffect.h \
|
||||
dialogs/texteditdialog.h \
|
||||
dialogs/debugdialog.h \
|
||||
ui/renderthread.h \
|
||||
ui/renderfunctions.h \
|
||||
ui/viewerwindow.h \
|
||||
project/projectfilter.h \
|
||||
effects/internal/frei0reffect.h \
|
||||
project/effectloaders.h \
|
||||
io/crossplatformlib.h \
|
||||
effects/internal/vsthost.h
|
||||
|
||||
FORMS +=
|
||||
|
||||
win32 {
|
||||
RC_FILE = packaging/windows/resources.rc
|
||||
LIBS += -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample -lopengl32 -luser32
|
||||
|
||||
SOURCES +=
|
||||
HEADERS +=
|
||||
}
|
||||
|
||||
mac {
|
||||
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
|
||||
LIBS += -ldl
|
||||
}
|
||||
|
||||
RESOURCES += \
|
||||
icons/icons.qrc
|
||||
|
||||
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:effects.path = $$PREFIX/share/olive-editor/effects
|
||||
|
||||
unix:!mac {
|
||||
metainfo.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.appdata.xml
|
||||
metainfo.path = $$PREFIX/share/metainfo
|
||||
desktop.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.desktop
|
||||
desktop.path = $$PREFIX/share/applications
|
||||
mime.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.xml
|
||||
mime.path = $$PREFIX/share/mime/packages
|
||||
icon16.files = $$PWD/packaging/linux/icons/16x16/org.olivevideoeditor.Olive.png
|
||||
icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps
|
||||
icon32.files = $$PWD/packaging/linux/icons/32x32/org.olivevideoeditor.Olive.png
|
||||
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
|
||||
icon48.files = $$PWD/packaging/linux/icons/48x48/org.olivevideoeditor.Olive.png
|
||||
icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps
|
||||
icon64.files = $$PWD/packaging/linux/icons/64x64/org.olivevideoeditor.Olive.png
|
||||
icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps
|
||||
icon128.files = $$PWD/packaging/linux/icons/128x128/org.olivevideoeditor.Olive.png
|
||||
icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps
|
||||
icon256.files = $$PWD/packaging/linux/icons/256x256/org.olivevideoeditor.Olive.png
|
||||
icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps
|
||||
icon512.files = $$PWD/packaging/linux/icons/512x512/org.olivevideoeditor.Olive.png
|
||||
icon512.path = $$PREFIX/share/icons/hicolor/512x512/apps
|
||||
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
@@ -29,7 +29,7 @@
|
||||
#include "effects/internal/shakeeffect.h"
|
||||
#include "effects/internal/cornerpineffect.h"
|
||||
#ifdef _WIN32
|
||||
#include "effects/internal/vsthostwin.h"
|
||||
#include "effects/internal/vsthost.h"
|
||||
#endif
|
||||
#include "effects/internal/fillleftrighteffect.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_FILLLEFTRIGHT: return new FillLeftRightEffect(c, em);
|
||||
#ifdef _WIN32
|
||||
case EFFECT_INTERNAL_VST: return new VSTHostWin(c, em);
|
||||
case EFFECT_INTERNAL_VST: return new VSTHost(c, em);
|
||||
#endif
|
||||
#ifndef NOFREI0R
|
||||
case EFFECT_INTERNAL_FREI0R: return new Frei0rEffect(c, em);
|
||||
|
||||
Reference in New Issue
Block a user