From 634fcb32e34413da621445722df1a21cb44a32c4 Mon Sep 17 00:00:00 2001 From: zijiehe Date: Wed, 1 Mar 2017 11:45:37 -0800 Subject: [PATCH] DxgiOutputDuplicator AcquireNextFrame timeout can be 0 Timeout of AcquireNextFrame() can be 0. Though MSDN does not state it clear, I tried it on my laptop, it works well, with almost zero capture time. The screenshot is at https://drive.google.com/open?id=0B0OFNI4uoZGRNVZxekxCbm0ycmc. BUG=682112 Review-Url: https://codereview.webrtc.org/2712353002 Cr-Commit-Position: refs/heads/master@{#16953} --- webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc index ebd8a6aeb5..13087cc928 100644 --- a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc +++ b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc @@ -33,8 +33,8 @@ namespace { // Timeout for AcquireNextFrame() call. // DxgiDuplicatorController leverages external components to do the capture // scheduling. So here DxgiOutputDuplicator does not need to actively wait for a -// new frame. 1 millisecond is the minimium value AcquireNextFrame() accepts. -const int kAcquireTimeoutMs = 1; +// new frame. +const int kAcquireTimeoutMs = 0; DesktopRect RECTToDesktopRect(const RECT& rect) { return DesktopRect::MakeLTRB(rect.left, rect.top, rect.right, rect.bottom);