Sorry typo - change the caps string to suit your needs.<br><br><div class="gmail_quote">On Wed, Jan 5, 2011 at 9:34 AM, Rohit Atri <span dir="ltr"><<a href="mailto:rohitratri@gmail.com">rohitratri@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>@Nicolas </div><div><br></div><div>You could use the capsfilter element like this as well - </div><div><br></div>
<div><div>caps = gst_caps_new_simple ("video/x-raw-rgb",</div><div><span style="white-space:pre-wrap">        </span> "bpp", G_TYPE_INT, 24,</div>
<div><span style="white-space:pre-wrap">        </span> "depth", G_TYPE_INT, 24,</div><div><span style="white-space:pre-wrap">        </span> NULL);</div>
<div><br></div><div>gst_element_link_filtered(capsfilter, videosink, caps); (Considering videoscale element is already linked to capsfilter on to its left.)</div></div><div><br></div><div>instead of doing a gst_object_set()...</div>
<div> </div><div>Of course the choice between the 2 depends on your convenience.</div><div><br></div><div>Rohti</div><div><div></div><div class="h5"><div><br></div><div><br></div><div><br><div class="gmail_quote">On Wed, Jan 5, 2011 at 12:48 AM, Timothy Braun <span dir="ltr"><<a href="mailto:braunsquared@gmail.com" target="_blank">braunsquared@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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"><div><div></div><div>On Tue, Jan 4, 2011 at 2:02 PM, Nicolas <span dir="ltr"><<a href="mailto:c.r.n.a@wanadoo.fr" target="_blank">c.r.n.a@wanadoo.fr</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div>
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></div></div><div>
------------------------------------------------------------------------------<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" target="_blank">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>
</div></blockquote></div><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" target="_blank">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>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br>