VS2013+QT5.7.0_X86_MINGW32编译webcamoid

VS2013+QT5.7.0_X86_MINGW32编译webcamoid

一个优秀的工程,使用了库和plugin机制,工程清晰
提供了预编译的exe,适用了下,基本功能都有,Windows界面有待改进?

1 官方Windows编译 指南

参考 官方
很明显,使用的是mingw的qt工具链,最新版的D:\Qt\Qt5.7.0_x86-mingw530

  • 下载dev和shared版本的ffmpeg 预编译程序
  • dev下有lib和include,share有bin
  • 都弄到一个单独的目录中来,我的是J:\media\XLIVE\windows\webcamoid\ffmpeglibs\

我 是64位的win10,但都选择了使用32位的库和环境,是觉得兼容性好一点?

2 额外的参数,指定FFmepg库路径

QtCreator左边框的“项目” 找到 “构建”,“构建步骤”的qmake点击“详情”,展开填写:
“额外的参数”:

FFMPEGINCLUDES=J:\media\XLIVE\windows\webcamoid\ffmpeglibs\include FFMPEGLIBS=-LJ:\media\XLIVE\windows\webcamoid\ffmpeglibs\lib FFMPEGLIBS+=-lavformat FFMPEGLIBS+=-lavcodec FFMPEGLIBS+=-lswresample FFMPEGLIBS+=-lswscale FFMPEGLIBS+=-lavutil FFMPEGLIBS+=-lavdevice

可以看到,qmake使用这些参数编译:

qmake.exe J:\media\XLIVE\windows\webcamoid\Webcamoid.pro -r -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" FFMPEGINCLUDES=J:\media\XLIVE\windows\webcamoid\ffmpeglibs\include FFMPEGLIBS=-LJ:\media\XLIVE\windows\webcamoid\ffmpeglibs\lib FFMPEGLIBS+=-lavformat FFMPEGLIBS+=-lavcodec FFMPEGLIBS+=-lswresample FFMPEGLIBS+=-lswscale FFMPEGLIBS+=-lavutil FFMPEGLIBS+=-lavdevice

3 经常找不到链接库

使用 添加$$PWD 来解决。

4 运行时传递的命令行参数

-r -q J:\media\XLIVE\windows\webcamoid\libAvKys" -p "J:\media\XLIVE\windows\webcamoid\libAvKys\Plugins"

r 是递归遍历plugin目录
p是插件路径
q 是qml路径
%cd% 是bat脚本的当前目录的意思?

5 exe输出路径

参考 ,可以知道,DESTDIR 这样的字段是给exe或者dll输出路径用的。

6 减少几个plugin,缩短编译时间

修改plugin.pro就可以了
比如我的:

# Webcamoid, webcam capture application.
# Copyright (C) 2011-2016  Gonzalo Exequiel Pedone
#
# Webcamoid is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Webcamoid is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Webcamoid. If not, see <http://www.gnu.org/licenses/>.
#
# Web-Site: http://webcamoid.github.io/

TEMPLATE = subdirs

CONFIG += ordered

win32: SUBDIRS += VirtualCamera/src/dshow/VirtualCameraFilter


###
SUBDIRS_REMOVED = \
    Cartoon \
    ChangeHSL \
    Charify \
    Cinema \
    ColorFilter \
    ColorReplace \
    ColorTap \
    ColorTransform \
    Convolve \
    DelayGrab \
    Denoise \
    DesktopCapture \
    Dice \
    Distort \
    Dizzy \
    Edge \
    Emboss \
    Equalize \
    FaceDetect \
    FalseColor \
    Fire \
    FrameOverlap


SUBDIRS_REMOVED2 = \
    Halftone \
    Hypnotic \
    Implode \
    Invert \
    Life \
    Matrix \
    MatrixTransform \
    Multiplex \
    MultiSink \
    MultiSrc \
    Nervous \
    Normalize \
    OilPaint \
    Photocopy \
    Pixelate \
    PrimariesColors \
    Probe \
    Quark \
    Radioactive \
    Ripple \
    RtPts \
    ScanLines \
    Scroll \
    Shagadelic \
    Swirl \
    Temperature

SUBDIRS += \
    ACapsConvert \
    Aging \
    AudioDevice \
    Bin \
    Blur \
   \
    GrayScale \
    \
    VideoCapture \
    Vignette \
    VirtualCamera \
    Warhol \
    Warp \
    Wave
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付 39.90元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值