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

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: 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..cd39c5fa750dc48da1fc151b6c00d2f4b628e120 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;
+ if (dropped_frame_counter_ >= kMaxDroppedFrames)
+ OnError(FROM_HERE, "Too many frames dropped");
+#endif
+ // Failed to reserve I420 output buffer, so drop the frame.
+ 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