Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Video Capture: Fix front camera rotation for portrait orientation
Windows devices Currently, GetCameraRotation() in video_capture_device_utils_win.cc assumes a landscape device. On upcoming Windows devices with naturally portrait displays this leads to the video capture feed being off by 90 degrees counterclockwise. This is because the camera continues to be mounted in a landscape orientation while the display is naturally portrait. This CL adds IsPortraitDevice() in video_capture_device_utils_win.cc which deduces whether we are running on a portrait orientation Windows device. This method is called as part of GetCameraRotation() and helps us correct the video rotation by 90 degrees counterclockwise for portrait orientation devices. Testing: Verified that with this change: 1. Front camera on portrait orientation devices rotates correctly. 2. We preserve existing rotation behavior on landscape orientation devices and when external cameras are attached. Bug: 1061541 Change-Id: I4a7e9552471242c544ee181ab0d0f4685c09f1d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2354539 Reviewed-by: Guido Urdaneta <guidou@chromium.org> Commit-Queue: Rahul Singh <rahsin@microsoft.com> Cr-Commit-Position: refs/heads/master@{#798252}
- Loading branch information