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

camera: Fix corrupted CoreMedia input #9974

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

ghost
Copy link

@ghost ghost commented Jun 4, 2024

Before:

image

After

image

Description

AVCaptureVideoDataOutput.videoSettings should be initialized to zero to receive frames matching the device format. On my setup this was defaulting to 2vuy, which broke testcamera because it was expecting the same format as the capture device (420v).

See: https://developer.apple.com/documentation/avfoundation/avcapturevideodataoutput/1389945-videosettings?language=objc

I also added a parameter to select a specific camera by name with running testcamera.

All the cameras I could find output NV12 frames so I wasn't able to test with other pixel formats.

Existing Issue(s)

Noticed here: #9930 (comment)

@slouken slouken merged commit 5387022 into libsdl-org:main Jun 4, 2024
39 checks passed
@slouken
Copy link
Collaborator

slouken commented Jun 4, 2024

Merged, thanks!

This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants