diff options
Diffstat (limited to 'libmpv/qml_direct/main.h')
-rw-r--r-- | libmpv/qml_direct/main.h | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/libmpv/qml_direct/main.h b/libmpv/qml_direct/main.h deleted file mode 100644 index e73af34..0000000 --- a/libmpv/qml_direct/main.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef MPVRENDERER_H_ -#define MPVRENDERER_H_ - -#include <QtQuick/QQuickItem> - -#include <mpv/client.h> -#include <mpv/opengl_cb.h> -#include "../common/qthelper.hpp" - -class MpvRenderer : public QObject -{ - Q_OBJECT - mpv::qt::Handle mpv; - mpv_opengl_cb_context *mpv_gl; - QQuickWindow *window; - QSize size; - - friend class MpvObject; -public: - MpvRenderer(mpv::qt::Handle a_mpv, mpv_opengl_cb_context *a_mpv_gl); - virtual ~MpvRenderer(); -public slots: - void paint(); -}; - -class MpvObject : public QQuickItem -{ - Q_OBJECT - - mpv::qt::Handle mpv; - mpv_opengl_cb_context *mpv_gl; - MpvRenderer *renderer; - bool killOnce; - -public: - MpvObject(QQuickItem * parent = 0); - virtual ~MpvObject(); -public slots: - void command(const QVariant& params); - void sync(); - void swapped(); - void cleanup(); - void reinitRenderer(); -signals: - void onUpdate(); -private slots: - void doUpdate(); - void handleWindowChanged(QQuickWindow *win); -private: - static void on_update(void *ctx); -}; - -#endif |