ReShade https://reshade.me is an open source DX9/DX11/OGL hook that adds shader effects… but also includes screenshot functionality! Should be possible to change that to streaming frames to your app…
(Just in general, doing this shouldn't depend on a particular game, it's a graphics API level thing)
(Just in general, doing this shouldn't depend on a particular game, it's a graphics API level thing)