aboutsummaryrefslogtreecommitdiff
path: root/visualization/renderer/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'visualization/renderer/main.cpp')
-rw-r--r--visualization/renderer/main.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/visualization/renderer/main.cpp b/visualization/renderer/main.cpp
new file mode 100644
index 0000000..ec4dd1d
--- /dev/null
+++ b/visualization/renderer/main.cpp
@@ -0,0 +1,22 @@
+#include <QProcess>
+#include <QCommandLineParser>
+
+#include "qmpvisrendercore.hpp"
+
+int main(int argc,char **argv)
+{
+ QCoreApplication::setApplicationName("qmpvisrender");
+ QCoreApplication a(argc,argv);
+ QCommandLineParser clp;
+ clp.setApplicationDescription("Renderer a visualization of a midi file.");
+ clp.addHelpOption();
+ clp.parse(a.arguments());
+ qmpVisRenderCore core;
+ core.loadVisualizationLibrary();
+ if(clp.positionalArguments().size())
+ core.setMIDIFile(clp.positionalArguments().front().toStdString().c_str());
+ core.startRender();
+ int retval=a.exec();
+ core.unloadVisualizationLibrary();
+ return retval;
+}