7 #ifndef MEDIA_AUDIOONLY
12 class MediaQtAV : public Media {
16 MediaQtAV(QObject *parent = nullptr);
17 #ifndef MEDIA_AUDIOONLY
18 void setRenderer(const QString &name);
19 QWidget *videoWidget();
20 void playSeparateAudioAndVideo(const QString &video, const QString &audio);
23 void setAudioOnly(bool value);
26 Media::State state() const;
28 void play(const QString &file);
35 void setBufferMilliseconds(qint64 value);
36 void setUserAgent(const QString &value);
38 void enqueue(const QString &file);
40 bool hasQueue() const;
42 qint64 position() const;
43 qint64 duration() const;
44 qint64 remainingTime() const;
47 void setVolume(qreal value);
49 bool volumeMuted() const;
50 void setVolumeMuted(bool value);
52 QString errorString() const;
55 void checkAboutToFinish(qint64 position);
56 void onMediaStatusChange(QtAV::MediaStatus status);
57 void onAVError(const QtAV::AVError &e);
60 QtAV::AVPlayer *createPlayer(bool audioOnly);
61 void connectPlayer(QtAV::AVPlayer *player);
62 void setCurrentPlayer(QtAV::AVPlayer *player);
63 void smoothSourceChange(const QString &file, const QString &externalAudio);
65 QtAV::AVPlayer *player1;
66 QtAV::AVPlayer *player2;
67 QtAV::AVPlayer *currentPlayer;
69 QQueue<QString> queue;
70 bool aboutToFinishEmitted = false;
71 QString lastErrorString;
73 #ifndef MEDIA_AUDIOONLY
74 QtAV::VideoRendererId rendererId;
76 bool audioOnly = false;