分享

编译gstreamer app

 开花结果 2012-04-16
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条评论

    发表

    请遵守用户 评论公约

    类似文章 更多