編譯gstreamer

將gstreamer及其插件編譯好並安裝在如下目錄中:

/home/user/gstreamer/install

1. 下載glib源碼

(a) ./configure --prefix=/home/user/gstreamer/install

(b) make

(c) make install

在編譯glib過程中,可能需要下載一些其他庫的,如gettext等,按提示安裝上這些庫就可以了。

2. 下載xml源碼

(a) ./configure --prefix=/home/user/gstreamer/install

(b) make

(c) make install

3. 下載gstreamer源碼

(a)  export PKG_CONFIG_PATH=/home/user/gstreamer/install/lib/pkgconfig ./configure --prefix=/home/user/gstreamer/install

(b) make

(c) make install

在編譯gstreamer時,如果出現glib-genmarshal:命令找不到,則在(a)步驟前加入:export PATH=/home/user/gstreamer/install/bin:$PATH,如果你係統中以前裝過了glib-dev則在你係統bin下會有glib的一些文件,編譯gstreamer時,先是找系統bin目錄下的文件,如果你未裝,則必須在編譯前將home/user/gstreamer/install/bin加入到環境變量中

4. 下載gst-plugins-base

(a)  export PKG_CONFIG_PATH=/home/user/gstreamer/install/lib/pkgconfig ./configure --prefix=/home/user/gstreamer/install

(b) make

(c) make install

5. 下載gst-plugins-good

(a)  export PKG_CONFIG_PATH=/home/user/gstreamer/install/lib/pkgconfig ./configure --prefix=/home/user/gstreamer/install

(b) make

(c) make install

6. 下載gst-plugins-bad

(a)  export PKG_CONFIG_PATH=/home/user/gstreamer/install/lib/pkgconfig ./configure --prefix=/home/user/gstreamer/install

(b) make

(c) make install

7. 下載gst-plugins-ugly

(a)  export PKG_CONFIG_PATH=/home/user/gstreamer/install/lib/pkgconfig ./configure --prefix=/home/user/gstreamer/install

(b) make

(c) make install

..................


最後你就可以用自己編譯好的庫來運行自己寫的player了





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章