I need to capture the screen and resize the output in Windows.
My app basically captures the screen and then calculate the average color of every frame.
Is this the most optimized pipeline I can get for the purpose or there is something that can improve performance and reduce resources usage?
./gst-launch-1.0 d3d11screencapturesrc ! d3d11convert ! “video/x-raw(memory:D3D11Memory),width=800,height=600,sync=false” ! autovideosink
bumping question in the hope of an answer
video/x-raw(memory:D3D11Memory),width=800,height=600,sync=false caps has no effect. I guess you intended
autovideosink sync=false (autovideosink will be a wrapper bin of
d3d1videosink btw). Perhaps configuring small queue between src and sink might improve things but I guess the impact would not be significant in your case.
Regarding avg color calculation, to achieve best performance, you will need to use compute shader. Specifically, place
d3d11overlay element in front of videosink and run your compute shader (e.g., read/calculate avg color from d3d11 texture directly). Or you will be able to use pad probe in order to extract d3d11 texture from buffer without