1.源碼下載,參考vlc-qt源碼目錄裏面有README.md和BUILDING.md
git clone git://github.com/vlc-qt/vlc-qt.git
git submodule init
git submodule update
2.編譯源碼,BUILDING.md裏面找到linux編譯源碼流程
### Linux
Install requirements from your distribution's repository.
Supported generators are `make` and `ninja`.
Make example:
```
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/libvlc-qt #(vlc-qt的安裝目錄,這句是筆者加的)
$ make -j8
$ make install
```
3.下載qt-vlc運行demo
git clone https://github.com/vlc-qt/examples.git
4.編譯vlc-qt/examples
1.刪除多餘文件
使用cmake, rm simple-player.pro src/src.pro
If you want to use CMake, you can delete
simple-player.pro
src/src.pro
使用qmake, rm CMakeLists.txt cmake/* src/CMakeLists.txt -rf
If you want to use qmake, you can delete
CMakeLists.txt
cmake/*
src/CMakeLists.txt
2.配置pro文件
# Edit below for custom library location
LIBS += -L/usr/local/libvlc-qt/lib -lVLCQtCore -lVLCQtWidgets
INCLUDEPATH += /usr/local/libvlc-qt/include
5.運行效果如下: