免费注册 查看新帖 |

Chinaunix

广告
  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1685 | 回复: 0
打印 上一主题 下一主题

ARM Open Source Codecs[MPlayer] [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-24 08:51 |只看该作者 |倒序浏览

                Introduction
There are a number of open source codecs available that will run on
an ARM, which make them suitable for devices like DM355, DM6446, or
OMAP3. Below are a list of projects you may find useful and
instructions to assist you in your port.
MP3 - madplay
madplay is an MPEG Audio Decoder player, available from:
http://www.underbit.com/products/mad/

  • These instructions are for ARM9 using MV Tools, and may need
    to be modified for other devices. See the README included with madplay
    for further instructions.
  • Download libid3tag, libmad, and madplay tars from the above URL, then untar on host
  • Add Montavista tools to your path (e.g. host# export PATH=/opt/montavista/pro/devkit/arm/v5t_le/bin:$PATH)
  • To compile libmad: host# cd libmad-x.x.x
  • Configure libmad for cross compile, where prefix is your desired installation directory: host# ./configure --prefix=/home/user/target/opt/madplayer CC=arm_v5t_le-gcc --host=arm-linux
  • Make and install via: host# make then host# make install
  • Cross compile libid3tag: host# cd libid3tag-x.x.x
  • Configure libid3tag for cross compile, where prefix is your desired installation directory: host# ./configure --prefix=/home/user/target/opt/madplayer CC=arm_v5t_le-gcc --host=arm-linux
  • Make and install via: host# make then host# make install
  • Finally, host# cd madplayer-x.x.x
  • Configure like: CC=arm_v5t_le-gcc ./configure
    --build=i686-linux --host=arm-linux
    --prefix=/home/user/target/opt/madplayer
    CFLAGS='-I/home/user/target/opt/madplayer/include'
    LIBS='-L/home/user/target/opt/madplayer/lib'
  • Then host# make and host# make install
  • Boot your EVM via TFTP/NFS
  • From the target's serial prompt, target# LD_LIBRARY_PATH=/opt/madplay/lib:$LD_LIBRARY_PATH
  • Edit /etc/ld.so.conf, add the line /opt/madplayer/lib then run target# ldconfig
  • Play an MP3: target# /opt/madplay/bin/madplay myfile.mp3
    [/url]
    Audio/Video codecs - mplayer
    mplayer is a multimedia player available from
    [url=http://www.mplayerhq.hu/]http://www.mplayerhq.hu

    . To see the (very long) list of supported codecs, see
    http://www.mplayerhq.hu/DOCS/codecs-status.html
    .
    Obviously the audio codecs work better on ARM9s than video codecs. On
    ARM9: MP3 seems to have a high load so madplay may be a better option;
    AAC runs well though.
  • These instructions are for ARM9 using MV Tools, and may need
    to be modified for other devices. See the README included with mplayer
    for further instructions.
  • Download MPlayer from the above URL and unzip
  • Add Montavista tools to your path (e.g. host# export PATH=/opt/montavista/pro/devkit/arm/v5t_le/bin:$PATH)
  • First, host# cd MPlayer-x.x
  • Configure mplayer for cross compile, where prefix is your desired installation directory: host#
    ./configure --enable-cross-compile --cc=arm_v5t_le-gcc --host-cc=gcc
    --target=arm-linux-gnu --prefix=/home/user/target/opt/MPlayer-1.0rc2/
  • Make and install via: host# make then host# make install
  • Boot your EVM via TFTP/NFS
  • Play an AAC: target# /opt/MPlayer-1.0rc2/bin/mplayer myfile.aac
  • See mplayer documentation to play other file types
    [/url]
    JPEG encoder/decoder - IJG
    IJG's JPEG library supports JPEG encode and decode; file formats include PPM, PGM, BMP, Targa, and RLE.
  • Download the JPEG library from
    [url=http://www.ijg.org/]http://www.ijg.org/

  • Untar the JPEG library on the target file system
  • Boot your EVM using TFTP boot/NFS file system
  • target# cd /opt/jpeg-xx
  • target# ./configure
  • target# make
  • target# make install
  • target# cjpeg myfile.bmp > myfile.jpg for encode
  • target# djpeg myfile.jpg > myfile.bmp for decode
                   
                   
                   
                   
                   

    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/18138/showart_1333994.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP