I read that GST_DEBUG_CAPS is deprecated - and it does not work.<br>Is there any other way for debugging CAPS?<br><br>I wrote some function for this purpose but what if have caps with other formats? It would be nice to have smth like GST_DEBUG_CAPS<br>
.................................................................................................<br>void print_caps(Myfilter *filter)<br>{<br> int width=0,height=0;<br> guint32 fourcc;<br> if (GST_IS_CAPS(GST_PAD_CAPS(filter->sinkpad_video)))<br>
{<br> GstStructure *sinkcaps = gst_caps_get_structure (GST_PAD_CAPS(filter->sinkpad_video), 0);<br> gst_structure_get_int (sinkcaps, "width", &width);<br> gst_structure_get_int (sinkcaps, "height", &height);<br>
gst_structure_get_fourcc (sinkcaps, "format", &fourcc);<br> switch (fourcc) {<br> case GST_MAKE_FOURCC ('I', '4', '2', '0'): GST_INFO("SINK CAPS: width %d, height: %d format: I420\n",width,height);<br>
break;<br> case GST_MAKE_FOURCC ('I', 'Y', 'U', '1'): GST_INFO("SINK CAPS: width %d, height: %d format: IYU1\n",width,height);<br> break;<br>
default:<br> GST_INFO("SINK CAPS: Incompatible format");<br> }<br> }<br> else<br> GST_WARNING("No caps on sink\n");<br> if (GST_IS_CAPS(GST_PAD_CAPS(filter->srcpad)))<br>
{<br> GstStructure *srccaps = gst_caps_get_structure (GST_PAD_CAPS(filter->srcpad), 0);<br> gst_structure_get_int (srccaps, "width", &width);<br> gst_structure_get_int (srccaps, "height", &height);<br>
gst_structure_get_fourcc (srccaps, "format", &fourcc);<br> switch (fourcc) {<br> case GST_MAKE_FOURCC ('I', '4', '2', '0'): GST_INFO(" SRC CAPS: width %d, height: %d format: I420\n",width,height);<br>
break;<br> case GST_MAKE_FOURCC ('I', 'Y', 'U', '1'): GST_INFO("SRC CAPS: width %d, height: %d format: IYU1\n",width,height);<br> break;<br>
default:<br> GST_INFO("SRC CAPS: Not compatible format");<br> }<br> }<br> else<br> GST_WARNING("No caps on source\n");<br>}<br>....................................<br clear="all">
<span></span><br>-- <br>Your Sincerely<br>Michael Joachimiak<br>