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

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

Issue 2516403002: Revert of Allow custom metrics implementations on Android. (Closed)
Patch Set: Created 4 years 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/BUILD.gn ('k') | webrtc/api/android/java/src/org/webrtc/Camera2Session.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 android.content.Context; 13 import android.content.Context;
14 import android.os.Handler; 14 import android.os.Handler;
15 import android.os.SystemClock; 15 import android.os.SystemClock;
16 import android.view.Surface; 16 import android.view.Surface;
17 import android.view.WindowManager; 17 import android.view.WindowManager;
18 import java.io.IOException; 18 import java.io.IOException;
19 import java.nio.ByteBuffer; 19 import java.nio.ByteBuffer;
20 import java.util.List; 20 import java.util.List;
21 import java.util.concurrent.TimeUnit; 21 import java.util.concurrent.TimeUnit;
22 import org.webrtc.CameraEnumerationAndroid.CaptureFormat; 22 import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
23 import org.webrtc.Metrics.Histogram;
23 24
24 @SuppressWarnings("deprecation") 25 @SuppressWarnings("deprecation")
25 public class Camera1Session implements CameraSession { 26 public class Camera1Session implements CameraSession {
26 private static final String TAG = "Camera1Session"; 27 private static final String TAG = "Camera1Session";
27 private static final int NUMBER_OF_CAPTURE_BUFFERS = 3; 28 private static final int NUMBER_OF_CAPTURE_BUFFERS = 3;
28 29
29 private static final Histogram camera1StartTimeMsHistogram = 30 private static final Histogram camera1StartTimeMsHistogram =
30 Histogram.createCounts("WebRTC.Android.Camera1.StartTimeMs", 1, 10000, 50) ; 31 Histogram.createCounts("WebRTC.Android.Camera1.StartTimeMs", 1, 10000, 50) ;
31 private static final Histogram camera1StopTimeMsHistogram = 32 private static final Histogram camera1StopTimeMsHistogram =
32 Histogram.createCounts("WebRTC.Android.Camera1.StopTimeMs", 1, 10000, 50); 33 Histogram.createCounts("WebRTC.Android.Camera1.StopTimeMs", 1, 10000, 50);
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 335 }
335 return (info.orientation + rotation) % 360; 336 return (info.orientation + rotation) % 360;
336 } 337 }
337 338
338 private void checkIsOnCameraThread() { 339 private void checkIsOnCameraThread() {
339 if (Thread.currentThread() != cameraThreadHandler.getLooper().getThread()) { 340 if (Thread.currentThread() != cameraThreadHandler.getLooper().getThread()) {
340 throw new IllegalStateException("Wrong thread"); 341 throw new IllegalStateException("Wrong thread");
341 } 342 }
342 } 343 }
343 } 344 }
OLDNEW
« no previous file with comments | « webrtc/api/BUILD.gn ('k') | webrtc/api/android/java/src/org/webrtc/Camera2Session.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698