aboutsummaryrefslogtreecommitdiff
path: root/visualization/renderer/qmpvisrendercore.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-04-30 01:12:38 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-04-30 01:12:38 +0800
commitbd165c0254b9095bb9e5ea54def56b6404033ebe (patch)
treee6e965ff343c0cd4feea0180dd63522e05085567 /visualization/renderer/qmpvisrendercore.hpp
parent8766f3b12e13d40b65eca23a850f687b0043d022 (diff)
downloadQMidiPlayer-bd165c0254b9095bb9e5ea54def56b6404033ebe.tar.xz
Add visualization renderer.
Add API for getting raw pitch bend values. Fix non-compliant RPN handling. The visualization renderer is still at the "proof-of-concept" stage. It's not very usable (yet).
Diffstat (limited to 'visualization/renderer/qmpvisrendercore.hpp')
-rw-r--r--visualization/renderer/qmpvisrendercore.hpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/visualization/renderer/qmpvisrendercore.hpp b/visualization/renderer/qmpvisrendercore.hpp
new file mode 100644
index 0000000..0c024f1
--- /dev/null
+++ b/visualization/renderer/qmpvisrendercore.hpp
@@ -0,0 +1,44 @@
+#ifndef QMPVISRENDERCORE_HPP
+#define QMPVISRENDERCORE_HPP
+
+#include <cstddef>
+
+#include <QObject>
+#include "qmpcorepublic.hpp"
+
+class qmpPluginAPIStub;
+class CMidiPlayer;
+class qmpSettingsRO;
+
+class QProcess;
+
+class qmpVisRenderCore:public QObject
+{
+ Q_OBJECT
+public:
+ qmpVisRenderCore();
+ void loadVisualizationLibrary();
+ void unloadVisualizationLibrary();
+ void setMIDIFile(const char* url);
+ void startRender();
+
+ qmpSettingsRO* settings(){return msettings;}
+
+private:
+ qmpPluginIntf *vp;
+ qmpFuncBaseIntf *vf;
+ callback_t startcb;
+ void *mp;
+ qmpPluginAPIStub *api;
+ CMidiPlayer *player;
+ qmpSettingsRO *msettings;
+ QProcess *ffmpegproc;
+ typedef qmpPluginIntf*(*GetInterface_func)(qmpPluginAPI*);
+ typedef void(*SwitchMode_func)(void(*frameCallback)(void*,size_t),bool hidewindow);
+
+ friend class qmpPluginAPIStub;
+ static void framefunc(void* px,size_t sz);
+ static qmpVisRenderCore *inst;
+};
+
+#endif // QMPVISRENDERCORE_HPP