Aleksander
Aleksander
Bisecting (again)...
It is quite difficult to bisect `testcamera`, I tried to pinpoint which commit started causing this problem, but due to various failures in some older commits (SIGABRT crash, compilation errors...
Yes, tested `testdrawchessboard` and `testgeometry`, both run without any issues. I've hooked up a printf() just under `CoreMediaFormatToSDL()` in `GatherCameraSpecs` function, it prints out these formats: SDL_PIXELFORMAT_YUY2 SDL_PIXELFORMAT_UYVY SDL_PIXELFORMAT_NV12 SDL_PIXELFORMAT_YUY2...
> Just to be clear, this is happening if you explicitly use the _software renderer_ and not OpenGL or Metal? Let me check, one moment
> Just to be clear, this is happening if you explicitly use the _software renderer_ and not OpenGL or Metal? Yup, that's it! `SDL_RENDER_DRIVER` software and opengl works as intended,...
`testdrawchessboard` and `testgeometry` both work OK on this laptop, in all three video backends (metal, gl, software).
> Do you know which of these formats is actually used when you're getting frames from the camera? `SDL_PIXELFORMAT_UYVY`, grabbed from `next_frame` just below `SDL_AcquireCameraFrame()`
Can confirm, testcamera also doesn't run at all: testcamera: ``` ./build/test/testcamera 2024-06-25 14:19:53.089 testcamera[2694:932729] INFO: Saw 2 camera devices. 2024-06-25 14:19:53.089 testcamera[2694:932729] INFO: - Camera #0: FaceTime HD Camera 2024-06-25...
Can be fixed by commenting out this `continue` statement (`SDL_camera_coremedia.m`):  Camera capture works as intended after that.
Looks like it doesn't pass if spec->colorspace is set to 0 in COREMEDIA_OpenDevice, but i'm properly setting it to a non-zero value in SDL_OpenCameraDevice. Investigating further...