前置摄像头 (Front Camera) 是 否可以支持720P的录像
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
前置摄像头录像默认只有Support到HighQuality,即RecordResolution只能到640x480,若希望SupportFineQuality,录720P的话,需要参考后面的方法进行修改。
[SOLUTION]
CAMERAApp将会从MediaProfiles.cpp这边来查询当前的Profiles,所以需要修改这支档案来在菜单中显示精细(Fine)质量,加上下面蓝色部分的代码即可。
File:
ALPS.ICS2.MP(含)之前
alps\php?mod=tag&id=6090" target="_blank" class="relatedlink">Frameworks\base\media\libmedia\MediaProfiles.cpp
ALPS.JB.MP(含)之后
alps\frameworks\av\media\libmedia\MediaProfiles.cpp
Function:
MediaProfiles::createDefaultCamcorderProfiles(MediaProfiles*profiles){
........
/*Youshouldaddbellowprofilesforfrontcameradaymodeandnightmodeforthequality'Fine'.*/
//frontmtkfinecamcorderprofiles.
MediaProfiles::CamcorderProfile*FrontFineProfile=
createMTKCamcorderProfile(CAMCORDER_QUALITY_MTK_FINE,CAMCORDER_DAY_MODE,FRONT_CAMERA);
MediaProfiles::CamcorderProfile*FrontFineSpecificProfile=
createMTKCamcorderProfile(CAMCORDER_QUALITY_MTK_FINE,CAMCORDER_DAY_MODE,FRONT_CAMERA);
profiles->mCamcorderProfiles.add(FrontFineProfile);
profiles->mCamcorderProfiles.add(FrontFineSpecificProfile);
//frontnightfinecamcorderprofiles.
MediaProfiles::CamcorderProfile*FrontNightFineProfile=
createMTKCamcorderProfile(CAMCORDER_QUALITY_MTK_NIGHT_FINE,CAMCORDER_NIGHT_MODE,FRONT_CAMERA);
MediaProfiles::CamcorderProfile*FrontNightFineSpecificProfile=
createMTKCamcorderProfile(CAMCORDER_QUALITY_MTK_NIGHT_FINE,CAMCORDER_NIGHT_MODE,FRONT_CAMERA);
profiles->mCamcorderProfiles.add(FrontNightFineProfile);
profiles->mCamcorderProfiles.add(FrontNightFineSpecificProfile);
......
}
前置摄像头录像默认只有Support到HighQuality,即RecordResolution只能到640x480,若希望SupportFineQuality,录720P的话,需要参考后面的方法进行修改。
[SOLUTION]
CAMERAApp将会从MediaProfiles.cpp这边来查询当前的Profiles,所以需要修改这支档案来在菜单中显示精细(Fine)质量,加上下面蓝色部分的代码即可。
File:
ALPS.ICS2.MP(含)之前
alps\php?mod=tag&id=6090" target="_blank" class="relatedlink">Frameworks\base\media\libmedia\MediaProfiles.cpp
ALPS.JB.MP(含)之后
alps\frameworks\av\media\libmedia\MediaProfiles.cpp
Function:
MediaProfiles::createDefaultCamcorderProfiles(MediaProfiles*profiles){
........
/*Youshouldaddbellowprofilesforfrontcameradaymodeandnightmodeforthequality'Fine'.*/
//frontmtkfinecamcorderprofiles.
MediaProfiles::CamcorderProfile*FrontFineProfile=
createMTKCamcorderProfile(CAMCORDER_QUALITY_MTK_FINE,CAMCORDER_DAY_MODE,FRONT_CAMERA);
MediaProfiles::CamcorderProfile*FrontFineSpecificProfile=
createMTKCamcorderProfile(CAMCORDER_QUALITY_MTK_FINE,CAMCORDER_DAY_MODE,FRONT_CAMERA);
profiles->mCamcorderProfiles.add(FrontFineProfile);
profiles->mCamcorderProfiles.add(FrontFineSpecificProfile);
//frontnightfinecamcorderprofiles.
MediaProfiles::CamcorderProfile*FrontNightFineProfile=
createMTKCamcorderProfile(CAMCORDER_QUALITY_MTK_NIGHT_FINE,CAMCORDER_NIGHT_MODE,FRONT_CAMERA);
MediaProfiles::CamcorderProfile*FrontNightFineSpecificProfile=
createMTKCamcorderProfile(CAMCORDER_QUALITY_MTK_NIGHT_FINE,CAMCORDER_NIGHT_MODE,FRONT_CAMERA);
profiles->mCamcorderProfiles.add(FrontNightFineProfile);
profiles->mCamcorderProfiles.add(FrontNightFineSpecificProfile);
......
}
好东西怎么没人顶呢