在Ubuntu和Android中使用ffmpeg全格式解码视频文件(1)

1、工作目标
 1.1、封装ON2 API以使在Ubuntu和Android中ffmpeg能用硬件解码多种格式视频文件。  
  即能使用ON2来解码如下格式的文件:H264,MPEG-1,MPEG-2,MPEG-4,H263,Sorensen Spark,DivX,RV,VC-1   
  表1

Standard Decoder support
H.264 profile and level • Baseline Profile, levels 1 - 4.1
  • Main Profile, levels 1 - 4.1
  • High Profile, levels 1 - 4.1
SVC profile and level • Scalable Baseline Profile, base layer only
MPEG-4 visual profile and level • Simple Profile, levels 0 - 6
  • Advanced Simple Profile, levels 0 - 5
MPEG-2 profile and level • Main Profile, low, medium and high levels
MPEG-1 profile and level • Main Profile, low, medium and high levels
H.263 profile and level • Main Profile, low, medium and high levels
Sorenson Spark profile and level • Main Profile, low, medium and high levels
VC-1 profile and level • Simple Profile, low, medium and high levels
  • Main Profile, low, medium and high levels
  • Advanced Profile, levels 0-3
JPEG profile and level • Simple Profile, low, medium and high levels
  • Main Profile, low, medium and high levels
  • Advanced Profile, levels 0-4
RV profile and level • RV8
  • RV9
  • RV10
VP6 profile and level • VP6.0 (Simple Profile)
  • VP6.1
  • VP6.2 (Advanced Profile)
DivX ® profile and level • DivX Home Theater Profile Qualified TM
  • DivX3
  • DivX4
  • DivX5
  • DivX6

2、工作内容
 2.1、Ubuntu 
  封装ON2 API到ffmpeg中使Gstreamer&Mplayer能硬解h264&mpeg2视频,以满足演示的需要。  
  2.1.1  方案
   出于任务时间和工作复杂度以及后期维护性的考虑,修改当前ffmpeg中匹配的decoder, 
   使其直接调用on2 api进行解码,而不是重新开发做一个decoder来专门处理on2支持的格式。 
   如下图: 
   图1 

2.2  Android  
 封装ON2 API到omx中使stagefright能使用on2解码视频。   
 2.2.1   在系统中的位置
 图2   

猜你喜欢

转载自blog.csdn.net/hp9016/article/details/88636150