Recording Screen with Gstreamer while Using EGLFS

I used ximagesrc before for screen recording on TX2 with gstreamer it use to work perfectly fine.
This works until you are in desktop environment. I wanted to Use EGLFS in multi-user environment(console). Is there any way to record the content on EGLFS as it is directed to Fb0 with gstreamer and hardware acceleration ?

We don’t have much experience on this and would need other users to share suggestion. Looks like EGLFS creates a full screen window and takes control of while display and video gets rendered directly on /dev/fb0.

The information may help:

What i have searched there is no direct way of recording Fb0. With EGLFS we are using KMS integration. I ll be glad if somebody can help me with this.

I recorded fb0 using ffmpeg but it only got the terminal. I am using eglfs_kms_egldevice backend. Does this direct it to other display ?

I am trying to implement the solution through, the Gstreamer appsrc plugin which can input the image and rest of the pipe lie will remain same as it was with ximagesrc. Will update if get success in it.

So the solution i did was is to grab the the displaying window and provide it to the appsrc plugin of gstreamer.