Skip to content
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

AVCaptureDevice+Extension selectDepthFormat parses empty availableFormats which results in fatalError #11

Closed
E-Mac27 opened this issue Dec 2, 2020 · 1 comment

Comments

@E-Mac27
Copy link

E-Mac27 commented Dec 2, 2020

Hi,

Thanks for this great repo. I've had a play around with the samples and it seems only the front camera is working properly. The device I am using to run the program is iPhone 11 and my XCode version is 12.2.

When I try to run Real-time Depth and Real-time Depth Mask, I run into a fatal error in AVCaptureDevice+Extension line 39.

I've tried to have a look at it myself but since I'm relatively new to Swift, I've been unable to resolve the problem myself. The availableFormats is always empty which results in the guard failing. I'm not too sure why since the format field is always populated.

Am I doing something wrong?

@E-Mac27
Copy link
Author

E-Mac27 commented Dec 19, 2020

Nevermind. I solved it. Its because iPhone 11 uses .builtInDualWideCamera instead of the .builtInDualCamera

@E-Mac27 E-Mac27 closed this as completed Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant