Skip to content

CameraPreview freezes after few frames. #287

@StandardL

Description

@StandardL

Describe the bug

When I try to use sample codes of CameraPreview, the camera frame freezes after few frames.__

Steps to reproduce

1. Create new project -> Template Studio for WinUI(Template Studio version:5.5), all default.
2. Use defalut Microsoft.WindowsAppSDK(1.4.231008000) and Microsoft.Windows.SDK.BuildTools(10.0.22621.756)
3. Install CommunityToolkit.WinUI.Controls.CameraPreview 8.0.230907
4. Add sample codes on https://github.com/CommunityToolkit/Windows/blob/main/components/CameraPreview/samples/CameraPreviewSample.xaml and https://github.com/CommunityToolkit/Windows/blob/main/components/CameraPreview/samples/CameraPreviewSample.xaml.cs
5. Build Debug x64 Packaged 
6. Camera frames stops updating 2 seconds after app launch

Expected behavior

Camera frame keeps updating.

Screenshots

No response

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 10 21H2 (Build 19044)
  • Windows 10 22H2 (Build 19045)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

Windows 11 23H2 (Build 22635)

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Windows 10, version 2104 (Build 20348)
  • Windows 11, version 22H2 (Build 22000)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

Version 17.8.2

Device form factor

No response

Additional context

When GC triggered, the frames update for about 0.5 sec, then it freezes again.
image

Help us help you

No, I'm unable to contribute a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomponents::controls::camerapreviewEnables easily previewing video in the MediaPlayerElement from available camera frame sources.

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions