install glib-2.22.5
1. download glib-2.22.5
2 ./configure
3. make && sudo make install
4. exports
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/usr/local/lib/
export LD_RUN_PATH=/usr/local/lib/
5. pkg-config --modversion glib-2.0
2.22.5
install libxml2
1. sudo yum install libxml2
2. sudo yum install libxml2-devel
install gstreamer
1. download gstreamer-0.10.32
2. ./configure
3. make && sudo make install
install gst-plugins-base
1. download gst-plugins-base-0.10.32
2. ./configure
3. make && sudo make install
install libid3tag
1. download libid3tag-0.15.1b
2. ./configure
3. make && sudo make install
install libmad
1. download libmad-0.15.0b
2. ./configure
3. make && sudo make install
install gst-plugins-good
1. download gst-plugins-good-0.10.27
2. ./configure
3. make && sudo make install
install gst-plugins-ugly
1. download gst-plugins-ugly-0.10.17
2. ./configure
3. make && sudo make install
run gstreamer
encodermp3: (tested)
gst-launch audiotestsrc ! lame ! filesink location=test1.mp3
gst-launch filesrc location=test.wav ! wavparse ! lame ! filesink location=test1.mp3
playmp3: (tested)
gst-launch filesrc location=test.mp3 ! mad ! audioconvert ! audioresample ! autoaudiosink
gst-launch filesrc location=rtsp://localhost:8554/test.mp3 ! mad ! audioconvert ! audioresample ! autoaudiosink
playwav: (tested)
gst-launch filesrc location=test.wav ! wavparse ! audioconvert ! audioresample ! autoaudiosink
gst-launch filesrc location=test.wav ! wavparse ! autoaudiosink
playogg: (tested)
gst-launch filesrc location=test.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink
playavi: (tested)
gst-launch playbin uri=file:///home/bh_wang/Video/test.avi
compile gstreamer application
gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10) gstreamer_test.c -o gstreamer_test
echo $(pkg-config --cflags --libs gstreamer-0.10)
-pthread -I/usr/local/include/gstreamer-0.10 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/include/libxml2 -pthread -L/usr/local/lib -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 -lz -lm -lglib-2.0
gst-launch audiotestsrc ! lame ! filesink location=test1.mp3