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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user