1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-25 12:50:18 +00:00
mpv/DOCS/client_api_examples/qml/mpvrenderer.h
wm4 543ef1fd2e DOCS/client_api_examples: remove nonsense
I thought setSamples() was some funky abstraction to set the number of
components, but it's actually something else.

Also fix the include paths.
2014-12-09 22:53:34 +01:00

34 lines
608 B
C++

#ifndef MPVRENDERER_H_
#define MPVRENDERER_H_
#include <assert.h>
#include <QtQuick/QQuickFramebufferObject>
#include <mpv/client.h>
#include <mpv/opengl_cb.h>
#include <mpv/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