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

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

Issue 418283003: "Buttery Smooth" Tab Capture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Un-inline some methods, plus REBASE. Created 6 years, 4 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
Index: content/browser/renderer_host/media/video_capture_manager.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index 3e9e0bfa864482173cdb9a11c58627114b2f10ca..41bafde91bc3553b81fc5d72f06a7e6c51514303 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -70,6 +70,11 @@ void ConsolidateCaptureFormats(media::VideoCaptureFormats* formats) {
}
}
+// The maximum number of buffers in the capture pipeline. See
+// VideoCaptureController ctor comments for more details.
+const int kMaxNumberOfBuffers = 3;
+const int kMaxNumberOfBuffersForTabCapture = 5;
+
} // namespace
namespace content {
@@ -582,8 +587,10 @@ VideoCaptureManager::DeviceEntry* VideoCaptureManager::GetOrCreateDeviceEntry(
return existing_device;
}
+ const int max_buffers = device_info.type == MEDIA_TAB_VIDEO_CAPTURE ?
+ kMaxNumberOfBuffersForTabCapture : kMaxNumberOfBuffers;
scoped_ptr<VideoCaptureController> video_capture_controller(
- new VideoCaptureController());
+ new VideoCaptureController(max_buffers));
DeviceEntry* new_device = new DeviceEntry(device_info.type,
device_info.id,
video_capture_controller.Pass());

Powered by Google App Engine
This is Rietveld 408576698