Print out caps of an element

m.lenz m.lenz at kappa-optronics.com
Mon Jan 20 09:47:20 UTC 2020


I tried out the following:

  GstElement *videosink;
  videosink = gst_element_factory_make ("udpsink", "videosink");
  ...
  GstPad *pad = gst_element_get_static_pad (videosink, "sink");
  GstCaps *caps = gst_pad_get_current_caps(pad);

But the returned pointer in caps is always NULL. The pointer of my pad
referring to the videosink is found!

Does the udpsink has no caps? Because this is what the documentation says
about this. I also tried if(gst_pad_has_current_caps(pad)) and this is also
always false.

Maybe it is a problem, that the caps will not be passed on the next element?
I created caps on appsrc and linked appsrc, rtpvrawpay and udpsink to a
pipeline at the end of my application.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list