# Qt5 Gstreamer Example
## General Instructions
1. Install Qt Gstreamer from the source:
- http://gstreamer.freedesktop.org/modules/qt-gstreamer.html
- Add `-DQT_VERSION=5` compilation flag, as here: http://cgit.freedesktop.org/gstreamer/qt-gstreamer/tree/README#n88
2. Follow the doc here: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/build_system_integration.html to link with libraries like here: http://cgit.freedesktop.org/gstreamer/qt-gstreamer/tree/examples/appsink-src/CMakeLists.txt#n21
3. If needed, copy locally folder with `cmake` modules: http://cgit.freedesktop.org/gstreamer/qt-gstreamer/tree/cmake/modules and add them to `CMakeLists.txt` as exmplained here: https://github.com/rpavlik/cmake-modules with `list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")`
4. Profit: `./soundlink mySong.mp3`
## Qt5 Build Instructions
```
drasko@Lenin:~/qt5/qt5GstreamerExample$ mkdir build
drasko@Lenin:~/qt5/qt5GstreamerExample$ cd build/
drasko@Lenin:~/qt5/qt5GstreamerExample/build$ cmake ..
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost hasn't been found yet. Looking...
-- Boost version: 1.55.0
-- GCC 4.5 or later detected. Enabling C++0x support in QTGSTREAMER_FLAGS.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/drasko/qt5/qt5GstreamerExample/build
drasko@Lenin:~/qt5/qt5GstreamerExample/build$ make -j 8
Scanning dependencies of target soundlink
[100%] Building CXX object CMakeFiles/soundlink.dir/main.cpp.o
Linking CXX executable soundlink
[100%] Built target soundlink
drasko@Lenin:~/qt5/qt5GstreamerExample/build$ ./soundlink ~/audio/BobMarley-Jamming.mp3
```
没有合适的资源?快使用搜索试试~ 我知道了~
qt5GstreamerExample:Qt5 Gstreamer 示例
共18个文件
cmake:12个
in:2个
md:1个
1星 需积分: 50 32 下载量 201 浏览量
2021-06-18
21:02:16
上传
评论 4
收藏 23KB ZIP 举报
温馨提示
Qt5 Gstreamer 示例 一般说明 从源安装 Qt Gstreamer: 添加-DQT_VERSION=5编译标志,如下所示: : -DQT_VERSION=5 按照这里的文档: : 链接到像这里的库: : 如果需要,请使用cmake模块复制本地文件夹: ://cgit.freedesktop.org/gstreamer/qt-gstreamer/tree/cmake/modules 并将它们添加到CMakeLists.txt如下所示: : with list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") 利润: ./soundlink mySong.mp3 Qt5 构建说明 drasko@Lenin:~/qt5/qt5GstreamerExample$ mkdir
资源详情
资源评论
资源推荐
收起资源包目录
qt5GstreamerExample-master.zip (18个子文件)
qt5GstreamerExample-master
README.md 2KB
cmake
modules
FindGObject.cmake 2KB
FindOpenGLES2.cmake 719B
MacroCXXCompilationTest.cmake 5KB
UseDoxygen.cmake 3KB
cmake_uninstall.cmake.in 845B
HandleImportedTargetsInCMakeRequiredLibraries.cmake 4KB
FindGLIB2.cmake 2KB
FindQt4or5.cmake 8KB
COPYING-CMAKE-SCRIPTS 1KB
QtGStreamerConfig.cmake.in 3KB
MacroLogFeature.cmake 6KB
QtGStreamerConfigCommon.cmake 1KB
FindGStreamerPluginsBase.cmake 4KB
FindGStreamer.cmake 5KB
MacroFindGStreamerLibrary.cmake 2KB
main.cpp 4KB
CMakeLists.txt 665B
共 18 条
- 1
hsjdbdb
- 粉丝: 25
- 资源: 4586
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1