MediaRecorder with 360p Recording

I don't know this is a bug of MediaRecorder / CamcorderProfile or not but let me explain my situation.

My Goal for app
- I want to make one camera module which has basic only front camera not back
- Also it can record only 360p (540 * 360 resolution).

What I do for code

mMediaRecorder = new MediaRecorder();
    mCamera.unlock();
    mMediaRecorder.setCamera(mCamera);
    mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
    mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
    mMediaRecorder.setProfile(CamcorderProfile.get(mCameraId,CamcorderProfile.QUALITY_480P));
    mMediaRecorder.setVideoSize(mCaptureSize.getWidth(), mCaptureSize.getHeight()); 
 //width = 360 & height = 540  it will crash 
//width = 480 & height = 720 it will allow 
    .....
    .....

Where I stuck

So, for pixel of video, I have to change CamcorderProfile

CamcorderProfile.get(mCameraId,CamcorderProfile.QUALITY_480P)

-CamcorderProfile.QUALITY_360P is missing so how can I get video resolution 540*360

在这里输入图像描述

-or I have missed something?

链接地址: http://www.djcxy.com/p/31134.html

上一篇: 显示用于音频录制的相机预览的MediaRecorder

下一篇: 带有360p录制的MediaRecorder