Joe Downing 44ff88dd04 DXGI capturer hangs when changing resolution in detached sessions
This CL addresses an issue where the desktop appears to freeze after
resizing the desktop in a curtained CRD session when using the DXGI
capturer. This problem does not reproduce when using the GDI capturer
nor does it reproduce when the Windows session is attached to the local
console.

After digging in, it appears that the DXGI DuplicateOutput API stops
providing updated frame data. No errors are returned but yet no data is
produced. The problem is that when in this condition, there isn't a
good way to discern between this problem and a case where the desktop
is actually static.

The DxgiDuplicatorController already contains logic to attempt to
capture a frame prior to returning success after reinitialization.  This
logic works fine in the console case and occasionally works in the
detached session case. What I noticed in my reproductions was that DXGI
would produce a few frames before hanging (usually 1-2 but sometimes 3
or 4).  My solution is to check the session state and adjust the number
of frames we attempt to capture (I also simplified the wait logic as
there was a bug in the time calc and it seemed more complicated than it
needed to be).

One option considered would be to introduced a new differ class higher
up in the stack which would run the GDI and DXGI capturers in parallel
(instead of in the fallback configuration as they are today) however
that seemed like overkill for this specific issue.

Bug: chromium:1307357
Change-Id: Idba4bb9b2aa7692040344d480be3f0d09b9ce9e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256214
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@google.com>
Commit-Queue: Joe Downing <joedow@google.com>
Cr-Commit-Position: refs/heads/main@{#36286}
2022-03-21 23:49:03 +00:00
2021-11-03 14:59:46 +00:00
2022-02-16 12:37:35 +00:00
2022-03-17 10:26:57 +00:00
2021-01-20 15:01:07 +00:00
2022-02-20 14:22:13 +00:00
2021-12-08 08:53:00 +00:00
2022-03-21 06:30:32 +00:00
2020-07-13 11:42:07 +00:00
2021-08-23 13:37:55 +00:00
2021-12-16 17:45:31 +00:00

WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.

Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.

The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.

Development

See here for instructions on how to get started developing with the native code.

Authoritative list of directories that contain the native API header files.

More info

Description
No description provided
Readme 255 MiB
Languages
C++ 88.6%
C 3.3%
Java 3%
Objective-C++ 1.9%
Python 1.9%
Other 1%