Add support for media recorders in Camera1Capturer.

BUG=b/36684011

Review-Url: https://codereview.webrtc.org/2861893003
Cr-Commit-Position: refs/heads/master@{#18024}
This commit is contained in:
sakal
2017-05-05 01:48:48 -07:00
committed by Commit bot
parent ea12f4c5e8
commit bac4c8013f
5 changed files with 61 additions and 27 deletions

View File

@ -28,11 +28,8 @@ public class Camera1Capturer extends CameraCapturer {
CameraSession.Events events, Context applicationContext,
SurfaceTextureHelper surfaceTextureHelper, MediaRecorder mediaRecorder, String cameraName,
int width, int height, int framerate) {
if (mediaRecorder != null) {
throw new RuntimeException("MediaRecoder is not supported for camera 1.");
}
Camera1Session.create(createSessionCallback, events, captureToTexture, applicationContext,
surfaceTextureHelper, Camera1Enumerator.getCameraIndex(cameraName), width, height,
framerate);
Camera1Session.create(createSessionCallback, events,
captureToTexture || (mediaRecorder != null), applicationContext, surfaceTextureHelper,
mediaRecorder, Camera1Enumerator.getCameraIndex(cameraName), width, height, framerate);
}
}