On Sa, 2016-05-14 at 23:59 -0700, FranklinHuang wrote:
> According to the guide,
>
> GST_BUFFER_CAPS() is gone, caps are not set on buffers anymore but are
> set
> on the pads where the buffer is pushed on. Likewise GST_BUFFER_COPY_CAPS
> is
> not needed anymore. gst_buffer_get/set_caps() are gone too.
>
> I have a interface API,
> GstStructure* data_media =
> gst_caps_get_structure(GST_BUFFER_CAPS(buffer), 0);
> try to get the caps from the buffer in 0.10 version,
> How I could change it to the 1.0 edition?
Either you catch the CAPS event on the sinkpad and cache the caps, or
you could get the current caps of the pad with
gst_pad_get_current_caps().
Depending on where you do all this, it can be racy though. You need to
get the caps from the streaming thread at the time this specific buffer
is arriving, otherwise it might be out of date.
GstSample is a data structure now that can hold buffer, caps and other
things.
--
Sebastian Dröge, Centricular Ltd ·
http://www.centricular.com_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel