HI all,<br>
<br>
I've come up with the following problem I got something like&nbsp; &quot;filesrc location=&quot;<a href="http://file.in">file.in</a>&quot; ! audio/XXX ! plugin ! fakesink&quot;<br>
<br>
Plugin can take audio/XXX,var=x ... So i'm partially setting the caps with the caps filter<br>
<br>
The problems seems to be that they caps are never fixated , my fixate
function in my plugin isn't called nor is my setcaps... and filesrc
pushes me a buffer with caps = NULL :(<br>
<br>
I&quot;ve solved it by patching with :<br>
<br>
--- gstreamer-cvs/plugins/elements/gstcapsfilter.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2005-11-29 13:00:15.000000000 -0500<br>
+++ gstreamer/plugins/elements/gstcapsfilter.c&nbsp; 2005-12-02 15:21:51.000000000 -0500<br>
@@ -256,7 +256,11 @@<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out_caps = gst_pad_get_allowed_caps (trans-&gt;srcpad);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_return_val_if_fail (out_caps != NULL, GST_FLOW_ERROR);<br>
&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-<br>
+<br>
+&nbsp;&nbsp;&nbsp; if(!gst_caps_is_fixed(out_caps) || gst_caps_is_empty (out_caps)) {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out_caps = gst_capsfilter_transform_caps(trans, GST_PAD_UNKNOWN, out_caps);<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gst_pad_fixate_caps(trans-&gt;srcpad, out_caps);<br>
+&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp; if (gst_caps_is_fixed (out_caps) &amp;&amp; !gst_caps_is_empty (out_caps)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GST_DEBUG_OBJECT (trans, &quot;Have fixed output caps %&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GST_PTR_FORMAT &quot; to apply to buffer with no caps&quot;, out_caps);<br>
<br>
<br>
But i'm really not sure it's a good way to do it :( <br>
<br>
I made the patch with the rationale that capsfilter wounldn't be able
to set the caps if they were not fixed .. so I fixed them before but
maybe I should do the fixate on the sinkpad, or do something completly
different... <br>
<br>
I'm also unsure about what happends when you send a buffer with no caps
(the 1st) shouldn't some default fixate function be called then ? <br>
<br>
Thanks a lot<br>
<br>
Antoine<br>
<br>
<br>
<br>
<br>
<br>