OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 super(cameraName, eventsHandler, new Camera1Enumerator(captureToTexture)); | 21 super(cameraName, eventsHandler, new Camera1Enumerator(captureToTexture)); |
22 | 22 |
23 this.captureToTexture = captureToTexture; | 23 this.captureToTexture = captureToTexture; |
24 } | 24 } |
25 | 25 |
26 @Override | 26 @Override |
27 protected void createCameraSession(CameraSession.CreateSessionCallback createS
essionCallback, | 27 protected void createCameraSession(CameraSession.CreateSessionCallback createS
essionCallback, |
28 CameraSession.Events events, Context applicationContext, | 28 CameraSession.Events events, Context applicationContext, |
29 SurfaceTextureHelper surfaceTextureHelper, MediaRecorder mediaRecorder, St
ring cameraName, | 29 SurfaceTextureHelper surfaceTextureHelper, MediaRecorder mediaRecorder, St
ring cameraName, |
30 int width, int height, int framerate) { | 30 int width, int height, int framerate) { |
31 if (mediaRecorder != null) { | 31 Camera1Session.create(createSessionCallback, events, |
32 throw new RuntimeException("MediaRecoder is not supported for camera 1."); | 32 captureToTexture || (mediaRecorder != null), applicationContext, surface
TextureHelper, |
33 } | 33 mediaRecorder, Camera1Enumerator.getCameraIndex(cameraName), width, heig
ht, framerate); |
34 Camera1Session.create(createSessionCallback, events, captureToTexture, appli
cationContext, | |
35 surfaceTextureHelper, Camera1Enumerator.getCameraIndex(cameraName), widt
h, height, | |
36 framerate); | |
37 } | 34 } |
38 } | 35 } |
OLD | NEW |