Maybe you are not giving full caps?<br>What caps have you tried?<br><br><div class="gmail_quote">2010/9/6 wl2776 <span dir="ltr">&lt;<a href="mailto:wl2776@gmail.com">wl2776@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
Hi all.<br>
I am writing a small function, making screenshots.<br>
I have studied several examples already, and now I&#39;m trying to copy them to<br>
my application.<br>
<br>
My function gets the last displayed buffer from the videosink, then builds<br>
the pipeline:<br>
appsrc -&gt; ffmpegcolorspace -&gt; videoscale -&gt; encoder -&gt; filesink<br>
<br>
I have to save the screenshot to one of several formats, so I use one of<br>
several encoders: jpegenc, ffenc_bmp, pngenc, ffenc_tiff.<br>
All elements are created and added to the pipeline.<br>
<br>
The problem is that my function cannot set caps on the encoder&#39;s sink pad.<br>
Even following simple statements return false:<br>
caps=gst_caps_from_string(&quot;video/x-raw-rgb&quot;<br>
                            &quot;,bpp=24,depth=24&quot;<br>
                         );<br>
pad=gst_element_get_static_pad(enc,&quot;sink&quot;);<br>
rb=gst_pad_set_caps(pad,caps);<br>
<br>
rb is always 0 (FALSE)<br>
<br>
However, I need this, because my function also has to scale the screenshot,<br>
if new width and height are given.<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Cannot-set-caps-tp2528411p2528411.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/Cannot-set-caps-tp2528411p2528411.html</a><br>


Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
<br>
------------------------------------------------------------------------------<br>
This SF.net Dev2Dev email is sponsored by:<br>
<br>
Show off your parallel programming skills.<br>
Enter the Intel(R) Threading Challenge 2010.<br>
<a href="http://p.sf.net/sfu/intel-thread-sfd" target="_blank">http://p.sf.net/sfu/intel-thread-sfd</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Your Sincerely<br>Michael Joachimiak<br>