使用CodeBlocks和MSys搭建FFMPEG调试系统

Posted on 2009-12-22 09:55  Teddy Yan  阅读(1205)  评论(0编辑  收藏  举报
  1. SVN下载最新的代码
  2. 安装Msys对代码进行编译,编译参数configuration: --disable-optimizations --disable-ipv6 --enable-shared --disabl
    e-static --enable-memalign-hack --disable-mmx
  3. 安装CodeBlocks 可以进行debug,设置断点到行
  4. 用source Insight读代码

分析D:/msys/1.0/home/bgfx63/trunk/tests 中的测试代码入手来分析ffmpeg,视频压缩和转换的结构。

 

两组D:/msys/1.0/home/bgfx63/trunk/tests/vsynth1 和 D:/msys/1.0/home/bgfx63/trunk/tests/vsynth2 原始图片是pgm格式的。是灰度图像格式:

PGM 是便携式灰度图像格式(portable graymap file format),在黑白超声图像系统中经常使用PGM格式的图像.文件的后缀名为".pgm",PGM格式图像格式分为两类:P2和P5类型.不管是P2还是P5类型的PGM文件,都由两部分组成,文件头部分和数据部分.

 

http://blog.csdn.net/gamer_gerald/archive/2007/06/17/1655756.aspx

 

开始自己编写ffplay:

 

gcc -DHAVE_AV_CONFIG_H -I. -I"/home/bgfx63/trunk" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -fno-common -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wcast-qual -Wwrite-strings -Wundef -fno-math-errno   -I/mingw/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -MMD -MF ffplay.d -MT ffplay.o -c -o tutorial01.o tutorial01.c


gcc -L"/home/bgfx63/trunk"/libavcodec -L"/home/bgfx63/trunk"/libavdevice -L"/home/bgfx63/trunk"/libavfilter -L"/home/bgfx63/trunk"/libavformat -L"/home/bgfx63/trunk"/libavutil -L"/home/bgfx63/trunk"/libpostproc -L"/home/bgfx63/trunk"/libswscale -Wl,--warn-common -Wl,--as-needed -Wl,-rpath-link,"/home/bgfx63/trunk"/libpostproc -Wl,-rpath-link,"/home/bgfx63/trunk"/libswscale -Wl,-rpath-link,"/home/bgfx63/trunk"/libavfilter -Wl,-rpath-link,"/home/bgfx63/trunk"/libavdevice -Wl,-rpath-link,"/home/bgfx63/trunk"/libavformat -Wl,-rpath-link,"/home/bgfx63/trunk"/libavcodec -Wl,-rpath-link,"/home/bgfx63/trunk"/libavutil -Wl,-Bsymbolic -o tutorial01.exe tutorial01.o cmdutils.o -lavdevice -lavformat -lavcodec -lavutil -lswscale -lm  -lws2_32 -lvfw32 -L/mingw/lib -lmingw32 -lSDLmain -lSDL -mwindows

 

Copyright © 2024 Teddy Yan
Powered by .NET 8.0 on Kubernetes