Chinaunix首页 | 论坛 | 博客
  • 博客访问: 527964
  • 博文数量: 70
  • 博客积分: 3162
  • 博客等级: 中校
  • 技术积分: 850
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-23 13:30
文章分类
文章存档

2013年(1)

2012年(4)

2011年(1)

2010年(7)

2009年(9)

2008年(20)

2007年(3)

2006年(25)

分类: LINUX

2009-09-02 18:10:17

mplayer的ts流解析以及udp,rtp网络方面稳定性比vlc要弱不少,现在很多应用都需要网络接收播放,修改了下vlc的代码,把6410的mfc的decoder加入到vlc,测试效果果然不错,很稳定...
vlc的编译和配置太繁琐了,时间都浪费在这上面了,把移植配置的过程记录下,供遇到相同问题的人参考..

首先去官方下载最新release的vlc源码包:vlc-1.0.1.tar.bz2
1.修改configure.ac,添加s3c6410 mfc的头文见和库的检查,以及codec module,命名为s3c
dnl
dnl Video codecs:
AC_ARG_ENABLE(s3c,
  [  --enable-s3c           H264 decoder support with libs3c (default enabled)])
if test "${enable_s3c}" != "no"; then
  AC_ARG_WITH(s3c-tree,
    [    --with-s3c-tree=PATH s3c tree for static linking ],[],[])
  if test "${with_s3c_tree}" != "no" -a -n "${with_s3c_tree}"
  then
    real_s3c_tree="`cd ${with_s3c_tree} 2>/dev/null && pwd`"
    if test -z "${real_s3c_tree}"
    then
      dnl  The given directory can't be found
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([${with_s3c_tree} directory doesn't exist])
    fi
    dnl  Use a custom libs3c
    AC_MSG_CHECKING(for SsbSipMfcDecode.h in ${real_s3c_tree})
    if test -f ${real_s3c_tree}/SsbSipMfcDecode.h
    then
      AC_MSG_RESULT(yes)
      VLC_ADD_CPPFLAGS([s3c],[-I${real_s3c_tree}])
      VLC_ADD_LIBS([s3c],[-L${real_s3c_tree} -ls3c])
      VLC_ADD_PLUGIN([s3c])
      LDFLAGS="${LDFLAGS_save}"
    else
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([the specified tree doesn't have SsbSipMfcDecode.h])
    fi
  else
      PKG_CHECK_MODULES(S3C,s3c, [
        VLC_ADD_PLUGIN([s3c])
        VLC_ADD_LDFLAGS([s3c],[${S3C_LIBS}])
        VLC_ADD_CFLAGS([s3c],[${S3C_CFLAGS}])
      ],[
        if test "${enable_s3c}" = "yes"; then
            AC_MSG_ERROR([Could not find libs3c on your system: you may get it from qwdu])
          fi
      ])
    LDFLAGS="${LDFLAGS_save}"
  fi
fi
2.修改/modules/codec/Modules.am
添加自己的codec
SOURCES_s3c = s3c.c
3.执行bootstrap生成configure
4.vi do.sh
./configure  --build=i686-linux --host=arm-linux --disable-nls --disable-hal --disable-mtp --disable-sout --disable-vlm --disable-live555 --disable-dvdnav --disable-smb --disable-libcddb --disable-libvcdinfo --disable-libcdio --disable-cdda --disable-vcd --disable-dvb --disable-screen --enable-mad --disable-avcodec --disable-avformat --disable-swscale --disable-postproc --enable-faad --disable-libtar --disable-a52 --disable-dca --disable-libmpeg2 --disable-vorbis --disable-speex --disable-png --disable-x264 --disable-fluidsynth --disable-zvbi --disable-kate --disable-cmml --disable-tiger --disable-x11 --disable-xvideo --disable-glx --disable-xinerama --disable-opengl --disable-sdl --disable-sdl-image --disable-freetype --disable-fribidi --disable-fontconfig --disable-libxml2 --enable-fb --enable-oss --disable-pulse --disable-alsa --disable-qt4 --disable-bonjour --enable-libgcrypt --disable-gnutls --enable-vlc --disable-mozilla --disable-dbus --disable-skins2  --disable-xcb --disable-remoteosd --enable-run-as-root --enable-dvbpsi --with-faad-tree=*** --with-libgcrypt-prefix=*** --with-dvbpsi=*** --enable-s3c --with-s3c-tree=*** --exec-prefix=/usr/local/vlc --prefix=/usr/local/vlc CC=/usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-gcc CXX=/usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-g++
我只需要H.264(enable-s3c)和aac(faad)以及TS流解析,rtp解析,其他全部关闭

5.编译遇到错误
../libtool: line 814: X--tag=CC: command not found
google得出结论是libtool的版本问题,最新的好像有bug,但是找个老版本来安装太麻烦,无意间看到一个方法:修改libtool文件,将ECHO="echo"替换为echo="echo",错误消失...
6.编译错误
vlc.c:(.text+0x100): undefined reference to `FromLocale'
修改bin/Makefile
vlc_LDADD = ../src/libvlc.la `$(VLC_CONFIG) -libs vlc` $(am__append_2)修改为
vlc_LDADD = ../src/libvlccore.la ../src/libvlc.la `$(VLC_CONFIG) -libs vlc` $(am__append_2)

一路OK........

vlc在6410上终于跑起来。。。
阅读(5515) | 评论(4) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-02-04 19:57:42

能否指导下如何在MPlayer和vlc中添加s3c的mfc接口,如果可以的话能把你的代码给我参考下吗? 375550073@qq.com

wjx0523332009-12-13 12:14:07

你好! 这些s3c.c SsbSipMfcDecode.h文件是在哪里的? SMDK6410中有吗?可否给我一份。我给你的邮箱发邮件了。

cybookish2009-10-06 00:54:49

哦,我不够细心留意错误信息! mplayer的问题,有可能是free统计内存的错误吧,现在项目急,没更多的时间细究;我把mplayer大部分的option都disable,发现free后少的内存变少了;我曾试过ftpget一个文件到板子后,free查看一下剩余内存,发现又少几兆;谢谢你的帮助!!

cybookish2009-09-26 19:57:07

你好,我除了没有加上6410的MFC module外,大部分参照你的文章去编译,然后在6410板子上运行,但是vlc跑不起来,如下: # ./vlc /work/lamei.mp4 VLC media player 1.0.2 Goldeneye LibVLC has detected an unusable buggy GNU/libc version. Please update to version 2.8 or newer. [0x11088] main libvlc error: no memcpy module matched "any" [0x2f680] main interface error: no interface module matched "hotkeys,none" [0x2f680] main interface error: no suitable interface module [0x11088] main libvlc error: interface "hotkeys,none" initialization failed