Open whiskhub opened 2 weeks ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Describe the bug
As CaptureElement is not available in WinUI 3, the official workaround is to use a MediaPlayerElement instead (#4710). This works in most cases, but not all.
Some webcam video subtype formats, which were supported by WinUI 2 CaptureElement, are not supported by the MediaPlayerElement approach in WinUI 3. The video feed just stays blank, and the MediaPlayerElement stays in "Paused" state. This causes problems if some webcams only support the affected video format and can't switch to another one like NV12.
Affected video formats (possibly incomplete): RGB24, UYVY ({59565955-0000-0010-8000-00AA00389B71}), I420 ({30323449-0000-0010-8000-00AA00389B71})
Porting CaptureElement to WinUI 3 would be one solution (#8214) to fix this regression from WinUI 2.
Steps to reproduce the bug
Expected behavior
MediaPlayerElement shows video preview, just as with other subtype formats like NV12; or the CaptureElement from WinUI 2.
Screenshots
The bottom area, where the MediaPlayerElement is, stays blank.![image](https://github.com/microsoft/microsoft-ui-xaml/assets/173548087/a76b42e3-79f5-4b77-884c-43191784f5b8)
NuGet package version
WinUI 3 - Windows App SDK 1.5.4: 1.5.240607001
Windows version
Windows 11 (22H2): Build 22621
Additional context
The Windows Settings app still uses WinUI 2 and a CaptureElement preview in "Bluetooth and devices -> Cameras", where you can also verify that CaptureElement works fine.