|
一来怕自己忘记,二来给后人方便,写下一些东东
首先svn检出ffmpeg。安装配置好msys和mingw环境。- bash-3.1$ bash --version
- GNU bash, version 3.1.0(1)-release (i686-pc-msys)
- Copyright (C) 2005 Free Software Foundation, Inc.
复制代码- bash-3.1$ g++ -v
- Reading specs from f:/mingw/bin/../lib/gcc/mingw32/3.4.2/specs
- Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw
- --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
- nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --ena
- ble-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
- Thread model: win32
- gcc version 3.4.2 (mingw-special)
复制代码 首先进入bash,切换到目录下。
先试试有没有pr命令,没有的话到/bin/下面,把echo cp成pr:然后还要作一些修改:
(1)- Index: configure
- ===================================================================
- --- configure (revision 11067)
- +++ configure (working copy)
- @@ -1948,7 +1948,7 @@
- # Do not overwrite config.h if unchanged to avoid superfluous rebuilds.
- cmp -s $TMPH config.h &&
- echo "config.h is unchanged" ||
- - mv -f $TMPH config.h
- + [u]cp[/u] -f $TMPH config.h
-
- rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
-
复制代码 因为mv -f好像有点问题,会不能覆盖文件。
(2)- Index: libavformat/Makefile
- ===================================================================
- --- Makefile (revision 11067)
- +++ Makefile (working copy)
- @@ -6,7 +6,7 @@
-
- CFLAGS += -I$(SRC_PATH)/libavcodec
-
- -OBJS = allformats.o cutils.o os_support.o sdp.o utils.o
- +OBJS = allformats.o cutils.o os_support.o sdp.o utils.o[u] gettimeofday.o[/u]
-
- HEADERS = avformat.h avio.h rtp.h rtsp.h rtspcodes.h
-
复制代码 因为缺少了gettimeofday函数的链接库。
(3)
新建libavformat/gettimeofday.c- #include
- #include
- void gettimeofday(struct timeval* p, void* tz /* IGNORED */)
- {
- union {
- long long ns100; /*time since 1 Jan 1601 in 100ns units */
- FILETIME ft;
- } now;
- GetSystemTimeAsFileTime( &(now.ft) );
- p->tv_usec=(long)((now.ns100 / 10LL) % 1000000LL );
- p->tv_sec= (long)((now.ns100-(116444736000000000LL))/10000000LL);
- }
复制代码 好了,我们开始编译。
bash-3.1$ ./configure --enable-memalign-hack --disable-debug --enable-small
应该不会有什么问题的。
接着
bash-3.1$ make
bash-3.1$ make install
就可以了
最后我们得到了:- I:\>ffmpeg > ffmpeg.txt
- FFmpeg version SVN-r11067, Copyright (c) 2000-2007 Fabrice Bellard, et al.
- configuration: --enable-memalign-hack --disable-debug --enable-small
- libavutil version: 49.5.0
- libavcodec version: 51.48.0
- libavformat version: 51.19.0
- built on Nov 20 2007 12:06:05, gcc: 3.4.2 (mingw-special)
复制代码
[ 本帖最后由 MeteorRain 于 2007-11-20 12:09 编辑 ] |
评分
-
1
查看全部评分
-
|