qt_demoe/video/playffmpeg/ffmpeg/ffmpeghead.h

47 lines
1.4 KiB
C
Raw Normal View History

2020-08-27 07:38:19 +00:00
#ifndef FFMPEGHEAD_H
#define FFMPEGHEAD_H
//必须加以下内容,否则编译不能通过,为了兼容C和C99标准
2020-04-22 06:36:41 +00:00
#ifndef INT64_C
#define INT64_C
#define UINT64_C
#endif
//引入ffmpeg头文件
extern "C" {
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "libavutil/frame.h"
#include "libavutil/pixdesc.h"
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/ffversion.h"
#include "libavcodec/avcodec.h"
#include "libswscale/swscale.h"
2020-08-27 07:38:19 +00:00
#include "libswresample/swresample.h"
2020-04-22 06:36:41 +00:00
#include "libavformat/avformat.h"
#include "libavfilter/avfilter.h"
#ifdef ffmpegdevice
#include "libavdevice/avdevice.h"
#endif
#ifndef gcc45
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_qsv.h"
#endif
}
2020-08-27 07:38:19 +00:00
#include "qdatetime.h"
#pragma execution_character_set("utf-8")
#define TIMEMS qPrintable(QTime::currentTime().toString("HH:mm:ss zzz"))
#define TIME qPrintable(QTime::currentTime().toString("HH:mm:ss"))
#define QDATE qPrintable(QDate::currentDate().toString("yyyy-MM-dd"))
#define QTIME qPrintable(QTime::currentTime().toString("HH-mm-ss"))
#define DATETIME qPrintable(QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"))
#define STRDATETIME qPrintable(QDateTime::currentDateTime().toString("yyyy-MM-dd-HH-mm-ss"))
#define STRDATETIMEMS qPrintable(QDateTime::currentDateTime().toString("yyyy-MM-dd-HH-mm-ss-zzz"))
#endif // FFMPEGHEAD_H