GST_BUFFER_CAPS replacement in Gstreamer-1.0

Thiago Santos thiagoss at osg.samsung.com
Fri May 29 05:16:02 PDT 2015


On 05/29/2015 08:05 AM, Hamdi Rakkez wrote:
> Thank You a lot.
>
> After I sent the E-mail I have read the porting guide and I have 
> realised that the caps are not attached anymore to buffers.
>
> But when I don't have PADS, how can I get the caps.

Where did you get the buffer from? The entity creating it surely should 
know about its caps.

Can you provide more context on your application and problem?

>
> Exemple :
>
> void get_sampling_points (GstBuffer* buf, auto_sample_points* points, 
> tBY8Pattern pattern)
> {
>     guint8 *data = (guint8*)GST_BUFFER_MAP (buf);
>     GstCaps *caps = GST_BUFFER_CAPS (buf);
>     GstStructure *structure = gst_caps_get_structure (caps, 0);
>     gint width, height;
>     g_return_if_fail (gst_structure_get_int (structure, "width", &width));
>     g_return_if_fail (gst_structure_get_int (structure, "height", 
> &height));
>     ..
>     ..
>
>
> Thanks
>
> On Fri, May 29, 2015 at 11:57 AM, Thiago Santos 
> <thiagoss at osg.samsung.com <mailto:thiagoss at osg.samsung.com>> wrote:
>
>     On 05/29/2015 07:33 AM, Hamdi Rakkez wrote:
>>     Hi all,
>>
>>     What is the replacement of "GST_BUFFER_CAPS" which is a property
>>     of Gstreamer-0.10 in Gstreamer-1.0.
>
>     GstBuffer doesn't have a caps attribute anymore in 1.0. In the
>     pipeline, the caps is now passed as an event and the current caps
>     being used in a pad can be obtained with gst_pad_get_current_caps.
>     It is assumed that the buffers flowing from/to that pad are of the
>     type indicated by that caps.
>
>     Additionally, there is no GstSample which encapsulates a GstBuffer
>     with a GstCaps that can be used when you need to have a caps
>     attached to a particular buffer but it is not used for the usual
>     flow of buffers in the pipeline.
>
>     A porting guide can be found at
>     http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/random/porting-to-1.0.txt
>
>>
>>     Thank you.
>>
>>     Best,
>>     Hamdi
>>
>>
>>     _______________________________________________
>>     gstreamer-devel mailing list
>>     gstreamer-devel at lists.freedesktop.org  <mailto:gstreamer-devel at lists.freedesktop.org>
>>     http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>     -- 
>     Thiago Sousa Santos
>     Senior Multimedia Engineer, Open Source Group
>     Samsung Research America - Silicon Valley
>
>
>     _______________________________________________
>     gstreamer-devel mailing list
>     gstreamer-devel at lists.freedesktop.org
>     <mailto:gstreamer-devel at lists.freedesktop.org>
>     http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


-- 
Thiago Sousa Santos
Senior Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150529/e32c380c/attachment-0001.html>


More information about the gstreamer-devel mailing list