Skip to content

[iOS] AVVideoCaptureSource is not handling the case of another application changing the device videoZoomFactor#26406

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
youennf:eng/iOS-AVVideoCaptureSource-is-not-handling-the-case-of-another-application-changing-the-device-videoZoomFactor
Mar 27, 2024
Merged

[iOS] AVVideoCaptureSource is not handling the case of another application changing the device videoZoomFactor#26406
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
youennf:eng/iOS-AVVideoCaptureSource-is-not-handling-the-case-of-another-application-changing-the-device-videoZoomFactor

Conversation

@youennf
Copy link
Copy Markdown
Contributor

@youennf youennf commented Mar 25, 2024

ca83b80

[iOS] AVVideoCaptureSource is not handling the case of another application changing the device videoZoomFactor
https://bugs.webkit.org/show_bug.cgi?id=271643
rdar://125351159

Reviewed by Eric Carlson.

When another application is changing the device zoom, it got access to the device so AVVideoCaptureSource is not running.
When AVVideoCaptureSource restarts, we just have to reapply the device zoom.

Remove AVVideoCaptureSource::m_appliedZoom since the device videoZoomFactor can change when other iOS apps get access to the camera.
We thus always compare the zoom to be applied with the device zoom.

* Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h:
* Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setSessionSizeFrameRateAndZoom):

Canonical link: https://commits.webkit.org/276731@main

4c57ed8

Misc iOS, tvOS & watchOS macOS Linux Windows
❌ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ❌ 🧪 mac-wk1 ✅ 🛠 wpe-skia
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 tv-sim ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@youennf youennf self-assigned this Mar 25, 2024
@youennf youennf added the WebRTC For bugs in WebRTC label Mar 25, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Mar 25, 2024
@youennf youennf force-pushed the eng/iOS-AVVideoCaptureSource-is-not-handling-the-case-of-another-application-changing-the-device-videoZoomFactor branch from 70873ce to 4c57ed8 Compare March 26, 2024 14:32
@youennf youennf added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Mar 26, 2024
@webkit-ews-buildbot webkit-ews-buildbot added merging-blocked Applied to prevent a change from being merged and removed merge-queue Applied to send a pull request to merge-queue labels Mar 26, 2024
@youennf youennf added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Mar 27, 2024
…ation changing the device videoZoomFactor

https://bugs.webkit.org/show_bug.cgi?id=271643
rdar://125351159

Reviewed by Eric Carlson.

When another application is changing the device zoom, it got access to the device so AVVideoCaptureSource is not running.
When AVVideoCaptureSource restarts, we just have to reapply the device zoom.

Remove AVVideoCaptureSource::m_appliedZoom since the device videoZoomFactor can change when other iOS apps get access to the camera.
We thus always compare the zoom to be applied with the device zoom.

* Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h:
* Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setSessionSizeFrameRateAndZoom):

Canonical link: https://commits.webkit.org/276731@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/iOS-AVVideoCaptureSource-is-not-handling-the-case-of-another-application-changing-the-device-videoZoomFactor branch from 4c57ed8 to ca83b80 Compare March 27, 2024 13:36
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 276731@main (ca83b80): https://commits.webkit.org/276731@main

Reviewed commits have been landed. Closing PR #26406 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit ca83b80 into WebKit:main Mar 27, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebRTC For bugs in WebRTC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants