Capture/macOS: Handle not-tightly-packed CVPixelBuffers
The functions VideoCaptureDeviceMac::ReceiveFrame and then VideoCaptureDeviceClient::OnIncomingCapturedData accept a data pointer, but not stride information. These functions assume that all video frame data provided is tightly packed. This is not a valid assumption. When processing a CVPixelBuffer, retrieve the layout of the buffer, and compute the layout of a tightly-packed version of the buffer. If they do not match up, copy the CVPixelBuffer to a tightly-packed temporary buffer and use that. naturally and are okay with the fix, Manually forced testing of NV12 frames Testing: Logi 4k pro capture at 360x249 and BRIO 4K 240p hits this Bug: 1151936 Change-Id: I1ce74629717316ae9387881d70dfb43186e3e906 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2566094Reviewed-by:Markus Handell <handellm@google.com> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#832085}
Showing
Please register or sign in to comment