ok6410開發板移植vlc做簡單視訊流媒體伺服器
OK6410下的wiif的視訊小車——vlc移植部分
開始移植vlc2.1.5到ok6410開發板中搭建簡單的視訊流媒體伺服器,讀取h264原始資料,ts流封包,rtp協議傳輸。
電腦: vmware ubuntu12.04
gcc4.3.2
vlc配置如下:
CC=/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc
CXX=/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++
ARCH=arm
CFLAGS='-g -O2'
LDFLAGS=-Wl,--as-needed
CPPFLAGS=
CXXFLAGS='-g -O2'
./configure \
--enable-run-as-root \
--prefix=/home/per/workbench/install_ex \
--disable-debug \
--host=arm-none-linux-gnueabi \
--disable-mtp \
--disable-dbus \
--disable-mmx \
--disable-sse \
--disable-lua \
--disable-notify \
--disable-chromaprint \
--disable-taglib \
--disable-live555 \
--disable-dc1394 \
--disable-dvdnav \
--disable-smbclient \
--enable-dvbpsi \
--disable-v4l2 \
--disable-libcddb \
--disable-vcd \
--disable-ogg \
--disable-mkv \
--disable-mod \
--disable-mpc \
--disable-gme \
--disable-mad \
--disable-avcodec \
--disable-avformat \
--disable-swscale \
--disable-postproc \
--disable-libtar \
--disable-a52 \
--disable-dca \
--disable-zvbi \
--disable-xvideo \
--disable-glx \
--disable-xcb \
--disable-sdl \
--disable-sdl-image \
--disable-freetype \
--disable-fribidi \
--disable-fontconfig \
--disable-libxml2 \
--disable-skins2 \
--disable-qt \
--disable-atmo \
\
--disable-vlm \
--disable-screen \
--disable-wma-fixed \
--disable-oss \
--disable-pulse \
--disable-alsa \
--disable-upnp \
--disable-ncurses \
--disable-libgcrypt \
--enable-vlc \
\
--disable-gnutls \
--disable-libmpeg2 \
--disable-vorbis \
--disable-speex \
--disable-schroedinger \
--disable-png \
--enable-x264 \
--disable-fluidsynth \
--disable-kate \
--disable-tiger \
--disable-bonjour \
\
--disable-jack \
--disable-dv1394 \
--disable-dvdread \
--disable-bluray \
--disable-linsys \
--disable-samplerate \
--disable-dirac \
--disable-libass \
--disable-theora \
--disable-twolame \
--disable-udev \
--disable-svg \
--disable-opencv \
--disable-caca \
--disable-gnomevfs \
--disable-shout \
--enable-static \
編譯過程中發現缺少各種庫,需要自己進行交叉編譯後使用,將編譯後prefix指定路徑下的庫檔案和標頭檔案拷貝到交叉編譯器相應的庫檔案和標頭檔案裡面(這樣做可能不是很標準吧?,下面的庫之間也有依賴關係需要編譯後馬上拷貝生成的庫檔案和標頭檔案到交叉編譯器)
交叉編譯各種庫如下:
Cross-Compiling libogg
./configure --host=arm-none-linux-gnueabi ARCH=arm --prefix=/home/per/workbench/install_ex/libogg
make
make install
Cross-Compiling libiconv
./configure --host=arm-none-linux-gnueabi ARCH=arm --prefix=/home/per/workbench/install_ex/libiconvmake
make install
Cross-Compiling FLAC
./configure --host=arm-none-linux-gnueabi ARCH=arm --prefix=/home/per/workbench/install_ex/FLAC --with-mpeg4ip --enable-static --with-ogg=/home/per/workbench/install_ex/libogg --with-ogg-libraries=/home/per/workbench/install_ex/libogg/lib --with-libiconv-prefix=/home/per/workbench/install_ex/libiconv --with-ogg-includes=/home/per/workbench/install_ex/libogg/include --disable-cpplibsmake
make install
Cross-Compiling x264
./configure --host=arm-none-linux-gnueabi --cross-prefix=/usr/local/arm/4.3.2/bin --prefix=/home/per/workbench/install_ex/x264 --disable-opencl --disable-asm --disable-threadmake
make install
Cross-Compiling libav
./configure --cc=/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc --enable-shared --enable-avx --enable-gpl --enable-pthreads --prefix=/home/per/workbench/install_ex/libav --enable-cross-compile --host-cc=gcc --arch=arm --target-os=linux
make
make install
Cross-Compiling DIRAC
./configure --host=arm-none-linux-gnueabi ARCH=arm --prefix=/home/per/workbench/install_ex/diracmake
make install
Cross-Compiling libdvbpsi
./configure -host=arm-none-linux-gnueabi -prefix=/home/per/workbench/install_ex/libdvbpsimake
make install
然後配置並編譯vlc,make install 生成lib bin include share資料夾,將其和以上編譯過的lib拷入開發板。
開發板執行:
./vlc -vvv /sdcard/wanted.H264 --sout "#rtp{dst=192.168.1.108,port=5004,mux=ts,ttl=10}"
發現--enable-static加入後也無法編譯出無需動態庫的可執行檔案。
執行結果:
參考部落格http://m.blog.csdn.net/blog/chenee543216/4348124