Open artths opened 1 month ago
Can you share a bit more about your monitor configuration (primarily which is the primary and what is the refresh rate) and what applications you're using to test? I'm not able to reproduce what you've described with MinUpdateInterval.
There is essentially no documentation for the new 26100 APIs, but it is clear from the sample that MinUpdateInterval is used to limit the capture frequency. In my tests, this API works properly for all values greater than 1 ms, for example, if the content being captured is 144 fps, a value of 25 ms will capture at only 40 fps, 17 ms - about 60 fps, and so on. However, when I set it to 0 ms, I expect it to capture without limits, i.e. at least the framerate of the captured window (if I want to capture all 144 frames), but instead the WGC captures only about 50 fps. Moreover, this behavior remains for all values greater than 0 but less than 1 ms. For example, with a value of std::chrono::microseconds(1000) it captures 144 fps, and a value of std::chrono::microseconds(999) and any number less, including 0 only captures 50 fps. The worst part is that the default value is 0, and until you figure out to call this API, you will have such poor results.
Another question concerns the performance of the WGC capture in general. When the game is paused and GPU consumption is low, the WGC captures all 144 frames. When game resumed, the GPU consumption increases to about 50% and the number of captured frames is close to 100 fps. I tried to use CaptureFramePool::Create as well as CaptureFramePool::CreateFreeThreaded, different number of pool buffers, close the frame immediately or after processing - the result is always the same. Do you have any advice on how to increase the capture performance? It's strange to me that Desktop Duplication worked much faster before it was broken in 24H2 (see https://github.com/robmikh/Win32CaptureSample/issues/83). My software critically depends on the capture performance and I am looking for at least one working option for 24H2 and future versions. Thank you.