Why do the usable sizes differ

Posted by Raigex on Stack Overflow See other posts from Stack Overflow or by Raigex
Published on 2012-12-19T22:54:55Z Indexed on 2012/12/19 23:03 UTC
Read the original article Hit count: 162

Again, dont really know how to phrase the question so I will explain.

I have a video recorder application. I open my camera with

cameraRecorder = Camera.open(1); //(this is the front facing camera)

And get the camera parameters and all supported preview sizes

CameraParameters tmpParams = cameraRecorder.getParameters();

List<Camera.Size> tmpList = tmpParams.getSupportedPreviewSizes();

one of the preview sizes on the Galaxy Tab 10.1 running ICS (4.0.4) is 800x600

but when I try to set the Video size in my media Player

mediaRecorder.setVideoSize(800,600);

I get this error:

12-19 17:27:55.035: E/CameraSource(110): Video dimension (800x600) is unsupported
12-19 17:27:55.035: E/StagefrightRecorder(110): cameraSource do not init
12-19 17:27:55.035: E/StagefrightRecorder(110): setupCameraSource failed. (-19)
12-19 17:27:55.035: E/StagefrightRecorder(110): setupMediaSource is failed. (-19)
12-19 17:27:55.035: E/StagefrightRecorder(110): setupMPEG4Recording is failed. (-19)
12-19 17:27:55.035: E/MediaRecorder(30119): start failed: -19

Does anyone know why this discrepancy might exist (I know one of the supported record sizes is 1280x720 but that is too big for me).

© Stack Overflow or respective owner

Related posts about size

Related posts about android-camera