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

Unified Diff: webrtc/api/android/java/src/org/webrtc/VideoCapturerAndroid.java

Issue 2476313002: Add UMA stats for the resolution camera is started in. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/android/java/src/org/webrtc/Metrics.java ('k') | webrtc/api/android/jni/androidmetrics_jni.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/android/java/src/org/webrtc/VideoCapturerAndroid.java
diff --git a/webrtc/api/android/java/src/org/webrtc/VideoCapturerAndroid.java b/webrtc/api/android/java/src/org/webrtc/VideoCapturerAndroid.java
index 8abe6ac7a9f6c85fb33da8e9162098ff0592620b..08c5c134acc307d128f635975cfb9f7a645981fd 100644
--- a/webrtc/api/android/java/src/org/webrtc/VideoCapturerAndroid.java
+++ b/webrtc/api/android/java/src/org/webrtc/VideoCapturerAndroid.java
@@ -10,15 +10,11 @@
package org.webrtc;
-import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
-import org.webrtc.Metrics.Histogram;
-
import android.content.Context;
import android.os.Handler;
import android.os.SystemClock;
import android.view.Surface;
import android.view.WindowManager;
-
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.HashSet;
@@ -27,6 +23,8 @@ import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
+import org.webrtc.Metrics.Histogram;
// Android specific implementation of VideoCapturer.
// An instance of this class can be created by an application using
@@ -53,6 +51,9 @@ public class VideoCapturerAndroid
Histogram.createCounts("WebRTC.Android.VideoCapturerAndroid.StartTimeMs", 1, 10000, 50);
private static final Histogram videoCapturerAndroidStopTimeMsHistogram =
Histogram.createCounts("WebRTC.Android.VideoCapturerAndroid.StopTimeMs", 1, 10000, 50);
+ private static final Histogram videoCapturerAndroidResolutionHistogram =
+ Histogram.createEnumeration("WebRTC.Android.VideoCapturerAndroid.Resolution",
+ CameraEnumerationAndroid.COMMON_RESOLUTIONS.size());
private android.hardware.Camera camera; // Only non-null while capturing.
private final AtomicBoolean isCameraRunning = new AtomicBoolean();
@@ -396,6 +397,8 @@ public class VideoCapturerAndroid
Camera1Enumerator.convertSizes(parameters.getSupportedPreviewSizes());
final Size previewSize =
CameraEnumerationAndroid.getClosestSupportedSize(supportedPreviewSizes, width, height);
+ CameraEnumerationAndroid.reportCameraResolution(
+ videoCapturerAndroidResolutionHistogram, previewSize);
Logging.d(TAG, "Available preview sizes: " + supportedPreviewSizes);
final CaptureFormat captureFormat =
« no previous file with comments | « webrtc/api/android/java/src/org/webrtc/Metrics.java ('k') | webrtc/api/android/jni/androidmetrics_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698