[gst-devel] Need help for rezising video.

Rohit Atri rohitratri at gmail.com
Wed Jan 5 05:04:44 CET 2011


@Nicolas

You could use the capsfilter element like this as well -

caps = gst_caps_new_simple ("video/x-raw-rgb",
                            "bpp", G_TYPE_INT, 24,
                            "depth", G_TYPE_INT, 24,
                            NULL);

gst_element_link_filtered(capsfilter, videosink, caps);  (Considering
videoscale element is already linked to capsfilter on to its left.)

instead of doing a gst_object_set()...

Of course the choice between the 2 depends on your convenience.

Rohti



On Wed, Jan 5, 2011 at 12:48 AM, Timothy Braun <braunsquared at gmail.com>wrote:

> 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.
>
> As a side note:
> 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.
> You need to unref the caps when you're done with it as well.
>
> Just my 2c.
>
> Best,
> Tim
>
> On Tue, Jan 4, 2011 at 2:02 PM, Nicolas <c.r.n.a at wanadoo.fr> wrote:
>
>> Hi,
>>
>> Thanks for your reply.
>>
>> Ok, i do:
>>
>> pipeline = gst_pipeline_new ("pipeline");
>> playbin = gst_element_factory_make ("playbin2", "playbin");
>>
>> // Filter
>> filter = gst_element_factory_make ("capsfilter", "filter");
>> caps = gst_caps_new_simple ("video/x-raw-yuv", "format",
>> GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'), "width",
>> G_TYPE_INT, 800, "height", G_TYPE_INT, 600, NULL);
>> g_object_set ((GObject*) filter, "caps", caps, NULL);
>>
>> // My sink
>> sink = gst_element_factory_make ("evasvideosink", "sink");
>> g_object_set ((GObject*) playbin, "video-sink", sink, NULL); // Tell to
>> playbin2 to use my sink
>> g_object_set ((GObject*) playbin, "uri", argv[1], NULL);
>> g_object_set ((GObject*) sink, "evas-object", video, NULL); // Tell my
>> sink to use evas image
>>
>> gst_bin_add_many (GST_BIN (pipeline), playbin, filter, NULL);
>>
>> gst_element_set_state (pipeline, GST_STATE_PLAYING);
>>
>> It does not change the size of the video, is this the correct way ?
>>
>> Thanks in advance for your reply,
>> Nicolas.
>>
>>
>> ------------------------------------------------------------------------------
>> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
>> to consolidate database storage, standardize their database environment,
>> and,
>> should the need arise, upgrade to a full multi-node Oracle RAC database
>> without downtime or disruption
>> http://p.sf.net/sfu/oracle-sfdevnl
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>
>
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment,
> and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110105/916a27a7/attachment.htm>


More information about the gstreamer-devel mailing list