全部博文(1293)
分类: C/C++
2011-04-09 23:58:40
1、首先去官方下载最新release的vlc源码包:vlc-1.0.1.tar.bz2
2、修改configure.ac
(1)、添加s3c6410 mfc的头文见和库的检查
(2)、以及codec module,命名为s3cdnl
3、修改/modules/codec/Modules.am
(1)、添加自己的codec
SOURCES_s3c = s3c.c
4、执行bootstrap生成configure
5、编写 执行configure文件配置脚本
vi do.sh
----------------
1 由于项目需求,这几天在折腾VLC,需要将它裁剪并移植到PowerPC上,由于板子没有到,先在6410上跑。目前从需求看我们只要VLC作为一个server即可,先贴配置,如下:(几乎disable掉所有东东)
以下是编译vlc的configure 的相关设置(见附录do.sh)
出错一:
-----------------------
configure: error: Could not find ffmpeg on your system: you may get it from (svn version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.
-------------------
使用最广泛的音频和视频编码库FFmpeg
官方解决办法:
-----------------------
tar -xvzf ffmpeg.tar.gz
cd ffmpeg
./configure --arch=armv4l --cc=arm-linux-gcc --disable-mmx \
--prefix=/usr/local/arm/2.95.3/arm-linux/usr --enable-shared
cd libavcodec
make
--------------------------
Vlc does not require that you install ffmpeg.
------------执行如下:
root@dyli-desktop:/home/pro/vlc/ffmpeg-0.4.9-pre1# ./do_conf.sh
big/little test failed
Install prefix /usr/local/arm/3.4.1/arm-linux/usr
Source path /home/pro/vlc/ffmpeg-0.4.9-pre1
C compiler /usr/local/arm/3.4.1/bin/arm-linux-gcc
make make
CPU x86 (generic)
Big Endian no
inttypes.h no
broken inttypes.h yes
MMX enabled no
Vector Builtins no
gprof enabled no
zlib enabled no
mp3lame enabled no
vorbis enabled no
faad enabled no
faadbin enabled no
faac enabled no
a52 support no
a52 dlopened no
pp support no
debug symbols yes
optimize yes
shared pp no
Video hooking no
SDL support no
risky / patent encumbered codecs yes
Sun medialib support no
pthreads support no
AMR-NB float support no
AMR-NB fixed support no
AMR-WB float support no
License: LGPL
Creating config.mak and config.h
------------------------
# make
出错:
common.c: In function `align_put_bits':
bswap.h:29: error: impossible constraint in `asm'
make: *** [common.o] 错误 1
error: Could not find libmad on your system
注:libmad - MPEG audio decoder library
编译libmad出现错误(编译libmad不需要交叉编译):
-------------
cc1: error: unrecognized command line option "-fforce-mem"
make[2]: *** [version.lo] Error 1
---------------------------
解决办法:
你用的gcc版本太高,这个版本的gcc没有"-fforce-mem"参数,你打开跟目录下的Makefile去掉里面出现的"-fforce-mem"就ok了。
问题:
---------------------
When am executing
Code: Select all
#./bootstrap
it displayes error
Code: Select all
./bootstrap: you need automake version 1.5 or later
I have checked the current version installed in my machine and found it new one , it is 1.10
Code: Select all
#dpkg -s automake
Package: automake
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 1672
Architecture: all
Source: automake1.10
Version: 1:1.10.1-2
-------------------
解决办法:
输入:
aptitude install automake1.7
update-alternatives --config automake
/*****************************附录**********************/
#!do.sh
# for arm
#CC=/opt/arm-2008q3/bin/arm-none-linux-gnueabi-gcc \
#CXX=/opt/arm-2008q3/bin/arm-none-linux-gnueabi-g++ \
#ARCH=arm \
# --host=arm-none-linux-gnueabi \
build_alias=i486-linux-gnu \
CFLAGS='-g -O2' \
LDFLAGS=-Wl,--as-needed \
CPPFLAGS= \
CXXFLAGS='-g -O2' \
./configure \
--build=i486-linux-gnu \
--enable-run-as-root \
--prefix=/tmp/vlc \
--with-binary-version=2ubuntu1 \
\
--enable-debug \
--disable-hal \
--disable-mtp \
--disable-dbus \
--disable-dbus-control \
--disable-telepathy \
--disable-mmx \
--disable-sse \
--disable-lua \
--disable-notify \
--disable-audioscrobbler \
--disable-taglib \
--disable-live555 \
--disable-dc1394 \
--disable-dv \
--disable-dvdnav \
--disable-smb \
--disable-dvbpsi \
--disable-v4l2 \
--disable-libcdio \
--disable-libvcdinfo \
--disable-libcddb \
--disable-cdda \
--disable-vcd \
--disable-dvb \
--disable-ogg \
--disable-mkv \
--disable-mod \
--disable-mpc \
--disable-gme \
--disable-mad \
--disable-avcodec \
--disable-avformat \
--disable-swscale \
--disable-postproc \
--disable-libsysfs \
--disable-libtar \
--disable-a52 \
--disable-dca \
--disable-zvbi \
--disable-x11 \
--disable-xvideo \
--disable-glx \
--disable-xinerama \
--disable-xcb \
--disable-opengl \
--disable-sdl \
--disable-sdl-image \
--disable-freetype \
--disable-fribidi \
--disable-fontconfig \
--disable-libxml2 \
--disable-hd1000v \
--disable-skins2 \
--disable-qt4 \
--disable-atmo \
\
--disable-vlm \
--disable-screen \
--disable-wma-fixed \
--disable-id3tag \
--disable-fb \
--disable-oss \
--disable-pulse \
--disable-alsa \
--disable-upnp \
--disable-ncurses \
--disable-visual \
--disable-libgcrypt \
--disable-vlc \
\
--disable-gnutls \
--disable-remoteosd \
--disable-libmpeg2 \
--disable-vorbis \
--disable-speex \
--disable-schroedinger \
--disable-png \
--disable-x264 \
--disable-fluidsynth \
--disable-cmml \
--disable-kate \
--disable-tiger \
--disable-bonjour \
\
# --disable-httpd \
# --enable-static \
------------------------