4、CTS media_profiles.xml编解码讲解

# 1、GMS 实践过程总结目录

1、media_profiles.xml解析、
   支持mp4/3gp这两种视频文件格式
           帧率30、60
          摄像头id 0、1、2
             视频编码格式 
 视频输出文件格式mp4、3gp

2、media_profile.xml解析 -- 每种size对应的编解码配置

? ?

3、media_profile.xml解析 -- 平台硬件支持限制

minBitRate="64000" maxBitRate="100000000"      //不用的size对于编解码速率不同最小最大边界
minFrameWidth="176" maxFrameWidth="3840"    //size width 支持最小最大
minFrameHeight="144" maxFrameHeight="2160" //size height支持最小最大
minFrameRate="15" maxFrameRate="30" />         //size 帧率支持最小最大

4、编解码分为三种正常录像/timelapsel延时录像(也可以叫慢录)/highspeed高速录像(也可以叫快录)

例如:low -- timelapselow --highspeedlow  具体代码如最下

代码地址:/frameworks/av/media/libmedia/MediaProfiles.cpp

const MediaProfiles::NameToTagMap MediaProfiles::sCamcorderQualityNameMap[] = {
{"low", CAMCORDER_QUALITY_LOW},       0
{"high", CAMCORDER_QUALITY_HIGH},     1
{"qcif", CAMCORDER_QUALITY_QCIF},       2
{"cif", CAMCORDER_QUALITY_CIF},            3
{"480p", CAMCORDER_QUALITY_480P},    4
{"720p", CAMCORDER_QUALITY_720P},    5
{"1080p", CAMCORDER_QUALITY_1080P}, 6
{"2160p", CAMCORDER_QUALITY_2160P}, 7
{"qvga", CAMCORDER_QUALITY_QVGA},   8

{"timelapselow",  CAMCORDER_QUALITY_TIME_LAPSE_LOW}, 1000
{"timelapsehigh", CAMCORDER_QUALITY_TIME_LAPSE_HIGH},1001
{"timelapseqcif", CAMCORDER_QUALITY_TIME_LAPSE_QCIF},  1002
{"timelapsecif", CAMCORDER_QUALITY_TIME_LAPSE_CIF},       1003
{"timelapse480p", CAMCORDER_QUALITY_TIME_LAPSE_480P}, 1004
{"timelapse720p", CAMCORDER_QUALITY_TIME_LAPSE_720P},1005
{"timelapse1080p", CAMCORDER_QUALITY_TIME_LAPSE_1080P},1006
{"timelapse2160p", CAMCORDER_QUALITY_TIME_LAPSE_2160P}, 1008
{"timelapseqvga", CAMCORDER_QUALITY_TIME_LAPSE_QVGA},  1007 

{"highspeedlow",  CAMCORDER_QUALITY_HIGH_SPEED_LOW}, 2000
{"highspeedhigh", CAMCORDER_QUALITY_HIGH_SPEED_HIGH},2001
{"highspeed480p", CAMCORDER_QUALITY_HIGH_SPEED_480P},2002
{"highspeed720p", CAMCORDER_QUALITY_HIGH_SPEED_720P},2003
{"highspeed1080p", CAMCORDER_QUALITY_HIGH_SPEED_1080P},2004
{"highspeed2160p", CAMCORDER_QUALITY_HIGH_SPEED_2160P},2005
};

你可能感兴趣的:(六,Google,GMS,CTS)