Le lundi 12 avril 2021 à 02:26 -0500, OhsureBoy a écrit :
> static GstFlowReturn
> gst_my_muxer_chain(GstPad *pad, GstObject *parent, GstBuffer *buf)
> {
> GstMyMuxer *filter;
>
>
>
>
> ...
> }
>
>
>
>
> When we have the above source code, we have found that data is coming in due
> to the change of the offset in the buf.
>
> What I'm curious about here is, is there a way to view buf's data?
GstBuffer are GstMemory container, they will contain one or more GstMemory
appended one after each other. You can "view" the data with a read only mapping
of the memory data, see gst_memory_map/unmap() function. As a convenience, you
may use gst_buffer_map/unmap() or gst_buffer_map_range()/unmao_range() to avoid
having to iterate the GstBuffer. You should though be aware that such mapping
will merge the data if the reselected range is over one or more GstMemory.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel