改进vlcdemo+ffmpegdemo自动识别32 64位

This commit is contained in:
feiyangqingyun
2020-06-20 13:20:52 +08:00
parent 3ea100dc59
commit 7276827067
4 changed files with 23 additions and 17 deletions

View File

@@ -2,6 +2,9 @@ HEADERS += $$PWD/ffmpeghead.h
HEADERS += $$PWD/ffmpeg.h
SOURCES += $$PWD/ffmpeg.cpp
#如果用的是ffmpeg4内核请将ffmpeg3改成ffmpeg4,两种内核不兼容,头文件也不一样
DEFINES += ffmpeg3
#ffmpeg4则使用ffmpeg4的目录
contains(DEFINES, ffmpeg4) {
strPath = ffmpeg4
@@ -9,17 +12,23 @@ strPath = ffmpeg4
strPath = ffmpeg3
}
#32位的库则使用32位的库的头文件和lib文
contains(DEFINES, qt32) {
strLib = winlib
strInclude = include
} else {
#表示64位的构建套
contains(QT_ARCH, x86_64) {
strLib = winlib64
strInclude = include64
} else {
#由于Qt4不支持QT_ARCH所以会执行下面的
#如果用的64位的Qt4则需要自行修改
strLib = winlib
strInclude = include
}
#表示arm平台构建套件
contains(QT_ARCH, arm) {
strInclude = include
}
INCLUDEPATH += $$PWD/$$strPath/$$strInclude
INCLUDEPATH += $$PWD/$$strPath/$$strInclude/plugins
win32 {
LIBS += -L$$PWD/$$strPath/$$strLib/ -lavcodec -lavfilter -lavformat -lswscale -lavutil -lswresample -lavdevice