Custom element not pushing buffer to subsequent element

I have written a element (Derived from Gst.Element) whose caps are as follows:
“video/x-raw(memory:CUDAMemory), format=RGB, height=1080, width=1920”. This is for both src and sink.
Now when i want to push buffers to the src pad and into cudaconvertscale I get the value GST_FLOW_NOT_NEGOTIATED. What could be the reason?

Hi please share the full pipeline you are using

“not negotiated” usually means one of two things:

  1. You’re pushing a buffer, but no CAPS event has been pushed before, so the receiving element doesn’t know how to interpret the data in the buffer. Perhaps your custom element didn’t forward the incoming CAPS event? There’s a PROXY_CAPS macro/flag that you can set on the sink pad if input caps are the same as the output.

  2. Something downstream didn’t accept some CAPS / format that was sent before.

Note that the problem could be the next element in the pipeline or something further downstream.

The GST_DEBUG log might help you pinpoint the reason (grep for ‘not-negotiated’ and then look at the lines before that.)