blob: d0bedf720b2d036f8828c9717838cf20589d5420 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
|