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

Unified Diff: content/browser/renderer_host/media/video_capture_device_client.cc

Issue 2124073006: Remove VideoCaptureDeviceClient buffer warning logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turn into DCHECK. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/media/video_capture_device_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_device_client.cc
diff --git a/content/browser/renderer_host/media/video_capture_device_client.cc b/content/browser/renderer_host/media/video_capture_device_client.cc
index f6f8cba1aa5ae165026c78a387bfb3508d2f8dc9..7d8046e3a03c5f2f9e22b39dfaa9e0ddc14aad80 100644
--- a/content/browser/renderer_host/media/video_capture_device_client.cc
+++ b/content/browser/renderer_host/media/video_capture_device_client.cc
@@ -138,10 +138,14 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData(
std::unique_ptr<Buffer> buffer(
ReserveI420OutputBuffer(dimensions, output_pixel_storage, &y_plane_data,
&u_plane_data, &v_plane_data));
- if (!buffer.get()) {
- DLOG(WARNING) << "Failed to reserve I420 output buffer.";
+#if DCHECK_IS_ON()
+ dropped_frame_counter_ = buffer.get() ? 0 : dropped_frame_counter_ + 1;
+ DCHECK_LT(dropped_frame_counter_, 150u)
mcasas 2016/07/13 00:31:36 I'd recommend defining a constant static const i
emircan 2016/07/13 17:51:14 Changed |dropped_frame_counter_| to int and declar
emircan 2016/07/13 18:24:55 Nvm. I just realized OnError is a call within this
+ << " Dropped too many consecutive captured frames.";
+#endif
+ // Failed to reserve I420 output buffer, so drop the frame.
mcasas 2016/07/13 00:31:36 nit: Shift l.146 two spaces left.
emircan 2016/07/13 17:51:14 Done.
+ if (!buffer.get())
return;
- }
const int yplane_stride = dimensions.width();
const int uv_plane_stride = yplane_stride / 2;
« no previous file with comments | « content/browser/renderer_host/media/video_capture_device_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698