robmikh / SimpleRecorder

A simple screen recorder using both the Windows.Graphics.Capture and Windows.Media.Transcoding APIs.
MIT License
219 stars 43 forks source link

Properly handle window resize #6

Closed robmikh closed 5 years ago

robmikh commented 5 years ago

Currently if the application that is being captured resizes its window, the rest of the buffer will have stale content in it. I'm not sure how to handle that without introducing a copy.

image

robmikh commented 5 years ago

There's a possible solution that is a bit hacky...

We could clear the frame buffer before we dispose it in CaptureFrameWait.WaitForNewFrame(). Maybe that's good enough? ¯\_(ツ)_/¯