7 #include <mpv/client.h>
9 class MediaMPV : public Media {
13 MediaMPV(QObject *parent = nullptr);
15 void setAudioOnly(bool value);
16 #ifndef MEDIA_AUDIOONLY
17 void setRenderer(const QString &name);
18 QWidget *videoWidget();
19 void playSeparateAudioAndVideo(const QString &video, const QString &audio);
23 Media::State state() const;
24 void play(const QString &file);
30 void setBufferMilliseconds(qint64 value);
31 void setUserAgent(const QString &value);
32 void enqueue(const QString &file);
34 bool hasQueue() const;
35 qint64 position() const;
36 qint64 duration() const;
37 qint64 remainingTime() const;
39 void setVolume(qreal value);
40 bool volumeMuted() const;
41 void setVolumeMuted(bool value);
42 QString errorString() const;
46 void checkAboutToFinish(qint64 position);
52 void handleMpvEvent(mpv_event *event);
53 void sendCommand(const char *args[]);
54 void setState(Media::State value);
55 void clearTrackState();
59 Media::State currentState = Media::StoppedState;
60 bool aboutToFinishEmitted = false;
61 QString lastErrorString;