Skip to content

Incorrect behavior of MinUpdateInterval for values ​​less than 1ms #82

@artths

Description

@artths

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 #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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions