编译gstreamer app

 

 

 

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 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值