编译gstreamer相关

把编译完的配置从config.log里拷出来,去掉双引号了,记得加上

gstreamer统一目录是/home/gstreamer,编译后统一安装在/home/gstreamer/install文件夹里,所以设置pkgconfig就只用设置一个地址
export PKG_CONFIG_LIBDIR=/home/gstreamer/install/lib/pkgconfig

然后开始编译
/home/gstreamer/gstreamer-0.10.21/

$ ./configure --disable-nls --disable-static --enable-binary-registry --disable-loadsave --with-html-dir=/tmp/dump --prefix=/home/gstreamer/gstreamer-0.10.21/../install --host=arm-linux LDFLAGS=-L/home/gstreamer/install/lib/ -L/home/gstreamer/install/lib/ -lglib-2.0 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lxml2 CFLAGS=-I/home/gstreamer/install/include/ -I/home/gstreamer/install/include/glib-2.0/ -I/home/gstreamer/install/lib/glib-2.0/include

/home/gstreamer/gst-plugins-base-0.10.21/
$ ./configure --host=arm-linux --prefix=/home/gstreamer/gst-plugins-base-0.10.21/../install --disable-static --with-html-dir=/tmp/dump CFLAGS=-I/home/gstreamer/install/lib/glib-2.0/include -I/home/gstreamer/install/include/glib-2.0 -I/home/gstreamer/install/include/liboil-0.3/liboil -I/home/gstreamer/install/include/gstreamer-0.10/gst -I/home/gstreamer/install/include/gio-unix-2.0/gio -I/home/gstreamer/install/include/libxml2/libxml LDFLAGS=-L/home/gstreamer/install/lib/ -L/home/gstreamer/install/lib/gstreamer-0.10 -L/home/gstreamer/install/lib/python2.5/site-packages --with-pkg-config-path=/home/gstreamer/install/lib/pkgconfig --disable-x --disable-xvideo --disable-xshm --disable-gnome_vfs --disable-cdparanoia --disable-libvisual --disable-alsa --disable-ogg --disable-oggtest --disable-pango --disable-vorbis --disable-vorbistest

/home/gstreamer/gst-plugins-good-0.10.11/
$ ./configure --host=arm-linux --prefix=/home/gstreamer/gst-plugins-good-0.10.11/../install --disable-nls --disable-static --with-html-dir=/tmp/dump --with-plugins=avi,qtdemux CFLAGS=-I/home/gstreamer/install/lib/glib-2.0/include -I/home/gstreamer/install/include/glib-2.0 -I/home/gstreamer/install/include/liboil-0.3/liboil -I/home/gstreamer/install/include/gstreamer-0.10/gst -I/home/gstreamer/install/include/gio-unix-2.0/gio -I/home/gstreamer/install/include/libxml2/libxml LDFLAGS=-L/home/gstreamer/install/lib/ -L/home/gstreamer/install/lib/gstreamer-0.10 -L/home/gstreamer/install/lib/python2.5/site-packages --disable-x --disable-xshm --disable-xvideo --disable-esd --disable-shout2

/home/gstreamer/gst-plugins-ugly-0.10.10/
$ ./configure --host=arm-linux --prefix=/home/gstreamer/gst-plugins-ugly-0.10.10/../install --disable-nls --disable-static --with-html-dir=/tmp/dump --with-plugins=asfdemux CFLAGS=-I/home/gstreamer/install/lib/glib-2.0/include -I/home/gstreamer/install/include/glib-2.0 -I/home/gstreamer/install/include/liboil-0.3/liboil -I/home/gstreamer/install/include/gstreamer-0.10/gst -I/home/gstreamer/install/include/gio-unix-2.0/gio -I/home/gstreamer/install/include/libxml2/libxml LDFLAGS=-L/home/gstreamer/install/lib/ -L/home/gstreamer/install/lib/gstreamer-0.10 -L/home/gstreamer/install/lib/python2.5/site-packages

/home/gstreamer/gst-plugins-bad-0.10.9/
$ ./configure --host=arm-linux --prefix=/home/gstreamer/gst-plugins-bad-0.10.9/../install CFLAGS=-I/home/gstreamer/install/lib/glib-2.0/include -I/home/gstreamer/install/include/glib-2.0 -I/home/gstreamer/install/include/liboil-0.3/liboil -I/home/gstreamer/install/include/gstreamer-0.10/gst -I/home/gstreamer/install/include/gio-unix-2.0/gio -I/home/gstreamer/install/include/libxml2/libxml LDFLAGS=-L/home/gstreamer/install/lib/ -L/home/gstreamer/install/lib/gstreamer-0.10 -L/home/gstreamer/install/lib/python2.5/site-packages --disable-nls --disable-static --with-html-dir=/tmp/dump --disable-apexsink --disable-sdl

/home/gstreamer/glib-2.18.3
$ ./configure --cache-file=arm.cache --host=arm-linux --prefix=/home/gstreamer/glib-2.18.3/install
arm.cache的内容在前面的文章里写了。家里用X86_64编译的,把posix那2个设置为no,可以编译过了。也没有WARNING提示了。

/home/gstreamer/libxml2-2.6.24/
$ ./configure --host=arm-linux --prefix=/home/gstreamer/libxml2-2.6.24/../install/

/home/gstreamer/liboil-0.3.15/
$ ./configure --host=arm-linux --prefix=/home/gstreamer/liboil-0.3.15/../install/ --disable-static --with-html-dir=/tmp/dump CFLAGS=-I/home/gstreamer/install/lib/glib-2.0/include -I/home/gstreamer/install/include/glib-2.0 LDFLAGS=-L/home/gstreamer/install/lib/
修改的configure文件在前面文章里写了

这里的编译都是不带额外的plugins,比如没有把mad加进去

运行时设置环境变量GST_PLUGINS_PATH为包含plugin的地址
在没有设置该环境变量时,运行/home/gstreamer/gstreamer-0.10.21/tests/examples/helloworld/.libs下的helloworld程序会报错:

# ./helloworld a
**
ERROR:helloworld.c:59:main: assertion failed: (filesrc)
Aborted

本 来是件简单的事情,设置环境变量就行了,但是网上没搜到解决办法,加入了gstreamer的QQ群,也没人告诉我。有个人倒是算热心回答我问题,但是他 觉得这里不应该出错,他不会在这里出错。那么他们怎么把有哪些plugin告诉gstreamer的?可能办法不一样吧。结果我找到一 篇"GStreamer Plugin Writer's Guide(0.10.21.1)",Chapter 9. Building a Test Application才知道要设置GST_PLUGIN_PATH
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值