linux qt5.4 gstreamer,Qt5使用GStreamer1.0

同样是Ubuntu 16.04系统,在其中一台机器上,./configure  检测

Qt Multimedia:

ALSA ................................... yes

GStreamer 1.0 .......................... no

无法启用QtMutimedia,播放声音

试过Qt5.6.2 Qt5.8.0的源文件包都是如此

安装所有gstreamer相关包

gstreamer0.10-alsa                     gstreamer1.0-clutter                   gstreamer1.0-plugins-base-dbg

gstreamer0.10-doc                      gstreamer1.0-clutter-3.0               gstreamer1.0-plugins-base-doc

gstreamer0.10-ffmpeg                   gstreamer1.0-crystalhd                 gstreamer1.0-plugins-good

gstreamer0.10-ffmpeg-dbg               gstreamer1.0-doc                       gstreamer1.0-plugins-good-dbg

gstreamer0.10-gconf                    gstreamer1.0-dvswitch                  gstreamer1.0-plugins-good-doc

gstreamer0.10-gnomevfs                 gstreamer1.0-espeak                    gstreamer1.0-plugins-ugly

gstreamer0.10-nice                     gstreamer1.0-fluendo-mp3               gstreamer1.0-plugins-ugly-amr

gstreamer0.10-plugins-base             gstreamer1.0-hybris                    gstreamer1.0-plugins-ugly-dbg

gstreamer0.10-plugins-base-apps        gstreamer1.0-libav                     gstreamer1.0-plugins-ugly-doc

gstreamer0.10-plugins-base-dbg         gstreamer1.0-libav-dbg                 gstreamer1.0-pocketsphinx

gstreamer0.10-plugins-base-doc         gstreamer1.0-nice                      gstreamer1.0-pulseaudio

gstreamer0.10-plugins-good             gstreamer1.0-packagekit                gstreamer1.0-tools

gstreamer0.10-plugins-good-dbg         gstreamer1.0-plugins-bad               gstreamer1.0-vaapi

gstreamer0.10-plugins-good-doc         gstreamer1.0-plugins-bad-dbg           gstreamer1.0-vaapi-doc

gstreamer0.10-pulseaudio               gstreamer1.0-plugins-bad-doc           gstreamer1.0-x

gstreamer0.10-qapt                     gstreamer1.0-plugins-bad-faad          gstreamer-qapt

gstreamer0.10-tools                    gstreamer1.0-plugins-bad-videoparsers  gstreamer-tools

gstreamer0.10-x                        gstreamer1.0-plugins-base

gstreamer1.0-alsa                      gstreamer1.0-plugins-base-apps

除了 gstreamer1.0-hybris有依赖问题无法安装外,都安装了,问题依然

又安装如下包

libgstreamer0.10-0                 libgstreamer1.0-dev                libgstreamer-ocaml-dev             libgstreamer-plugins-base1.0-0

libgstreamer0.10-0-dbg             libgstreamermm-1.0-0v5             libgstreamer-plugins-bad1.0-0      libgstreamer-plugins-base1.0-dev

libgstreamer0.10-dev               libgstreamermm-1.0-dev             libgstreamer-plugins-bad1.0-dev    libgstreamer-plugins-good1.0-0

libgstreamer1.0-0                  libgstreamermm-1.0-doc             libgstreamer-plugins-base0.10-0    libgstreamer-plugins-good1.0-dev

libgstreamer1.0-0-dbg              libgstreamer-ocaml                 libgstreamer-plugins-base0.10-dev

问题依然,搜索了好久

./configure -gstreamer 1.0 -qt-xcb 问题依然

pkg-config gstreamer-1.0 --cflags 结果正常

-pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include

pkg-config gstreamer-1.0 --libs 结果正常

-lgstreamer-1.0 -lgobject-2.0 -lglib-2.0

经过这篇文章提示,http://askubuntu.com/questions/384059/error-compiling-a-package-configure-error-no-gstreamer-1-0-1-0-0

仔细检查,果然是漏掉了 sudo apt install libgstreamer-plugins-base1.0-dev 安装

安装完后,rm config.cache,重新./configure 终于检测结果正常开启 GStreamer 1.0

Qt Multimedia:   ALSA ................................... yes   GStreamer 1.0 .......................... yes   GStreamer 0.10 ......................... no   Video for Linux ........................ yes   OpenAL ................................. no   PulseAudio ............................. no   Resource Policy (libresourceqt5) ....... no   DirectShow ............................. no   Windows Media Foundation ............... no

你可能感兴趣的:(linux,qt5.4,gstreamer)