Creating custom GStreamer Plugin that converts GRAY8 to NV12 data

I am facing issue in Negotation of Caps

Can you provide some more information about what fails, and maybe also include your code?

Also looks like this is a duplicate of Hello, I am creating a new custom gstreamer plugin for format conversion from GRAY8 to NV12. I have set the caps on src and sink pad. But the plugin is not being linked due to incompatible caps. Can someone help me out in fixing this?