I found something like a game capture plugin for Gst Streamer that uses OBS GameCapture.
But a long time ago, friends stopped providing support, and they did not even leave any pipeline as an example.
I'm fairly new to GStreamer and I've been messing around with the code but couldn't create a pipeline to run it.
Can someone help with GStreamer to create a sample pipeline?
gst-inspect-1.0 libgstgamecapture.dll

On Windows, you could use dx9screencapsrc to screen capture the screen. For example: gst-launch-1.0 dx9screencapsrc x=100 y=100 width=320 height=240 ! videoconvert ! autovideosink