参考资料:
依赖项:http://www.cnblogs.com/oloroso/p/4595136.html
Aclocal版本重新校正:https://github.com/threatstack/libmagic/issues/3
临时卸载QT5:https://forum.videolan.org/viewtopic.php?t=124188&start=20
源码下载
-
1
2
3
4
5pgp@r00t:~/github/vlc-2.2.6$ ls
ABOUT-NLS autotools ChangeLog configure COPYING extras lib Makefile.am NEWS share THANKS
aclocal.m4 bin compat configure.ac COPYING.LIB include m4 Makefile.in po src
AUTHORS bootstrap config.h.in contrib doc INSTALL make-alias modules README test
pgp@r00t:~/github/vlc-2.2.6$ 首先查看源码的INSTALL文件了解如何编译源码,如果没有configure文件则需要先运行bootstrap脚本来生成它。
编译源码
之后运行
./configure
即可配置,此过程可能会遇到很多检查不通过,而且会不断地运行该命令来检查是否配置正确。因此先参考链接来解决一些依赖性问题。对于ubuntu可在终端直接键入sudo apt-get build-dep vlc
。对于问题“configure: error: “You cannot build VLC with Qt-5.5.0. You need to backport I78ef29975181ee22429c9bd4b11d96d9e68b7a9c””网络上给出的解决方案是暂时移除Qt5相关库,在编译通过后以后若需要则再安装回来即可。键入
sudo apt remove qt5-default qt5-qmake qtbase5-dev qtbase5-dev-tools libqt5opengl5-dev libqt5x11extras5-dev
,之后继续./configure
。当遇到如下提示则表明可进行编译了。
1 | libvlc configuration |
- 编译完成
1 | pgp@r00t:~/github/vlc-2.2.6$ ls |
总结
搭建VLC编译环境的主要目的还是为了学习一下其内部某些库对于音视频流标准的解析和构建算法。