mrec = new MediaRecorder();
mCamera.unlock();
mrec.setCamera(mCamera);
mrec.setVideoSource(MediaRecorder.VideoSource.CAMERA);
CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_480P);
mrec.setOutputFormat(profile.fileFormat);
mrec.setVideoFrameRate(profile.videoFrameRate);
mrec.setVideoSize(profile.videoFrameWidth, profile.videoFrameHeight);
mrec.setVideoEncodingBitRate(profile.videoBitRate);
mrec.setVideoEncoder(profile.videoCodec);
mrec.setPreviewDisplay(surfaceHolder.getSurface());
mrec.setOutputFile("/sdcard/sample.3gp");
mrec.prepare();
mrec.start();
Мы будем нуждаться в дополнительной информации, такие как версия API, целевой телефон, ваш манифест и активность/фрагмент, что этот код используется в –
Апите 11, мне нужно все телефоны, я пробовал его в действии, –
Light
Я нахожу Ответ! Спасибо за помощь! – Light