Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: webrtc/sdk/android/api/org/webrtc/Camera1Capturer.java

Issue 2844233002: Revert of Support adding and removing MediaRecorder to camera 2 session. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/sdk/android/api/org/webrtc/Camera2Capturer.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 package org.webrtc; 11 package org.webrtc;
12 12
13 import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
14
13 import android.content.Context; 15 import android.content.Context;
14 import android.media.MediaRecorder; 16
17 import java.util.List;
15 18
16 public class Camera1Capturer extends CameraCapturer { 19 public class Camera1Capturer extends CameraCapturer {
17 private final boolean captureToTexture; 20 private final boolean captureToTexture;
18 21
19 public Camera1Capturer( 22 public Camera1Capturer(
20 String cameraName, CameraEventsHandler eventsHandler, boolean captureToTex ture) { 23 String cameraName, CameraEventsHandler eventsHandler, boolean captureToTex ture) {
21 super(cameraName, eventsHandler, new Camera1Enumerator(captureToTexture)); 24 super(cameraName, eventsHandler, new Camera1Enumerator(captureToTexture));
22 25
23 this.captureToTexture = captureToTexture; 26 this.captureToTexture = captureToTexture;
24 } 27 }
25 28
26 @Override 29 @Override
27 protected void createCameraSession(CameraSession.CreateSessionCallback createS essionCallback, 30 protected void createCameraSession(CameraSession.CreateSessionCallback createS essionCallback,
28 CameraSession.Events events, Context applicationContext, 31 CameraSession.Events events, Context applicationContext,
29 SurfaceTextureHelper surfaceTextureHelper, MediaRecorder mediaRecorder, St ring cameraName, 32 SurfaceTextureHelper surfaceTextureHelper, String cameraName, int width, i nt height,
30 int width, int height, int framerate) { 33 int framerate) {
31 if (mediaRecorder != null) {
32 throw new RuntimeException("MediaRecoder is not supported for camera 1.");
33 }
34 Camera1Session.create(createSessionCallback, events, captureToTexture, appli cationContext, 34 Camera1Session.create(createSessionCallback, events, captureToTexture, appli cationContext,
35 surfaceTextureHelper, Camera1Enumerator.getCameraIndex(cameraName), widt h, height, 35 surfaceTextureHelper, Camera1Enumerator.getCameraIndex(cameraName), widt h, height,
36 framerate); 36 framerate);
37 } 37 }
38 } 38 }
OLDNEW
« no previous file with comments | « no previous file | webrtc/sdk/android/api/org/webrtc/Camera2Capturer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698