Reduce camera freeze timeout to 4 sec.

BUG=b/27496394

Review URL: https://codereview.webrtc.org/1776463002

Cr-Commit-Position: refs/heads/master@{#11914}
This commit is contained in:
glaznev
2016-03-08 10:33:33 -08:00
committed by Commit bot
parent 5b830fed07
commit 295c4c276b

View File

@ -49,7 +49,7 @@ public class VideoCapturerAndroid implements
SurfaceTextureHelper.OnTextureFrameAvailableListener {
private final static String TAG = "VideoCapturerAndroid";
private final static int CAMERA_OBSERVER_PERIOD_MS = 2000;
private final static int CAMERA_FREEZE_REPORT_TIMOUT_MS = 6000;
private final static int CAMERA_FREEZE_REPORT_TIMOUT_MS = 4000;
private android.hardware.Camera camera; // Only non-null while capturing.
private Thread cameraThread;
@ -118,7 +118,7 @@ public class VideoCapturerAndroid implements
Logging.d(TAG, "Camera fps: " + cameraFps +".");
if (cameraFramesCount == 0) {
++freezePeriodCount;
if (CAMERA_OBSERVER_PERIOD_MS * freezePeriodCount > CAMERA_FREEZE_REPORT_TIMOUT_MS
if (CAMERA_OBSERVER_PERIOD_MS * freezePeriodCount >= CAMERA_FREEZE_REPORT_TIMOUT_MS
&& eventsHandler != null) {
Logging.e(TAG, "Camera freezed.");
if (surfaceHelper.isTextureInUse()) {