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

Side by Side Diff: webrtc/api/android/java/src/org/webrtc/VideoCapturerAndroid.java

Issue 2356073003: Change Camera1Enumerator to create a Camera1Capturer instead of VideoCapturerAndroid. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 | « webrtc/api/android/java/src/org/webrtc/Camera1Enumerator.java ('k') | no next file » | 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 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 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 20 matching lines...) Expand all
31 // An instance of this class can be created by an application using 31 // An instance of this class can be created by an application using
32 // VideoCapturerAndroid.create(); 32 // VideoCapturerAndroid.create();
33 // This class extends VideoCapturer with a method to easily switch between the 33 // This class extends VideoCapturer with a method to easily switch between the
34 // front and back camera. It also provides methods for enumerating valid device 34 // front and back camera. It also provides methods for enumerating valid device
35 // names. 35 // names.
36 // 36 //
37 // Threading notes: this class is called from C++ code, Android Camera callbacks , and possibly 37 // Threading notes: this class is called from C++ code, Android Camera callbacks , and possibly
38 // arbitrary Java threads. All public entry points are thread safe, and delegate the work to the 38 // arbitrary Java threads. All public entry points are thread safe, and delegate the work to the
39 // camera thread. The internal *OnCameraThread() methods must check |camera| for null to check if 39 // camera thread. The internal *OnCameraThread() methods must check |camera| for null to check if
40 // the camera has been stopped. 40 // the camera has been stopped.
41 // TODO(magjed): This class name is now confusing - rename to Camera1VideoCaptur er. 41 //
42 // This class is deprecated and will only be used if you manually create it. Ple ase use
43 // Camera1Capturer instead.
44 @Deprecated
42 @SuppressWarnings("deprecation") 45 @SuppressWarnings("deprecation")
43 public class VideoCapturerAndroid 46 public class VideoCapturerAndroid
44 implements CameraVideoCapturer, android.hardware.Camera.PreviewCallback, 47 implements CameraVideoCapturer, android.hardware.Camera.PreviewCallback,
45 SurfaceTextureHelper.OnTextureFrameAvailableListener { 48 SurfaceTextureHelper.OnTextureFrameAvailableListener {
46 private static final String TAG = "VideoCapturerAndroid"; 49 private static final String TAG = "VideoCapturerAndroid";
47 private static final int CAMERA_STOP_TIMEOUT_MS = 7000; 50 private static final int CAMERA_STOP_TIMEOUT_MS = 7000;
48 51
49 private android.hardware.Camera camera; // Only non-null while capturing. 52 private android.hardware.Camera camera; // Only non-null while capturing.
50 private final AtomicBoolean isCameraRunning = new AtomicBoolean(); 53 private final AtomicBoolean isCameraRunning = new AtomicBoolean();
51 // Use maybePostOnCameraThread() instead of posting directly to the handler - this way all 54 // Use maybePostOnCameraThread() instead of posting directly to the handler - this way all
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 cameraStatistics.addFrame(); 616 cameraStatistics.addFrame();
614 frameObserver.onTextureFrameCaptured(captureFormat.width, captureFormat.heig ht, oesTextureId, 617 frameObserver.onTextureFrameCaptured(captureFormat.width, captureFormat.heig ht, oesTextureId,
615 transformMatrix, rotation, timestampNs); 618 transformMatrix, rotation, timestampNs);
616 } 619 }
617 620
618 @Override 621 @Override
619 public boolean isScreencast() { 622 public boolean isScreencast() {
620 return false; 623 return false;
621 } 624 }
622 } 625 }
OLDNEW
« no previous file with comments | « webrtc/api/android/java/src/org/webrtc/Camera1Enumerator.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698