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);
29 void relativeSeek(qint64 ms);
31 void setBufferMilliseconds(qint64 value);
32 void setUserAgent(const QString &value);
33 void enqueue(const QString &file);
35 bool hasQueue() const;
36 qint64 position() const;
37 qint64 duration() const;
38 qint64 remainingTime() const;
40 void setVolume(qreal value);
41 bool volumeMuted() const;
42 void setVolumeMuted(bool value);
43 QString errorString() const;
47 void checkAboutToFinish(qint64 position);
53 void handleMpvEvent(mpv_event *event);
54 void sendCommand(const char *args[]);
55 void setState(Media::State value);
56 void clearTrackState();
60 Media::State currentState = Media::StoppedState;
61 bool aboutToFinishEmitted = false;
62 QString lastErrorString;
64 QString audioFileToAdd;