Building Open CV with Latest Gstreamer 1.21

Have You guys tried building OpenCV from source with Gstreamer 1.21.

I have Gstreamer 1.21 Installed but somehow Build is taking GStreamer to be 1.16.3. IHow can I make sure that Open Cv is compiled against Gstreamer 1.21 , so that I can use nvcodec Elements inside OpenCV Gstreamer.