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

Investigate video memory leaks on Win11. #24

Closed
Mysticial opened this issue Aug 13, 2021 · 2 comments
Closed

Investigate video memory leaks on Win11. #24

Mysticial opened this issue Aug 13, 2021 · 2 comments
Labels

Comments

@Mysticial
Copy link
Collaborator

Probably nothing we can do about this right now. Just putting it up for the record.

@Mysticial
Copy link
Collaborator Author

Reproducible on my laptop.

Basically the leak starts the moment the view finder is set:

m_camera->setViewfinder(m_camera_view);

Furthermore, this is an actual leak that doesn't get freed when the both the QCamera or the QCameraViewFinder are destroyed. Thus, this is an unrecoverable leak.

So far, the only way to avoid this leak in code is to not use QCameraViewFinder and manage the rendering ourselves. We do have an incomplete implementation of this, but it's far too slow since the QVideoFrames coming from the capture card are JPG and Qt's JPG decoder is far too slow. Really, this should be GPU rendered.

So rather than trying to optimize the software rendering, we're gonna attack this from two angles:

  1. See if migrating to Qt6 will fix this.
  2. See if we can use OpenCV instead.

@Mysticial
Copy link
Collaborator Author

Fixed by moving to Qt6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant