You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PayloadAPP/Src/Video/ffmpegvideodlg.h

77 lines
1.4 KiB
C++

#ifndef FFMPEGVIDEODLG_H
#define FFMPEGVIDEODLG_H
#include "cffmpeg_decode.h"
#include <QDebug>
#include <QDir>
#include <QImage>
#include <QPaintEvent>
#include <QPainter>
#include <QThread>
#include <QWidget>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavutil/channel_layout.h>
#include <libavutil/common.h>
#include <libavutil/frame.h>
#include <libavutil/imgutils.h>
#include <libavutil/mem.h>
#include <libavutil/opt.h>
#include <libavutil/parseutils.h>
#include <libavutil/samplefmt.h>
#include <libswscale/swscale.h>
#include <libavformat/avformat.h>
}
namespace Ui {
class ffmpegvideoDlg;
}
class ffmpegvideoDlg : public QWidget {
Q_OBJECT
public:
explicit ffmpegvideoDlg(QWidget *parent = nullptr);
~ffmpegvideoDlg();
private:
Ui::ffmpegvideoDlg *ui;
public:
void iniWindow();
void setUrl(QString url);
void setVedioSaveFileDirPath(QString saveDirPath);
void play();
void stop();
bool Isplay(bool IsstopPlay);
bool m_PlayStatus = false;
double m_setVideoAreaWidth;
double m_setVideoAreaHeight;
double m_ax;
double m_ay;
protected:
void paintEvent(QPaintEvent *);
void resizeEvent(QResizeEvent *event);
private slots:
void receiveQImage(const QImage &rImg);
void showMessagBox(int);
signals:
void operate();
private:
Cffmpeg_decode *ffmpeg;
QThread workerThread;
QImage img;
QString videoSaveDirPath;
};
#endif // FFMPEGVIDEODLG_H