diff options
Diffstat (limited to 'DOCS/client_api_examples/qml/mpvrenderer.h')
-rw-r--r-- | DOCS/client_api_examples/qml/mpvrenderer.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/DOCS/client_api_examples/qml/mpvrenderer.h b/DOCS/client_api_examples/qml/mpvrenderer.h new file mode 100644 index 0000000000..d0bedf720b --- /dev/null +++ b/DOCS/client_api_examples/qml/mpvrenderer.h @@ -0,0 +1,33 @@ +#ifndef MPVRENDERER_H_ +#define MPVRENDERER_H_ + +#include <assert.h> + +#include <QtQuick/QQuickFramebufferObject> + +#include "libmpv/client.h" +#include "libmpv/opengl_cb.h" +#include "libmpv/qthelper.hpp" + +class MpvObject : public QQuickFramebufferObject +{ + Q_OBJECT + + mpv_handle *mpv; + mpv_opengl_cb_context *mpv_gl; + +public: + MpvObject(QQuickItem * parent = 0); + virtual ~MpvObject(); + Renderer *createRenderer() const; +public slots: + void loadfile(const QString& filename); +signals: + void onUpdate(); +private slots: + void doUpdate(); +private: + static void on_update(void *ctx); +}; + +#endif |