从github上下载gstream的相关源码包:
git clone https://github.com/GStreamer/gst-plugins-bad.git
git clone https://github.com/GStreamer/gst-plugins-good.git
git clone https://github.com/GStreamer/gstreamer.git
git clone https://github.com/GStreamer/gst-plugins-base.git
git clone https://github.com/GStreamer/gst-plugins-ugly.git
git clone https://github.com/GStreamer/gst-libav.git
git clone https://github.com/GStreamer/gst-omx.git
编译gstreamer
然后编译开始:
cd gstreamer
./autogen.sh
checking for bison… no
configure: error: Could not find bison
解决办法:
sudo apt-get install bison
下列【新】软件包将被安装:
bison libbison-dev
这样安装了
重新运行:
checking for flex… no
configure: error: Could not find flex
A 直接安装flex
sudo apt-get install flex
下列【新】软件包将被安装:
flex libfl-dev
重新运行:
configure: error: You need to have gtk-doc >= 1.12 installed to build GStreamer
configure failed
A 安装gtk-doc
sudo apt-get install gtk-doc-tools
将会安装下列额外的软件包:
docbook docbook-dsssl docbook-to-man docbook-xsl gnome-common intltool jade
libsp1c2 libxml-parser-perl sp xsltproc
建议安装的软件包:
psgml docbook-defguide jadetex docbook-dsssl-doc docbook-xsl-doc-html
docbook-xsl-doc-pdf docbook-xsl-doc-text docbook-xsl-doc libsaxon-java
libxalan2-java libxslthl-java docbook-xsl-saxon fop xalan dbtoepub
下列【新】软件包将被安装:
docbook docbook-dsssl docbook-to-man docbook-xsl gnome-common gtk-doc-tools
intltool jade libsp1c2 libxml-parser-perl sp xsltproc
重新运行:
。。。。。。。。。
handlebars
Configuration
Version : 1.17.0.1
Source code location : .
Prefix : /usr/local
Compiler : gcc
Package name : GStreamer git
Package origin : Unknown package origin
Debug logging : yes
Tracing subsystem hooks : yes
Command-line parser : yes
Option parsing in gst_init : yes
Plugin registry : yes
Plugin support : yes
Static plugins :
Unit testing support : yes
PTP clock support : yes
libunwind support : no
libdw support : no
Debug : yes
Profiling : no
Building benchmarks : yes
Building examples : yes
Building test apps : yes
Building tests that fail : yes
Building tools : yes
Now type 'make' to compile gstreamer.
然后 make 编译。
编译完成后: 在tools目录下可以看到相应的工具。
最后 make install。
test -z “/usr/local/bin” || /bin/mkdir -p “/usr/local/bin”
/bin/bash …/libtool --mode=install /usr/bin/install -c gst-inspect-1.0 gst-typefind-1.0 gst-launch-1.0 ‘/usr/local/bin’
libtool: install: /usr/bin/install -c .libs/gst-inspect-1.0 /usr/local/bin/gst-inspect-1.0
libtool: install: /usr/bin/install -c .libs/gst-typefind-1.0 /usr/local/bin/gst-typefind-1.0
libtool: install: /usr/bin/install -c .libs/gst-launch-1.0 /usr/local/bin/gst-launch-1.0
test -z “/usr/local/share/man/man1” || /bin/mkdir -p “/usr/local/share/man/man1”
可以查看/usr/local/bin 和usr/local/lib 下面和gst相关的内容项
编译gst-plugins-base
1 生成编译配置
cd gst-plugins-base
/autogen.sh
2 编译
sudo make
s-scan: error while loading shared libraries: libgstreamer-1.0.so.0: cannot open shared object file: No such file or directory
找不到libgstreamer-1.0.so.0
:/usr/local/lib$ ls
gstreamer-1.0 libgstcontroller-1.0.so.0.103.0
libgstbase-1.0.la libgstnet-1.0.la
libgstbase-1.0.so libgstnet-1.0.so
libgstbase-1.0.so.0 libgstnet-1.0.so.0
libgstbase-1.0.so.0.103.0 libgstnet-1.0.so.0.103.0
libgstcheck-1.0.la libgstreamer-1.0.la
libgstcheck-1.0.so libgstreamer-1.0.so
libgstcheck-1.0.so.0 libgstreamer-1.0.so.0
libgstcheck-1.0.so.0.103.0 libgstreamer-1.0.so.0.103.0
libgstcontroller-1.0.la pkgconfig
libgstcontroller-1.0.so python2.7
libgstcontroller-1.0.so.0
这个文件在这个目录底下有,为什么说找不到这个文件呢?
A 修改环境变量:
export LD_LIBRARY=/usr/local/lib
sudo ldconfig
make
make install
安装 gst-plugins-good
A 生成编译配置
cd gst-plugins-good
./autogen.sh
make
make install