Android 摄像机媒体记录器/摄像机配置文件

Android 摄像机媒体记录器/摄像机配置文件,android,camera,mediarecorder,Android,Camera,Mediarecorder,这是我的问题,我正在开发一个使用摄像头和录制视频的软件,一切正常,但我无法确定如何管理设置,例如,我有一个三星galaxy S,可以在1280x720录制视频,但当我将此分辨率设置为: CamcorderProfile profile; profile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH); profile.videoFrameWidth = 1280; profile.videoFrameHeight = 720; prof

这是我的问题,我正在开发一个使用摄像头和录制视频的软件,一切正常,但我无法确定如何管理设置,例如,我有一个三星galaxy S,可以在1280x720录制视频,但当我将此分辨率设置为:

CamcorderProfile profile;
profile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH);
profile.videoFrameWidth = 1280;
profile.videoFrameHeight = 720;
profile.videoFrameRate = 30;
recorder.setProfile(profile);
logcat显示以下消息:

01-17 14:22:28.706: WARN/AuthorDriver(2782): Intended video encoding frame width (1280) is too large and will be set to (128849019680)

01-17 14:22:28.706: WARN/AuthorDriver(2782): Intended video encoding frame height (720) is too large and will be set to (1078895784755680)

并且参数会自动缩放到800x480

不清楚为什么要使用CamcorderProfile,android文档提到这是只读的

如果要将视频录制大小设置为1280x720,则

  • 从摄像机参数中获取支持的视频大小列表(以确保chk设备支持您要设置的大小)-

public List<Camera.Size> getSupportedVideoSizes () 
public void setVideoSize (int width, int height)