The capsfilter isn't going to do anything for you unless something in the pipeline is able to make the needed changes to match the caps. Before the capsfilter you should add a videoscale element so it is able to match the requested caps of the filter. You may also want to take a gander at the ffmpeg_colorspace and videorate elements as well.<br>
<br>As a side note:<br>You can simplify the creation of the caps with the gst_caps_from_string( "video/x-raw-yuv, format=I420, width=800, height=600") call.<br>You need to unref the caps when you're done with it as well.<br>
<br>Just my 2c.<br><br>Best,<br>Tim<br><br><div class="gmail_quote">On Tue, Jan 4, 2011 at 2:02 PM, Nicolas <span dir="ltr"><<a href="mailto:c.r.n.a@wanadoo.fr">c.r.n.a@wanadoo.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
Thanks for your reply.<br>
<br>
Ok, i do:<br>
<br>
pipeline = gst_pipeline_new ("pipeline");<br>
playbin = gst_element_factory_make ("playbin2", "playbin");<br>
<br>
// Filter<br>
filter = gst_element_factory_make ("capsfilter", "filter");<br>
caps = gst_caps_new_simple ("video/x-raw-yuv", "format",<br>
GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'), "width",<br>
G_TYPE_INT, 800, "height", G_TYPE_INT, 600, NULL);<br>
g_object_set ((GObject*) filter, "caps", caps, NULL);<br>
<br>
// My sink<br>
sink = gst_element_factory_make ("evasvideosink", "sink");<br>
g_object_set ((GObject*) playbin, "video-sink", sink, NULL); // Tell to<br>
playbin2 to use my sink<br>
g_object_set ((GObject*) playbin, "uri", argv[1], NULL);<br>
g_object_set ((GObject*) sink, "evas-object", video, NULL); // Tell my<br>
sink to use evas image<br>
<br>
gst_bin_add_many (GST_BIN (pipeline), playbin, filter, NULL);<br>
<br>
gst_element_set_state (pipeline, GST_STATE_PLAYING);<br>
<br>
It does not change the size of the video, is this the correct way ?<br>
<br>
Thanks in advance for your reply,<br>
Nicolas.<br>
<br>
------------------------------------------------------------------------------<br>
Learn how Oracle Real Application Clusters (RAC) One Node allows customers<br>
to consolidate database storage, standardize their database environment, and,<br>
should the need arise, upgrade to a full multi-node Oracle RAC database<br>
without downtime or disruption<br>
<a href="http://p.sf.net/sfu/oracle-sfdevnl" target="_blank">http://p.sf.net/sfu/oracle-sfdevnl</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>