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

Unified Diff: webrtc/api/android/java/src/org/webrtc/Camera1Session.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 | « no previous file | webrtc/api/android/java/src/org/webrtc/Camera2Session.java » ('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/Camera1Session.java
diff --git a/webrtc/api/android/java/src/org/webrtc/Camera1Session.java b/webrtc/api/android/java/src/org/webrtc/Camera1Session.java
index dae7910f70774bff4b3e966322b2c8456e640cd8..6ff9c8aa66ef49c9d5515af00f8e542ae0b3eed1 100644
--- a/webrtc/api/android/java/src/org/webrtc/Camera1Session.java
+++ b/webrtc/api/android/java/src/org/webrtc/Camera1Session.java
@@ -10,19 +10,17 @@
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.List;
import java.util.concurrent.TimeUnit;
+import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
+import org.webrtc.Metrics.Histogram;
@SuppressWarnings("deprecation")
public class Camera1Session implements CameraSession {
@@ -33,6 +31,8 @@ public class Camera1Session implements CameraSession {
Histogram.createCounts("WebRTC.Android.Camera1.StartTimeMs", 1, 10000, 50);
private static final Histogram camera1StopTimeMsHistogram =
Histogram.createCounts("WebRTC.Android.Camera1.StopTimeMs", 1, 10000, 50);
+ private static final Histogram camera1ResolutionHistogram = Histogram.createEnumeration(
+ "WebRTC.Android.Camera1.Resolution", CameraEnumerationAndroid.COMMON_RESOLUTIONS.size());
private static enum SessionState { RUNNING, STOPPED }
@@ -138,6 +138,7 @@ public class Camera1Session implements CameraSession {
final Size previewSize = CameraEnumerationAndroid.getClosestSupportedSize(
Camera1Enumerator.convertSizes(parameters.getSupportedPreviewSizes()), width, height);
+ CameraEnumerationAndroid.reportCameraResolution(camera1ResolutionHistogram, previewSize);
return new CaptureFormat(previewSize.width, previewSize.height, fpsRange);
}
« no previous file with comments | « no previous file | webrtc/api/android/java/src/org/webrtc/Camera2Session.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698