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

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: Mark VideoCapturerAndroid deprecated. 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 // TODO(magjed): This class name is now confusing - rename to Camera1VideoCaptur er.
magjed_webrtc 2016/09/27 11:26:26 Can you remove my todo, and also comment the depre
42 @Deprecated
42 @SuppressWarnings("deprecation") 43 @SuppressWarnings("deprecation")
43 public class VideoCapturerAndroid implements 44 public class VideoCapturerAndroid implements
44 CameraVideoCapturer, 45 CameraVideoCapturer,
45 android.hardware.Camera.PreviewCallback, 46 android.hardware.Camera.PreviewCallback,
46 SurfaceTextureHelper.OnTextureFrameAvailableListener { 47 SurfaceTextureHelper.OnTextureFrameAvailableListener {
47 private static final String TAG = "VideoCapturerAndroid"; 48 private static final String TAG = "VideoCapturerAndroid";
48 private static final int CAMERA_STOP_TIMEOUT_MS = 7000; 49 private static final int CAMERA_STOP_TIMEOUT_MS = 7000;
49 50
50 private android.hardware.Camera camera; // Only non-null while capturing. 51 private android.hardware.Camera camera; // Only non-null while capturing.
51 private final AtomicBoolean isCameraRunning = new AtomicBoolean(); 52 private final AtomicBoolean isCameraRunning = new AtomicBoolean();
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 cameraStatistics.addFrame(); 639 cameraStatistics.addFrame();
639 frameObserver.onTextureFrameCaptured(captureFormat.width, captureFormat.heig ht, oesTextureId, 640 frameObserver.onTextureFrameCaptured(captureFormat.width, captureFormat.heig ht, oesTextureId,
640 transformMatrix, rotation, timestampNs); 641 transformMatrix, rotation, timestampNs);
641 } 642 }
642 643
643 @Override 644 @Override
644 public boolean isScreencast() { 645 public boolean isScreencast() {
645 return false; 646 return false;
646 } 647 }
647 } 648 }
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