Qt5.7.1支持gstreamer1.0

本文详细介绍了如何在Qt5.7.1中配置并使用GStreamer1.0,包括安装依赖、配置环境、编译Qt多媒体模块等步骤。此外还提供了QtCreator的设置指南及测试示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Qt5.7.1支持gstreamer1.0
为了能让qmultimedia使用gstreamer1.0,真的是煞费苦心,各种心酸苦辣,宝宝心里苦,可是宝宝不说。现在终于实现了,感觉好开心。ps,看老外网站说,5.8版本(beta)已经默认支持了gstreamer1.0,不过没测试。(balabala)

1.进入解压目录(enter decompression path)


执行下列语句(excute)
cd /opt/qt-everywhere-opensource-src-5.7.1/qtbase/
2.下载依赖(download the build dependencies):
 
$ sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev
 
$ sudo apt-get install libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev  
 
$ sudo apt-get install gstreamer1.0*
 
$ sudo apt-get install libgstreamer1.0*
 
$ sudo apt-get install libxcb-xinerama0-dev

3.configure
执行下列语句(excute)
./configure -gstreamer 1.0 

然后你就会看见gstreamer 1.0 yes,哈哈哈哈(congratulations,then you can see the gstreamer 1.0 yes)
4.make
执行下列语句(excute)
make -j 4 && sudo make isntall
5.坐等(hold on)
6.安装qtcreator4.2(install qtcreator4.2 form qt website)
刚开始以为,opensource会自带qtcreator,但是找啊找,都找遍了还是没找到,才知道,qtcreator是分开安装的。(at first ,I don't know qtcreator need to be install separately)

7.安装qtmultimedia和其他一些模块(install qtmultimedia) and others models

cd cd /opt/qt-everywhere-opensource-src-5.7.1/然后执行下边语句

for MODULE in qtimageformats qtsvg  qtscript qtxmlpatterns qtdeclarative qtsensors qt3d qtgraphicaleffects  qtlocation qtmultimedia; do  cd $MODULE;  /usr/local/Qt-5.7.1/bin/qmake .;  make -j4;  sudo make install;  cd ..; done
注意的是qmake的位置,因为我在安装qt5.7时候没有自己指定安装路径,所以默认路径是/usr/local/Qt-5.7.1/bin/qmake,如果你的不是,请自己更改
8.运行qtcreator(open qtcretor(ide))
随便新建一个项目(new a project)

在左边Projects点击,(click the left Projects)


点击manage kits(click the manage kits)


点击qtversion,点击auto-detected,(click qtversion then click the auto-detected)


点击qtversion,选择/usr/local/Qt-5.7.1/bin/qmake(qtversion,select '/usr/local/Qt-5.7.1/bin/qmake' )

9.找个播放器测试一下(test)
给个例子的地址吧(或者在welcome examples 搜video 最后一个即可)(serch in welcome examples,keyword “video” the last one)
如果qtcreator4 没有examples,这里我把他上传至百度网盘公开链接https://pan.baidu.com/s/1qXKLrcC(if you have not the examps,click here)
我试验了RMVB和mp4都支持,(support rmvb MP4,others no test)

参考

http://blog.youkuaiyun.com/liuysheng/article/details/7826487

http://fmattdev.blogspot.com/2016/07/compiling-qt-57-for-gstreamer-10-on.html

Thanks qtforum's 



FROM: 

http://blog.youkuaiyun.com/xueyeguiren8/article/details/54581536

==========================================================

QT creator 中添加gstreamer动态库


在.pro文件中添加

LIBS += /usr/lib/i386-linux-gnu -lgstreamer-1.0

即可


http://blog.youkuaiyun.com/a125930123/article/details/50499432

=======================================================

Package Qt5GStreamerQuick-1.0 not found


Thanks, I have got one work around to solve "Project ERROR: Package Qt5GStreamerQuick-1.0 not found".

  1. "Qt5GStreamerQuick-1.0" has dependency with "gstreamer-1". Download "gstreamer-1.6.3" and perform make then make install.

  2. Download the qt-gstreamer code, extract freshly and navigate to extracted folder. In my case it is

    cd ~/home/manojsahu/qt-gstreamer-1.2.0/ cmake CMakeLists.txt then make then sudo makeinstall Image of the qmlplayer built

Now the example qmlplayer gets built. But facing error "Failed to create qtvideosink. Make sure it is installed correctly". Perhaps It did not installed properly. Any workaround to build completely would be appreciated highly.


https://stackoverflow.com/questions/35224636/package-qt5gstreamerquick-1-0-not-found





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值