<div dir="ltr"><div>Setting caps directly on a pad is not always possible because the caps are basically negotiated as the pipeline moves from the READY to PAUSED state (IIRC).  Part of this negotiation involves communicating with upstream and downstream elements to determine the caps at each stage of the pipeline (at each pad).  I don't fully understand how it works (I am just a novice).<br></div><div><br></div><div>You do have an option to link your pad to a <a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-capsfilter.html">capsfilter</a> which would then place constraints on the caps of your pad.  Basically the caps negotiation will be forced to come up with something that fits your caps filter, otherwise the pipeline will never enter the PAUSED state (you would see some kind of error).</div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 7, 2020 at 8:28 PM William Johnston <<a href="mailto:wgj@cast.uark.edu">wgj@cast.uark.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have and element that looks like this:<br>
<br>
element: misbfixcoordinates1<br>
     pad: videosink<br>
         caps (writable):   video/x-raw, format=(string)RGB<br>
         template caps: video/x-raw, format=(string)RGB<br>
     pad: misbsink<br>
          caps (writable):   EMPTY<br>
          template caps: meta/klv<br>
     pad: videosrc<br>
         caps (writable):   video/x-raw, format=(string)RGB, <br>
width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], <br>
framerate=(fraction)[ 0/1, 2147483647/1 ]<br>
         template caps: video/x-raw, format=(string)RGB<br>
     pad: misbsrc<br>
         caps (writable):   EMPTY<br>
         template caps: meta/klv<br>
<br>
See those "EMPTY" caps? I want to set them to something else. I thought <br>
this would work:<br>
<br>
GstPad* <br>
misbsinkPad=gst_element_get_static_pad(misbfixcoordinates,"misbsink");<br>
GstCaps* newCaps1=gst_caps_from_string("meta/klv");<br>
gst_pad_set_caps(misbsinkPad,newCaps1);<br>
<br>
But it doesn't change anything. Anyone know how to do this?<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>