Add DesktopCaptureDeviceMacV2 feature
This adds a zero-copy desktop capture mechanism to macOS. The frames are captured as NV12 IOSurfaces, packaged in IOSurfaces, and passed directly to the consumers (e.g, compositor, encoders, etc). This implementation is a trimmed-down version of the existing system, which can be found in the DesktopCaptureDevice class and the WebRTC class ScreenCapturerMac. The CGDisplayStream code is identical to the WebRTC code except for the following changes: - It requests NV12 as the capture format - It specifies the requested capture resolution (rather than capturing at retina resolution and downsampling in software) - It specifies kCGDisplayStreamMinimumFrameTime and kCGDisplayStreamColorSpace. Otherwise, all calls are identical. Bug: 1164736 Change-Id: I962911aa9b1863d730c333866f5644bbbd2b7164 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616802 Commit-Queue: ccameron <ccameron@chromium.org> Reviewed-by:Markus Handell <handellm@google.com> Reviewed-by:
Guido Urdaneta <guidou@chromium.org> Reviewed-by:
Avi Drissman <avi@chromium.org> Reviewed-by:
Robert Sesek <rsesek@chromium.org> Cr-Commit-Position: refs/heads/master@{#843989}
Showing
Please register or sign in to comment