Commit 2f690ea
Windows camera: enable advanced video processing (YUY2/NV12 -> RGB32)
VM testing on a real webcam revealed the source reader was delivering 2-bpp frames
(YUY2, the common webcam format: 640x480 -> 614400 bytes), not RGB32 (1228800),
because SetCurrentMediaType(RGB32) is silently ignored unless the reader's video
processor is enabled. The width*height*4 size check then rejected every frame, so
the preview/session captured nothing.
Create both source readers (the continuous session and the legacy capturePhoto)
with MF_SOURCE_READER_ENABLE_ADVANCED_VIDEO_PROCESSING=TRUE so the reader inserts a
converter to RGB32. Verified on the Windows ARM64 VM: the worker-thread session now
delivers full 640x480 RGB32 frames (polled via cameraSessionLatestFrame), and the
generic-peer PrintWindow capture returns real pixels. CI runners have no camera, so
this path is only exercisable on a real machine.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ee380e0 commit 2f690ea
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
117 | 123 | | |
118 | 124 | | |
119 | 125 | | |
| |||
237 | 243 | | |
238 | 244 | | |
239 | 245 | | |
240 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
241 | 253 | | |
242 | 254 | | |
243 | 255 | | |
| |||
0 commit comments