我想获得1920 x 1080 jpeg onPreviewFrame。
onPreviewFrame上框架的大小取决于Camera.setPictureSize / Camera.setPreviewSize(如果我错了,请更正我)
目前,当我使用默认摄像机拍摄1080p视频时,我能够获得分辨率为1920 x 1080的视频。因此,我认为我应该可以从onPreviewFrame获得1920 x 1080帧。
然而,当我要求我的相机打印所有支持的PictureSize和支持的PreviewSize时,它显示1280 x 720作为最大尺寸。
因为相机说最大尺寸为1280 x 720,所以我无法以1920 x 1080拍摄帧。
我在这里遗漏了一些阻止我获得1920 x 1080帧的东西,或者是否有任何可以让我设置的setPictureSize和PreviewSize大于SupportedPictureSize和SupportedPreviewSize
以下是nexus 4后置摄像头支持的预览和图片尺寸列表的日志。
感谢阅读,并感谢任何帮助或建议。
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 1280===720
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 800===480
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 768===432
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 720===480
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 640===480
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 576===432
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 480===320
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 384===288
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 352===288
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 320===240
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 240===160
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ picturesize: 176===144
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 1280===720
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 800===480
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 768===432
11-05 13:37:57.987 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 720===480
11-05 13:37:57.997 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 640===480
11-05 13:37:57.997 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 576===432
11-05 13:37:57.997 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 480===320
11-05 13:37:57.997 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 384===288
11-05 13:37:57.997 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 352===288
11-05 13:37:57.997 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 320===240
11-05 13:37:57.997 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 240===160
11-05 13:37:57.997 5576-5576/com.example.mediacodecapp E/CamcorderProfile﹕ previewSize: 176===144