编译QtAV工程库

去https://github.com/wang-bin/QtAV下载源代码

去https://sourceforge.net/projects/qtav/files/depends/QtAV-depends-windows-x86%2Bx64.7z/download下载依赖库QtAV-depends-windows-x86+x64.7z

将里面的include目录内容和lib内容分别拷贝到Qt的include和lib目录下

QtAV解压后用Qt Creator打开QtAV.pro

工程名QtAV右键-Run qmake

依次Build libQtAV,libQtAVWidgets,libQMLAV

在build-QtAV-Desktop_Qt_5_5_0_MSVC2013_32bit-Debug\lib_win_x86生成对应QmlAVd.dll,QtAVd1.dll,QtAVWidgetsd1.dll以及lib文件

在build-QtAV-Desktop_Qt_5_5_0_MSVC2013_32bit-Release\lib_win_x86生成对应QmlAV.dll,QtAV1.dll,QtAVWidgets1.dll以及lib文件

开发使用时,头文件使用QtAV-master\src\QtAV文件夹和QtAV-master\widgets\QtAVWidgets文件夹

.pro文件
CONFIG(debug, debug|release):LIBS += -L$$PWD/QtAV/lib -lQtAVd1 -lQtAVWidgetsd1
CONFIG(release, debug|release):LIBS += -L$$PWD/QtAV/lib -lQtAV1 -lQtAVWidgets1

QtAV::GLWidgetRenderer2* renderer = new QtAV::GLWidgetRenderer2;
_player = new QtAV::AVPlayer;
_player->setRenderer(renderer);
_player->play(appDir+"/media/Wildlife.wmv");
gridLayout->addWidget( renderer, 0,0,1,4 );
上一篇:iOS开发一个制作Live Photo的工具


下一篇:CSS a链接的四种状态