Reputation: 1105
I have a program to capture the desktop screen using DXGI Desktop Duplication API.
I get frames with IDXGIOutputDuplication::AcquireNextFrame
and I am able to capture my desktop frame by frame fine.
To move forward, I try to optimize my program and try to manage dirty and moved rectangle. The API provides both IDXGIOutputDuplication::GetFrameDirtyRects
and IDXGIOutputDuplication::GetFrameMoveRects
to obtain these informations.
However, it seems like there are never any rectangles identified as being moved. The documentation says moved rectangle are :
rectangles of pixels in the desktop image that the operating system moved to another location within the same image
What does this mean exactly ? Can DXGI identify arbitrary portion of the screen to have been moved ? Or maybe this only applies to desktop window being moved ?
Upvotes: 4
Views: 1788
Reputation: 1
In my tests, all changed regions are identified as dirty rects on Windows 10. On Windows Server 2012 (like Windows 8), moved regions can be identified correctly.
Upvotes: 0
Reputation: 374
I only can imagine that it depends on the graphics driver, monitor(s) and such things so it might be hard to give a full list of source actions.
I played around with a sample app for desktop duplication api and there was a moved rectangle event when I maximized an explorer window (windows 10 anniversary, surface pro 3, no external screens)
Upvotes: 0