学校:上海交通大学软件工程 学历:硕士 行业:从事流媒体移动开发 QQ: 412595942 邮箱:yiikai1987910@gmail.com
分类: C/C++
2012-01-29 16:06:42
今天对GStreamer进行了编译和测试,总结如下:
编译顺序如下:
glib-2.12.1->gstreamer-0.10.21.tar.bz2->liboil-0.3.15.tar.gz->gst-plugins-base-0.10.21.tar.bz2->libraw1394_1.2.1.orig.tar.gz->libiec61883_1.1.0.orig.tar.gz->gst-plugins-good-0.10.11.tar.bz2->libmad-0.15.0b.tar.gz->libid3tag_0.15.1b.orig.tar.gz->gst-plugins-ugly-0.10.9.tar.bz2
编译步骤:
一.glib-2.12.1
./configure
make
make install
二.gstreamer-0.10.21.tar.bz2
./configure --prefix=/usr/local
make
make install
三.liboil-0.3.15.tar.gz
./configure
make
make install
四.gst-plugins-base-0.10.21.tar.bz2
export
GST_LIBS="-L/usr/local/lib -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0
-ldl -lgthread-2.0 -lxml2 -lpthread -lz -lm -lglib-2.0"
export
GST_BASE_LIBS="-L/usr/local/lib -lgstbase-0.10 -lgstreamer-0.10
-lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lxml2 -lpthread -lz -lm
-lglib-2.0"
export GST_CONTROLLER_LIBS="-L/usr/local/lib
-lgstcontroller-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -ldl
-lgthread-2.0 -lxml2 -lpthread -lz -lm -lglib-2.0"
export
GST_GDP_LIBS="-L/usr/local/lib -lgstdataprotocol-0.10 -lgstreamer-0.10
-lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lxml2 -lpthread -lz -lm
-lglib-2.0"
CC=gcc CFLAGS="-g -O2
-I/usr/local/include/gstreamer-0.10" LD_FLAGS="-L/usr/local/lib"
./configure --prefix=/usr/local --disable-theora --disable-libvisual
make
make -i install
五.libraw1394-1.2.1
CC=gcc CFLAGS="-g -O2 -I/usr/local/include/gstreamer-0.10" LD_FLAGS="-L/usr/local/lib" ./configure --prefix=/usr/local
make
make install
六.libiec61883-1.1.0
CC=gcc CFLAGS="-g -O2 -I/usr/local/include/gstreamer-0.10" LD_FLAGS="-L/usr/local/lib" ./configure --prefix=/usr/local
make
make install
七.gst-plugins-good-0.10.11.tar.bz2
export
GST_PLUGINS_BASE_LIBS="-L/usr/local/lib lgstreamer-0.10 -lgobject-2.0
-lgmodule-2.0 -ldl -lgthread-2.0 -lxml2 -lpthread -lz -lm -lglib-2.0"
CC=gcc
CFLAGS="-g -O2 -I/usr/local/include/gstreamer-0.10"
LD_FLAGS="-L/usr/local/lib" ./configure --prefix=/usr/local
--disable-wavpack --disable-taglib --disable-soup --disable-shout2
--disable-pulse --disable-libcaca --disable-flac --disable-cairo
--disable-dv1394
make
make install
八.libmad
CC=gcc CFLAGS="-g -O2 -I/usr/local/include/gstreamer-0.10" LD_FLAGS="-L/usr/local/lib" ./configure --prefix=/usr/local
make
make install
九.libid3tag
CC=gcc CFLAGS="-g -O2 -I/usr/local/include/gstreamer-0.10" LD_FLAGS="-L/usr/local/lib" ./configure --prefix=/usr/local
make
make install
十.gst-plugins-ugly-0.10.9.tar.bz2
CC=gcc CFLAGS="-g -O2
-I/usr/local/include/gstreamer-0.10" LD_FLAGS="-L/usr/local/lib"
./configure --prefix=/usr/local --disable-cdio --disable-mpeg2dec
make
make install
********************to verify whether the installation's ok
gst-inspect fakesrc
gst-inspect osssink
gst-launch -v fakesrc num-buffers=3 ! fakesink
gst-launch -vm audiotestsrc ! audioconvert ! audioresample ! osssink
gst-launch-0.10 filesrc location="place.mp3" ! mad ! audioconvert ! audioresample ! osssink
gst-launch filesrc location=my-random-media-file.mpeg ! decodebin ! audioconvert ! audioresample ! osssink
gst-launch filesrc location=my-random-media-file.mpeg ! decodebin ! ffmpegcolorspace ! xvimagesink
gst-launch
filesrc location=my-random-media-file.mpeg ! decodebin name=decoder
decoder. ! ffmpegcolorspace ! xvimagesink decoder. ! audioconvert !
audioresample ! osssink
myapp --gst-mask=-1 > mask.log 2>&1