-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Add CameraFeed support for iOS #106305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shiena
wants to merge
1
commit into
godotengine:master
Choose a base branch
from
shiena:feature/support-iso-camera
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add CameraFeed support for iOS #106305
+13
−9
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CI errors should be resolved in #104857 . |
applied the diff
diff --git a/modules/camera/camera_macos.mm b/modules/camera/camera_macos.mm
--- a/modules/camera/camera_macos.mm (revision e37d785a0a7f41d37aa42fe3689e86f322c13dc3)
+++ b/modules/camera/camera_macos.mm (date 1747067891596)
@@ -314,10 +314,14 @@
if (@available(macOS 10.15, *)) {
#endif
AVCaptureDeviceDiscoverySession *session;
- if (@available(macOS 14.0, *)) {
+ if (@available(macOS 14.0, iOS 17.0, *)) {
session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeExternal, AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeContinuityCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
} else {
- session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeExternalUnknown, AVCaptureDeviceTypeBuiltInWideAngleCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
+#if TARGET_OS_IPHONE || TARGET_OS_MACCATALYST
+ session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeBuiltInWideAngleCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
+#else
+ session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeExternalUnknown, AVCaptureDeviceTypeBuiltInWideAngleCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
+#endif
}
devices = session.devices;
#if defined(__x86_64__)
|
b68fa03
to
990f5de
Compare
990f5de
to
a1d1102
Compare
73ade2f
to
86c594f
Compare
2b908dc
to
2a75995
Compare
a4fa196
to
5b4bec4
Compare
5b4bec4
to
910729b
Compare
On a brief review I didn't see anything bad, but also probably want to test to see it works. |
@fire A camera feed demo project is available. |
Co-authored-by: Leo de Penning <[email protected]>
910729b
to
dc74105
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split iOS definitions (squashing #98416).
I tested on iPhone 15 Pro (iOS 18.4.1)
Relations: