#ifndef MPV_H #ifdef USE_MPV #define MPV_H #include #include #include "videoplayer.h" class Mpv : public VideoPlayer { Q_OBJECT public: explicit Mpv(Library &library, const BaseConfig& baseConfig, QObject* parent = 0); ~Mpv(); signals: public slots: // VideoPlayer interface public: virtual void stop(); virtual void backwards(const int seconds); virtual void forwards(const int seconds); virtual float incrementVolume(); virtual float decrementVolume(); protected: virtual bool playFileImpl(QString filepath, const TvShowPlayerSettings &settings); virtual void pauseImpl(); virtual void unPauseImpl(); virtual void getExactProgress(); signals: void mpv_events(); private slots: void resetMpv(); void on_mpv_events(); private: mpv_handle* handle; bool simpleCommand2(const char* commandName, const char* commandValue); void handle_mpv_event(mpv_event *event); static bool checkError(int errorCode); }; #endif // USE_MPV #endif // MPV_H