HI all,<br>
<br>
I've come up with the following problem I got something like "filesrc location="<a href="http://file.in">file.in</a>" ! audio/XXX ! plugin ! fakesink"<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"ve solved it by patching with :<br>
<br>
--- gstreamer-cvs/plugins/elements/gstcapsfilter.c 2005-11-29 13:00:15.000000000 -0500<br>
+++ gstreamer/plugins/elements/gstcapsfilter.c 2005-12-02 15:21:51.000000000 -0500<br>
@@ -256,7 +256,11 @@<br>
out_caps = gst_pad_get_allowed_caps (trans->srcpad);<br>
g_return_val_if_fail (out_caps != NULL, GST_FLOW_ERROR);<br>
}<br>
-<br>
+<br>
+ if(!gst_caps_is_fixed(out_caps) || gst_caps_is_empty (out_caps)) {<br>
+ out_caps = gst_capsfilter_transform_caps(trans, GST_PAD_UNKNOWN, out_caps);<br>
+ gst_pad_fixate_caps(trans->srcpad, out_caps);<br>
+ }<br>
if (gst_caps_is_fixed (out_caps) && !gst_caps_is_empty (out_caps)) {<br>
GST_DEBUG_OBJECT (trans, "Have fixed output caps %"<br>
GST_PTR_FORMAT " to apply to buffer with no caps", 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>