#ifndef ELEVIDEO_H
#define ELEVIDEO_H

#include "ffplayer.h"
#include <QWidget>

class EleVideo : public QWidget {
    Q_OBJECT
public:
    explicit EleVideo(QString path, QWidget *parent = nullptr);
    ~EleVideo() {if(player!=0) player->quit(); }
    FFPlayer *player = nullptr;
    QImage img;
protected:
    void paintEvent(QPaintEvent *) override;
    void showEvent(QShowEvent *) override;
    void hideEvent(QHideEvent *) override;
};

#endif // ELEVIDEO_H
