#ifndef EMOVIEATTR_H
#define EMOVIEATTR_H

#include "eattr.h"
#include "emovie.h"
#include "QProcess"
#include "LoUIClass/loemptydialog.h"
namespace Ui {
class eMovieAttr;
}

class eMovieAttr : public eAttr
{
    Q_OBJECT
public:
    explicit eMovieAttr(const eMovie::Data &data, QWidget *parent = nullptr);
    ~eMovieAttr();

signals:
    void sResChanged(const QString &,const QString &);
    void sAttrChanged(const eMovie::Data &);
    void sigSetTipTextContent(QString);
public slots:
    void onSelectFile();
    void onAttrChanged();
    void continueConvert(int,QProcess::ExitStatus);
    void outputCommand();
    void slotShowYuv_liuyi(uchar *ptr,uint width,uint height); //显示一帧Yuv图像

private:
    Ui::eMovieAttr *ui;
    QString ConvertVideoFormat(QString strFile);
    QString ConvertVideoFormatByFFmpeg(QString strFile);
    double GetVideoTimeRawSpan(QString strFilePathName);
    QStringList getArguments(QString filepath,QString output);
     QProcess *process=nullptr;
     LoEmptyDialog *m_pProgressConvertVideo;
     QString getFileMd5(QString filePath);
     int m_videoTimeLong=15;
     QString m_strOldSuiCaiFile="";
     QString m_strOldSuiCaiPath="";

   //  VideoPlayer *mPlayer=nullptr; /**播放线程**/
   //  glyuvwidget *myopenGLWidget=nullptr;

};

#endif // EMOVIEATTR_H
